hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35e0ebbfd53b6d42e2fd770c66a03632059ae4d2 | 741 | py | Python | experiments/quick.py | tqsd/QontainerNet | 31cd7aeb6c279b11fbd4b072b2487d0224e7edcb | [
"MIT"
] | null | null | null | experiments/quick.py | tqsd/QontainerNet | 31cd7aeb6c279b11fbd4b072b2487d0224e7edcb | [
"MIT"
] | null | null | null | experiments/quick.py | tqsd/QontainerNet | 31cd7aeb6c279b11fbd4b072b2487d0224e7edcb | [
"MIT"
] | 1 | 2022-02-22T09:48:38.000Z | 2022-02-22T09:48:38.000Z | from pprint import pprint
from scapy.all import *
from scapy.layers.inet import _IPOption_HDR
"""
class _IPOption_HDR(Packet):
fields_desc = [BitField("copy_flag", 0, 1),
BitEnumField("optclass", 0, 2, {0: "control", 2: "debug"}),
BitEnumField("option", 0, 5, _ip_options_names... | 27.444444 | 78 | 0.663968 |
8eb7d1f2454d10684df916a90828a58b600af830 | 4,555 | py | Python | var/spack/repos/builtin/packages/binutils/package.py | plamborn/spack | e2ec1c76cecaa2f21690994ba017fe942b37f780 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/binutils/package.py | plamborn/spack | e2ec1c76cecaa2f21690994ba017fe942b37f780 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/binutils/package.py | plamborn/spack | e2ec1c76cecaa2f21690994ba017fe942b37f780 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2019 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 *
import glob
class Binutils(AutotoolsPackage, GNUMirrorPackage):
"""GNU binutils, which contain t... | 43.380952 | 96 | 0.663666 |
c5e3abe0c09f6711682ccfa1764c7cd4a736fbab | 3,066 | py | Python | UltronRoBo/modules/wiki.py | UltronRoBo/UltronRoBoAssistant | 874dcf725d453ffabd85543533d2a07676af4d65 | [
"MIT"
] | null | null | null | UltronRoBo/modules/wiki.py | UltronRoBo/UltronRoBoAssistant | 874dcf725d453ffabd85543533d2a07676af4d65 | [
"MIT"
] | null | null | null | UltronRoBo/modules/wiki.py | UltronRoBo/UltronRoBoAssistant | 874dcf725d453ffabd85543533d2a07676af4d65 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2021 UltronRoBo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, di... | 37.851852 | 110 | 0.670254 |
f6ee6865737a9072afeed37bd4789806cf577cd8 | 909 | py | Python | cloudrail/knowledge/rules/sample/sample_custom_rule.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | cloudrail/knowledge/rules/sample/sample_custom_rule.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | cloudrail/knowledge/rules/sample/sample_custom_rule.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | from abc import abstractmethod
from typing import List, Dict
from cloudrail.knowledge.context.aws.aws_environment_context import AwsEnvironmentContext
from cloudrail.knowledge.rules.aws.aws_base_rule import AwsBaseRule
from cloudrail.knowledge.rules.base_rule import Issue
from cloudrail.knowledge.rules.rule_parameters.... | 37.875 | 111 | 0.731573 |
581cc0f8d464d7ee8a1c640ee45d99775350f3ef | 3,904 | py | Python | text-mining/multi-key-search.py | digbmc/college-news | 099dedaf9b6ca0d8e87b1bd624f1f2dd7d64c7dc | [
"MIT"
] | null | null | null | text-mining/multi-key-search.py | digbmc/college-news | 099dedaf9b6ca0d8e87b1bd624f1f2dd7d64c7dc | [
"MIT"
] | null | null | null | text-mining/multi-key-search.py | digbmc/college-news | 099dedaf9b6ca0d8e87b1bd624f1f2dd7d64c7dc | [
"MIT"
] | null | null | null | """
Date: 25 June 2021
Modified from cn-keyword-search.py
Keyword search:
- Uses regular expressions to search the corpus for one or more keywords
- Creates a csv file for each issue the word is found in (NB: row per keyword instance)
"""
# import statements
import re #regular expressions, chec... | 46.47619 | 160 | 0.641906 |
4b79ea85a4130b742c96110890caba1cc099adbe | 659 | py | Python | scripts/ipydb.py | ntc2/nathan-collins--conf | 42c03927563bb54a553b14816e2757aff0bc4b81 | [
"MIT"
] | 9 | 2015-04-22T00:54:46.000Z | 2021-12-08T08:25:25.000Z | scripts/ipydb.py | ntc2/nathan-collins--conf | 42c03927563bb54a553b14816e2757aff0bc4b81 | [
"MIT"
] | 1 | 2018-01-27T19:51:56.000Z | 2018-04-01T03:43:49.000Z | scripts/ipydb.py | ntc2/nathan-collins--conf | 42c03927563bb54a553b14816e2757aff0bc4b81 | [
"MIT"
] | null | null | null | __doc__ = '''Start an IPython shell (for debugging). Recall that imports only
happen once, unless you use reload(), so when you import ipydb in a
loop IPython only gets started once. Import this module where ever
you want the IPython shell to be started, e.g.
def foo(bar):
for x in bar:
if baz(x):
... | 34.684211 | 78 | 0.707132 |
a3640d4adbcf6b61cf988534b531e28a9b2c1ffe | 6,284 | py | Python | backend/modelo.py | shaii-Kr/SistemaHemos | d20968f47d442fb8dea2369ca9ae418cf95e5da2 | [
"MIT"
] | null | null | null | backend/modelo.py | shaii-Kr/SistemaHemos | d20968f47d442fb8dea2369ca9ae418cf95e5da2 | [
"MIT"
] | null | null | null | backend/modelo.py | shaii-Kr/SistemaHemos | d20968f47d442fb8dea2369ca9ae418cf95e5da2 | [
"MIT"
] | null | null | null | from config import *
# Classe pai
class Pessoa(db.Model):
nomeCompleto = db.Column(db.String(200))
dtNascimento = db.Column(db.String(100))
genero = db.Column(db.String(100))
cpf = db.Column(db.String(20), primary_key=True)
idade = db.Column(db.Integer)
cep = db.Column(db.Integer)
telefone... | 41.071895 | 339 | 0.640038 |
4b3c796618e2d807f2ef82b2174fd2e3efe71464 | 202 | py | Python | gefapi/config/staging.py | LocateIT/trends.earth-API | a1f1b98c3d0375d142327d9454a2d99237886497 | [
"X11"
] | 1 | 2019-02-25T08:30:14.000Z | 2019-02-25T08:30:14.000Z | gefapi/config/staging.py | LocateIT/trends.earth-API | a1f1b98c3d0375d142327d9454a2d99237886497 | [
"X11"
] | null | null | null | gefapi/config/staging.py | LocateIT/trends.earth-API | a1f1b98c3d0375d142327d9454a2d99237886497 | [
"X11"
] | 2 | 2019-07-19T15:40:47.000Z | 2020-03-02T14:28:25.000Z | import os
SETTINGS = {
'logging': {
'level': 'DEBUG'
},
'service': {
'port': 3000
},
'SCRIPTS_FS': '/data/scripts',
'REGISTRY_URL': os.getenv('REGISTRY_URL'),
}
| 15.538462 | 46 | 0.5 |
32fc69b4d9629c571bc00ebc9d97b8ea6ace8972 | 69 | py | Python | testapp/__main__.py | JvMaiia/testapp-voc | 3c893d3619466ca5f5ccfa77ec672a8cd63d862e | [
"BSD-3-Clause"
] | null | null | null | testapp/__main__.py | JvMaiia/testapp-voc | 3c893d3619466ca5f5ccfa77ec672a8cd63d862e | [
"BSD-3-Clause"
] | null | null | null | testapp/__main__.py | JvMaiia/testapp-voc | 3c893d3619466ca5f5ccfa77ec672a8cd63d862e | [
"BSD-3-Clause"
] | null | null | null | from testapp.app import main
if __name__ == '__main__':
main()
| 11.5 | 28 | 0.666667 |
d9873cb499b04bc9966f9353ee9591e5dd3f48aa | 9,374 | py | Python | improver_tests/utilities/test_GenerateTimeLaggedEnsemble.py | cpelley/improver | ebf77fe2adc85ed7aec74c26671872a2e4388ded | [
"BSD-3-Clause"
] | 77 | 2017-04-26T07:47:40.000Z | 2022-03-31T09:40:49.000Z | improver_tests/utilities/test_GenerateTimeLaggedEnsemble.py | cpelley/improver | ebf77fe2adc85ed7aec74c26671872a2e4388ded | [
"BSD-3-Clause"
] | 1,440 | 2017-03-29T10:04:15.000Z | 2022-03-28T10:11:29.000Z | improver_tests/utilities/test_GenerateTimeLaggedEnsemble.py | MoseleyS/improver | ca028e3a1c842e3ff00b188c8ea6eaedd0a07149 | [
"BSD-3-Clause"
] | 72 | 2017-03-17T16:53:45.000Z | 2022-02-16T09:41:37.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 43.398148 | 87 | 0.663324 |
157d59819126362aff87cd292109c21641af6a7c | 75 | py | Python | sources/viewgui/form_new_device/__init__.py | Groomsha/lan-map | 1c30819470f43f8521e98eb75c70da23939f8f06 | [
"Apache-2.0"
] | null | null | null | sources/viewgui/form_new_device/__init__.py | Groomsha/lan-map | 1c30819470f43f8521e98eb75c70da23939f8f06 | [
"Apache-2.0"
] | null | null | null | sources/viewgui/form_new_device/__init__.py | Groomsha/lan-map | 1c30819470f43f8521e98eb75c70da23939f8f06 | [
"Apache-2.0"
] | null | null | null | from .ui_table_new_device_ import *
from .ui_interface_new_device import *
| 25 | 38 | 0.84 |
976e476877c2d65d7bfef7536bd12d6cd20aa8f7 | 1,447 | py | Python | leetcode/editor/en/25.reverse-nodes-in-k-group.py | W-KE/Leetcode-Solutions | b6f40e45ddfa1a61a05f832b79581a34dab832cd | [
"MIT"
] | null | null | null | leetcode/editor/en/25.reverse-nodes-in-k-group.py | W-KE/Leetcode-Solutions | b6f40e45ddfa1a61a05f832b79581a34dab832cd | [
"MIT"
] | null | null | null | leetcode/editor/en/25.reverse-nodes-in-k-group.py | W-KE/Leetcode-Solutions | b6f40e45ddfa1a61a05f832b79581a34dab832cd | [
"MIT"
] | null | null | null | # Given a linked list, reverse the nodes of a linked list k at a time and return
# its modified list.
#
# k is a positive integer and is less than or equal to the length of the linked
# list. If the number of nodes is not a multiple of k then left-out nodes in the e
# nd should remain as it is.
#
#
#
#
# Example:
#... | 25.385965 | 82 | 0.584658 |
b0f63bfaf1ef3b5bba22b8bb613f4f9b7a0d5a15 | 29,847 | py | Python | symphony/cli/graphql_compiler/tests/test_query_parser.py | idoshveki/magma | 8022267bd8b8d94913fbb9a0836880361d785446 | [
"BSD-3-Clause"
] | null | null | null | symphony/cli/graphql_compiler/tests/test_query_parser.py | idoshveki/magma | 8022267bd8b8d94913fbb9a0836880361d785446 | [
"BSD-3-Clause"
] | 10 | 2021-03-31T20:19:00.000Z | 2022-02-19T07:09:57.000Z | symphony/cli/graphql_compiler/tests/test_query_parser.py | idoshveki/magma | 8022267bd8b8d94913fbb9a0836880361d785446 | [
"BSD-3-Clause"
] | 3 | 2020-08-20T18:45:34.000Z | 2020-08-20T20:18:42.000Z | #!/usr/bin/env python3
from dataclasses import asdict
from deepdiff import DeepDiff
from graphql_compiler.gql.query_parser import (
AnonymousQueryError,
InvalidQueryError,
ParsedEnum,
ParsedField,
ParsedObject,
ParsedOperation,
ParsedQuery,
ParsedVariableDefinition,
QueryParser,
)
... | 38.070153 | 87 | 0.241063 |
ae67a3c2e7126bec36676345f6a6a300a2532fb9 | 8,328 | py | Python | docs/conf.py | asyrofist/Extraction-Requirement | 45fc7c65d345e36c4b6bef3d19a28e4bed893df7 | [
"MIT"
] | 1 | 2021-01-16T01:07:00.000Z | 2021-01-16T01:07:00.000Z | docs/conf.py | asyrofist/Extraction-Requirement | 45fc7c65d345e36c4b6bef3d19a28e4bed893df7 | [
"MIT"
] | null | null | null | docs/conf.py | asyrofist/Extraction-Requirement | 45fc7c65d345e36c4b6bef3d19a28e4bed893df7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Read the Docs Template documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 26 14:19:49 2014.
#
# 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
# autogenera... | 31.908046 | 79 | 0.720941 |
0b8cfc87595dc087f5bf61504ad0dc4215797eb5 | 2,819 | py | Python | utils/Insta_Check.py | SUT2014/Python | 8a38fd4278ca9c362536642ec5f8e16b0ef28363 | [
"MIT"
] | null | null | null | utils/Insta_Check.py | SUT2014/Python | 8a38fd4278ca9c362536642ec5f8e16b0ef28363 | [
"MIT"
] | null | null | null | utils/Insta_Check.py | SUT2014/Python | 8a38fd4278ca9c362536642ec5f8e16b0ef28363 | [
"MIT"
] | null | null | null | ######################################
# By Kumaran D
# CA Instantiation script.
# Given a file with conversation ids, check each of them for CA Instantiation.
# Refer to the confluence page to understand what the script intends to do
######################################
import time
from selenium impor... | 32.402299 | 96 | 0.615821 |
42ae0f642d1a67f633a1819678341dd4baae8392 | 1,852 | py | Python | Psll.py | prathameshap/Python3-Data-Structures-Library | 073283f3adb127bf1bcf775f9c4da7b39788c9d0 | [
"MIT"
] | null | null | null | Psll.py | prathameshap/Python3-Data-Structures-Library | 073283f3adb127bf1bcf775f9c4da7b39788c9d0 | [
"MIT"
] | null | null | null | Psll.py | prathameshap/Python3-Data-Structures-Library | 073283f3adb127bf1bcf775f9c4da7b39788c9d0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""This file includes sinle linked list class"""
#Author Name: Prathamesh Pawar
# Email: prathameshpawar1301@gmail.com
"""Including Node class to create and traverse the link list"""
from Pnode import *
class SLL:
def __init__(self):
self.head = None
def __repr__(self)... | 25.027027 | 67 | 0.529698 |
59216fd0ee41552563946a54474f00bf996318e9 | 940 | py | Python | actions/nodes_node_disks_directory_index.py | nzlosh/stackstorm-proxmox | fc4388f0b62dd1d4a360e9542eb55dea387149f4 | [
"Apache-2.0"
] | null | null | null | actions/nodes_node_disks_directory_index.py | nzlosh/stackstorm-proxmox | fc4388f0b62dd1d4a360e9542eb55dea387149f4 | [
"Apache-2.0"
] | null | null | null | actions/nodes_node_disks_directory_index.py | nzlosh/stackstorm-proxmox | fc4388f0b62dd1d4a360e9542eb55dea387149f4 | [
"Apache-2.0"
] | null | null | null | import json
from packlib.base import ProxmoxAction
class NodesNodeDisksDirectoryIndexAction(ProxmoxAction):
"""
PVE Managed Directory storages.
"""
def run(self, node, profile_name=None):
super().run(profile_name)
# Only include non None arguments to pass through to proxmox api.
... | 31.333333 | 82 | 0.548936 |
6482e3893adcbe58f810024f11ca3cad2e871005 | 2,044 | py | Python | example/iris-data-classifier/ML-React-App-Template/service/app.py | yzhen-li/camel-app | 2351db91e358b359e014c6b570981621a6fc55f6 | [
"MIT"
] | 1 | 2019-04-21T05:01:11.000Z | 2019-04-21T05:01:11.000Z | example/iris-data-classifier/ML-React-App-Template/service/app.py | Rajesh-Royal/ML-React-App-Template | 5c71b132cbfb8ef10d7b24c7480fcd80520f5e71 | [
"MIT"
] | 15 | 2019-12-30T02:25:25.000Z | 2022-02-26T18:28:35.000Z | example/iris-data-classifier/ML-React-App-Template/service/app.py | Rajesh-Royal/ML-React-App-Template | 5c71b132cbfb8ef10d7b24c7480fcd80520f5e71 | [
"MIT"
] | 2 | 2019-10-01T21:45:26.000Z | 2019-10-13T17:38:50.000Z | from flask import Flask, request, jsonify, make_response
from flask_restplus import Api, Resource, fields
from sklearn.externals import joblib
import numpy as np
import sys
flask_app = Flask(__name__)
app = Api(app = flask_app,
version = "1.0",
title = "Iris Plant identifier",
description = "Predict the... | 34.066667 | 75 | 0.64726 |
01a232144feb9a0a62b43f256134e87b749093ea | 7,826 | py | Python | tk3dv/ptTools/models/CAE.py | vikasTmz/tk3dv | 48430cbc80113ed9c51bdcd3fb577da22af66473 | [
"MIT"
] | 25 | 2019-10-12T05:59:52.000Z | 2022-01-21T04:13:31.000Z | tk3dv/ptTools/models/CAE.py | vikasTmz/tk3dv | 48430cbc80113ed9c51bdcd3fb577da22af66473 | [
"MIT"
] | 1 | 2021-02-12T10:18:42.000Z | 2021-02-12T11:11:01.000Z | tk3dv/ptTools/models/CAE.py | vikasTmz/tk3dv | 48430cbc80113ed9c51bdcd3fb577da22af66473 | [
"MIT"
] | 13 | 2019-10-22T13:55:14.000Z | 2021-10-24T01:37:30.000Z | import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import os, sys, argparse, math
import numpy as np
FileDirPath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(FileDirPath, '..'))
import ptUtils
import ptNets
class SimpleCAE(p... | 33.587983 | 119 | 0.52185 |
8ce85379da0eab9ef7b1ab87b7c7e267db6102a2 | 6,512 | py | Python | examples/gym_ex/rl/agent.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | examples/gym_ex/rl/agent.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | examples/gym_ex/rl/agent.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI 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 ... | 30.429907 | 107 | 0.562961 |
93d139865259391556ff20b5088f5bc24e7695f2 | 509 | py | Python | src/blog/migrations/0045_auto_20191006_1510.py | codewithrakib/first-django-blog | 339f5833025b0758f391c7c8e0979ca2eefd1b52 | [
"MIT"
] | null | null | null | src/blog/migrations/0045_auto_20191006_1510.py | codewithrakib/first-django-blog | 339f5833025b0758f391c7c8e0979ca2eefd1b52 | [
"MIT"
] | 7 | 2021-03-19T02:00:00.000Z | 2022-02-10T10:26:38.000Z | src/blog/migrations/0045_auto_20191006_1510.py | codewithrakib/first-django-blog | 339f5833025b0758f391c7c8e0979ca2eefd1b52 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2019-10-06 15:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('blog', '0044_auto_20191005_0821'),
]
operations = [
migrations.AlterField(... | 24.238095 | 110 | 0.660118 |
5d5970ca8be21521d69ded7513a9a52cffaff89f | 2,070 | py | Python | b2share/modules/upgrade/upgrades/init.py | hjhsalo/b2share-new | 2a2a961f7cc3a5353850e9a409fd7e879c715b0b | [
"MIT"
] | null | null | null | b2share/modules/upgrade/upgrades/init.py | hjhsalo/b2share-new | 2a2a961f7cc3a5353850e9a409fd7e879c715b0b | [
"MIT"
] | null | null | null | b2share/modules/upgrade/upgrades/init.py | hjhsalo/b2share-new | 2a2a961f7cc3a5353850e9a409fd7e879c715b0b | [
"MIT"
] | 1 | 2020-09-29T10:56:03.000Z | 2020-09-29T10:56:03.000Z | # -*- coding: utf-8 -*-
#
# This file is part of EUDAT B2Share.
# Copyright (C) 2017 CERN.
#
# B2Share 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 Foundation; either version 2 of the
# License, or (at your option) any... | 34.5 | 76 | 0.75314 |
8dd9f4f2c9adedbe038f046296760644818dc769 | 1,795 | py | Python | src/mihome_energy_monitor.py | tmorley2000/pyenergenie | 0c41abe429c1fc7c9225866c10838af861e773ec | [
"MIT"
] | null | null | null | src/mihome_energy_monitor.py | tmorley2000/pyenergenie | 0c41abe429c1fc7c9225866c10838af861e773ec | [
"MIT"
] | null | null | null | src/mihome_energy_monitor.py | tmorley2000/pyenergenie | 0c41abe429c1fc7c9225866c10838af861e773ec | [
"MIT"
] | null | null | null | # mihome_energy_monitor.py 28/05/2016 D.J.Whale
#
# A simple demo of monitoring and logging energy usage of mihome devices
#
# Logs all messages to screen and to a file energenie.csv
# Any device that has a switch, it toggles it every 2 seconds.
# Any device that offers a power reading, it displays it.
import time
... | 26.397059 | 118 | 0.688579 |
959284aaa03580219a956a399702feed007075a6 | 5,819 | py | Python | clinica/iotools/converters/oasis_to_bids/oasis_to_bids.py | alexandreroutier/clinica | 66625c65e74962db7d5cea267d1a0e51d774bf91 | [
"MIT"
] | 1 | 2020-12-14T06:07:14.000Z | 2020-12-14T06:07:14.000Z | clinica/iotools/converters/oasis_to_bids/oasis_to_bids.py | alexandreroutier/clinica | 66625c65e74962db7d5cea267d1a0e51d774bf91 | [
"MIT"
] | null | null | null | clinica/iotools/converters/oasis_to_bids/oasis_to_bids.py | alexandreroutier/clinica | 66625c65e74962db7d5cea267d1a0e51d774bf91 | [
"MIT"
] | null | null | null | # coding: utf8
"""
Convert OASIS dataset (http://www.oasis-brains.org/) to BIDS.
"""
from clinica.iotools.abstract_converter import Converter
class OasisToBids(Converter):
def convert_clinical_data(self, clinical_data_dir, bids_dir):
"""
Convert the clinical data defined inside the clinical_spec... | 42.474453 | 114 | 0.603368 |
b40937670fdbd2a91982b221e53eb1f071b2f73e | 53,185 | py | Python | thonny/plugins/pip_gui.py | iblech/thonny | 148795fa25c11e5061ae48e379444d378d7ec829 | [
"MIT"
] | null | null | null | thonny/plugins/pip_gui.py | iblech/thonny | 148795fa25c11e5061ae48e379444d378d7ec829 | [
"MIT"
] | null | null | null | thonny/plugins/pip_gui.py | iblech/thonny | 148795fa25c11e5061ae48e379444d378d7ec829 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from logging import getLogger
import os
import re
import subprocess
import sys
import tkinter as tk
from logging import exception
from os import makedirs
from tkinter import messagebox, ttk
from tkinter.messagebox import showerror
from typing import List, Union, Dict, Tuple
import thonny
from ... | 36.403149 | 115 | 0.594152 |
92df9d1d2f922f3c9cd3e92d9c5fc8622b7d5ae1 | 14,480 | py | Python | Tiny-ImageNet/SSKD/student.py | UBCDingXin/cGAN-KD | c32a4b014fe024222101ff11d63de518448f7f8d | [
"MIT"
] | 1 | 2021-08-21T09:19:17.000Z | 2021-08-21T09:19:17.000Z | Tiny-ImageNet/SSKD/student.py | UBCDingXin/cGAN-KD | c32a4b014fe024222101ff11d63de518448f7f8d | [
"MIT"
] | null | null | null | Tiny-ImageNet/SSKD/student.py | UBCDingXin/cGAN-KD | c32a4b014fe024222101ff11d63de518448f7f8d | [
"MIT"
] | 2 | 2021-04-15T08:23:49.000Z | 2021-09-15T06:52:25.000Z | import os
import os.path as osp
import argparse
import time
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.optim.lr_scheduler import MultiStepLR
from torch.utils.data import DataLoader
import torchvision.transforms as transforms
# from tens... | 40.560224 | 166 | 0.66982 |
ddc26c882fa3cd28fe4a0304761ff392954ed70f | 3,493 | py | Python | nova/tests/unit/fake_request_spec.py | bopopescu/nova-rocky-system-reader-role | 50a9d96f117b3c90aec214d1732f63fc6a1b98ea | [
"Apache-2.0"
] | 2 | 2021-10-11T04:56:25.000Z | 2022-02-16T08:49:29.000Z | nova/tests/unit/fake_request_spec.py | bopopescu/nova-rocky-system-reader-role | 50a9d96f117b3c90aec214d1732f63fc6a1b98ea | [
"Apache-2.0"
] | 132 | 2017-03-27T11:31:52.000Z | 2022-03-30T08:45:02.000Z | nova/tests/unit/fake_request_spec.py | bopopescu/nova-rocky-system-reader-role | 50a9d96f117b3c90aec214d1732f63fc6a1b98ea | [
"Apache-2.0"
] | 8 | 2017-03-27T07:50:38.000Z | 2020-02-14T16:55:56.000Z | # 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, software
# d... | 36.385417 | 78 | 0.675064 |
370e6071241e25c982a8decf15934bbdfad487bd | 3,432 | py | Python | load_spam.py | yichunli95/influence-release | c151e09b83f31b8db40f872e35be672a21d3e43c | [
"MIT"
] | null | null | null | load_spam.py | yichunli95/influence-release | c151e09b83f31b8db40f872e35be672a21d3e43c | [
"MIT"
] | null | null | null | load_spam.py | yichunli95/influence-release | c151e09b83f31b8db40f872e35be672a21d3e43c | [
"MIT"
] | null | null | null | import os
from influence.dataset import DataSet
from tensorflow.contrib.learn.python.learn.datasets import base
import numpy as np
from influence.nlprocessor import NLProcessor
from scipy.io import savemat
import IPython
def init_lists(folder):
a_list = []
file_list = os.listdir(folder)
for a_file in f... | 32.377358 | 105 | 0.704254 |
80cd827475417f81e5b4ff869f7b798eec20efc9 | 17 | py | Python | SoftLayer/CLI/autoscale/__init__.py | dvzrv/softlayer-python | 9a5f6c6981bcc370084537b4d1769383499ce90d | [
"MIT"
] | 126 | 2015-01-05T05:09:22.000Z | 2021-07-02T00:16:35.000Z | SoftLayer/CLI/autoscale/__init__.py | dvzrv/softlayer-python | 9a5f6c6981bcc370084537b4d1769383499ce90d | [
"MIT"
] | 969 | 2015-01-05T15:55:31.000Z | 2022-03-31T19:55:20.000Z | SoftLayer/CLI/autoscale/__init__.py | dvzrv/softlayer-python | 9a5f6c6981bcc370084537b4d1769383499ce90d | [
"MIT"
] | 176 | 2015-01-22T11:23:40.000Z | 2022-02-11T13:16:58.000Z | """Autoscale"""
| 8.5 | 16 | 0.529412 |
63c8e02a6109aeb330a03865b59468f072bdea3c | 7,624 | py | Python | tools/policy_eval_suite.py | JohnNWarila/apex | ff86a3b63ff36ecbb8f135756465842489c5aa0f | [
"MIT"
] | null | null | null | tools/policy_eval_suite.py | JohnNWarila/apex | ff86a3b63ff36ecbb8f135756465842489c5aa0f | [
"MIT"
] | null | null | null | tools/policy_eval_suite.py | JohnNWarila/apex | ff86a3b63ff36ecbb8f135756465842489c5aa0f | [
"MIT"
] | null | null | null | import time
import numpy as np
import torch
#validate the sensitivity of policy to environment parameters
##########To do#########
#Formalize desired output
#Get to run with user input of env and policy without iteration
#Iterate through each parameter
def iterativeValidation(cassie_env, policy):
state = torch.Te... | 39.91623 | 185 | 0.593389 |
5b0cc8ca46fafd7ea0a5d9588df78118c1bfe2e6 | 5,740 | py | Python | embeddings_and_predictions.py | kgrozdanic/lumen-data-science-2022 | 115e14d8502210c662a68913365dc9c1179c3998 | [
"MIT"
] | null | null | null | embeddings_and_predictions.py | kgrozdanic/lumen-data-science-2022 | 115e14d8502210c662a68913365dc9c1179c3998 | [
"MIT"
] | null | null | null | embeddings_and_predictions.py | kgrozdanic/lumen-data-science-2022 | 115e14d8502210c662a68913365dc9c1179c3998 | [
"MIT"
] | 1 | 2022-03-07T07:59:10.000Z | 2022-03-07T07:59:10.000Z | from src.data.GoogleDataset_one import GoogleDatasetOne
from tqdm import tqdm
import torch
import pandas as pd
from src.helpers import EPretrainedBackbone
from src.models.ImagenetTransferLearning import ImagenetTransferLearning
from src.helpers import *
import json
import wandb
device = torch.device("cuda:0") if torc... | 41 | 129 | 0.544948 |
e3d444a88e05d2e40653014ab3dfa41d18831fd1 | 154,204 | py | Python | from_3b1b/old/leibniz.py | sanjaydatasciencedojo/manim | 603a1a21dbb5eca325ed670f46ea72401a8edf1d | [
"MIT"
] | null | null | null | from_3b1b/old/leibniz.py | sanjaydatasciencedojo/manim | 603a1a21dbb5eca325ed670f46ea72401a8edf1d | [
"MIT"
] | null | null | null | from_3b1b/old/leibniz.py | sanjaydatasciencedojo/manim | 603a1a21dbb5eca325ed670f46ea72401a8edf1d | [
"MIT"
] | null | null | null | from functools import reduce
from manimlib.imports import *
# revert_to_original_skipping_status
def chi_func(n):
if n%2 == 0:
return 0
if n%4 == 1:
return 1
else:
return -1
class LatticePointScene(Scene):
CONFIG = {
"y_radius" : 6,
"x_radius" : None,
... | 31.939519 | 102 | 0.530122 |
ea3f6b6a8060c10a9dd7c43bde2ff8c5cfc5f59f | 1,414 | py | Python | lcof/05-ti-huan-kong-ge-lcof.py | yuenliou/leetcode | e8a1c6cae6547cbcb6e8494be6df685f3e7c837c | [
"MIT"
] | null | null | null | lcof/05-ti-huan-kong-ge-lcof.py | yuenliou/leetcode | e8a1c6cae6547cbcb6e8494be6df685f3e7c837c | [
"MIT"
] | null | null | null | lcof/05-ti-huan-kong-ge-lcof.py | yuenliou/leetcode | e8a1c6cae6547cbcb6e8494be6df685f3e7c837c | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3.7
# -*- coding: utf-8 -*-
from typing import List
class Solution:
def replaceSpace(self, s: str) -> str:
"""考点:原来1个字符现在变成3个字符,空格后面的字符移动次数有重复"""
c = 0
for ch in s:
c += 1 if ch == ' ' else 0
#替换后的长度
len1 = len(s) - 1
len2 = len1 +... | 20.2 | 59 | 0.48727 |
eb3b0b0c8ac16d51a5dac9ae3b3819a99f121f89 | 1,791 | py | Python | clara/transpiler/naive_bayes/gausianNB.py | asergiobranco/clara | bca39620b615d7fefb760f4257bda073f401626b | [
"Apache-2.0"
] | 4 | 2020-07-04T20:37:01.000Z | 2021-01-03T09:10:08.000Z | clara/transpiler/naive_bayes/gausianNB.py | asergiobranco/clara | bca39620b615d7fefb760f4257bda073f401626b | [
"Apache-2.0"
] | null | null | null | clara/transpiler/naive_bayes/gausianNB.py | asergiobranco/clara | bca39620b615d7fefb760f4257bda073f401626b | [
"Apache-2.0"
] | 2 | 2020-09-25T01:59:34.000Z | 2022-02-07T14:14:24.000Z | class GaussianNBTranspiler(object):
def __init__(self, model):
self.model = model
self.n_classes = len(self.model.class_prior_)
self.n_features = len(self.model.theta_[0])
self.build_cls_log()
self.build_theta()
self.build_sigma()
def build_cls_log(self):
... | 27.553846 | 138 | 0.587381 |
e68356916efe900dbe62e5023a959e4365ccce16 | 1,010 | py | Python | model/rnn.py | Milozms/OpenNRE | 93dc39823645bfebcfb562dd734528dc5c3ce12f | [
"MIT"
] | 1 | 2019-10-08T02:53:28.000Z | 2019-10-08T02:53:28.000Z | model/rnn.py | Milozms/OpenNRE | 93dc39823645bfebcfb562dd734528dc5c3ce12f | [
"MIT"
] | null | null | null | model/rnn.py | Milozms/OpenNRE | 93dc39823645bfebcfb562dd734528dc5c3ce12f | [
"MIT"
] | 1 | 2020-07-22T08:39:09.000Z | 2020-07-22T08:39:09.000Z | from framework import Framework
import tensorflow as tf
FLAGS = tf.app.flags.FLAGS
def rnn(is_training):
if is_training:
framework = Framework(is_training=True, use_bag=False)
else:
framework = Framework(is_training=False, use_bag=False)
word_embedding = framework.embedding.word_embedding... | 34.827586 | 93 | 0.730693 |
7ecfbc85bfeee695120c34017393c208d2527ccb | 1,577 | py | Python | com/Leetcode/5.LongestPalindromicSubstring.py | samkitsheth95/InterviewPrep | 6be68c19bcaab4e64a8f646cc64f651bade8ba86 | [
"MIT"
] | null | null | null | com/Leetcode/5.LongestPalindromicSubstring.py | samkitsheth95/InterviewPrep | 6be68c19bcaab4e64a8f646cc64f651bade8ba86 | [
"MIT"
] | null | null | null | com/Leetcode/5.LongestPalindromicSubstring.py | samkitsheth95/InterviewPrep | 6be68c19bcaab4e64a8f646cc64f651bade8ba86 | [
"MIT"
] | null | null | null | from operator import itemgetter
class Solution:
def longestPalindrome(self, s: str) -> str:
n, ans = len(s), ""
for i in range(n):
a = self.helper(s, i, i)
b = self.helper(s, i, i + 1)
ans = max([a, b, ans], key=len)
return ans
def helper(self, s, i... | 29.754717 | 58 | 0.406468 |
86557abd5bde88914ee5b22977cc5a117d18789a | 1,842 | py | Python | ClassRoute.py | Esmeralda2001/IPASS | d3db2b33bec3eb6fb26faea9568ccb4d69986fb5 | [
"MIT"
] | null | null | null | ClassRoute.py | Esmeralda2001/IPASS | d3db2b33bec3eb6fb26faea9568ccb4d69986fb5 | [
"MIT"
] | null | null | null | ClassRoute.py | Esmeralda2001/IPASS | d3db2b33bec3eb6fb26faea9568ccb4d69986fb5 | [
"MIT"
] | null | null | null | class Route:
"""
This module contains the 'Route Class'
An instance of Route has a list that contains instances of class City
"""
def __init__(self, route):
"""
:param route: a list containing instances of class 'City'
"""
self.route = route
self.distance = 0... | 31.220339 | 152 | 0.572747 |
19eb65e2df1e891cb1dcf521dd028eb5ad9c9e2e | 936 | py | Python | step3_hangman.py | singhis2/100DaysofCoding | a11beec0e5974b175c40cb196e49ee7a4c55fbc8 | [
"MIT"
] | null | null | null | step3_hangman.py | singhis2/100DaysofCoding | a11beec0e5974b175c40cb196e49ee7a4c55fbc8 | [
"MIT"
] | null | null | null | step3_hangman.py | singhis2/100DaysofCoding | a11beec0e5974b175c40cb196e49ee7a4c55fbc8 | [
"MIT"
] | null | null | null | #Step 3
import random
word_list = ["aardvark", "baboon", "camel"]
chosen_word = random.choice(word_list)
word_length = len(chosen_word)
#Testing code
print(f'Pssst, the solution is {chosen_word}.')
#Create blanks
display = []
for _ in range(word_length):
display += "_"
#TODO-1: - Use a while loop to let the use... | 29.25 | 223 | 0.69765 |
83ee8109e7ef8ccf9a91aec7f5ec48d98de95233 | 1,778 | py | Python | parsl/__init__.py | raffmont/parsl | 2f843b903a9008d230d42734db48317a40a2ad8e | [
"Apache-2.0"
] | 1 | 2020-11-21T17:32:09.000Z | 2020-11-21T17:32:09.000Z | parsl/__init__.py | raffmont/parsl | 2f843b903a9008d230d42734db48317a40a2ad8e | [
"Apache-2.0"
] | null | null | null | parsl/__init__.py | raffmont/parsl | 2f843b903a9008d230d42734db48317a40a2ad8e | [
"Apache-2.0"
] | null | null | null | """Parsl is a Parallel Scripting Library, designed to enable efficient workflow execution.
Importing
---------
To get all the required functionality, we suggest importing the library as follows:
>>> import parsl
>>> from parsl import *
Constants
---------
AUTO_LOGNAME
Special value that indicates Parsl should c... | 22.506329 | 90 | 0.757593 |
e8a5f5f55ee730e2091053ea09aa22d06b8ba392 | 13,256 | py | Python | model-optimizer/unit_tests/extensions/back/ReverseInputChannels_test.py | evgeniya-egupova/openvino | 4b8d6c59e3444ecdc549bfdf357d19d625479b89 | [
"Apache-2.0"
] | null | null | null | model-optimizer/unit_tests/extensions/back/ReverseInputChannels_test.py | evgeniya-egupova/openvino | 4b8d6c59e3444ecdc549bfdf357d19d625479b89 | [
"Apache-2.0"
] | 44 | 2020-12-09T12:38:22.000Z | 2022-03-28T13:18:29.000Z | model-optimizer/unit_tests/extensions/back/ReverseInputChannels_test.py | rkazants/openvino | a9a583eb42d43322b39b95b164b5b22c4f341111 | [
"Apache-2.0"
] | 2 | 2021-11-18T06:09:04.000Z | 2021-11-30T07:39:47.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
import numpy as np
from extensions.back.ReverseInputChannels import ReverseChannelsPropagationUp, ReverseChannelsPropagationDown, \
InsertReverseChannels
from mo.front.common.partial_infer.utils import int64_array, ... | 54.327869 | 120 | 0.605537 |
92ba67cb98064207289c2bd997c23ffedc25973f | 1,704 | py | Python | vispy/plot/fig.py | hmaarrfk/vispy | 7f3f6f60c8462bb8a3a8fa03344a2e6990b86eb2 | [
"BSD-3-Clause"
] | 3 | 2019-02-28T16:05:33.000Z | 2020-05-03T21:29:03.000Z | vispy/plot/fig.py | hmaarrfk/vispy | 7f3f6f60c8462bb8a3a8fa03344a2e6990b86eb2 | [
"BSD-3-Clause"
] | null | null | null | vispy/plot/fig.py | hmaarrfk/vispy | 7f3f6f60c8462bb8a3a8fa03344a2e6990b86eb2 | [
"BSD-3-Clause"
] | 1 | 2019-04-03T12:49:18.000Z | 2019-04-03T12:49:18.000Z | # -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from ..scene import SceneCanvas
from .plotwidget import PlotWidget
class Fig(SceneCanvas):
"""Create a figure window
Parameters
----------
bg... | 29.894737 | 75 | 0.607394 |
75d501ad2a7e8b957917d3cabc25f95f4d7df1d5 | 2,421 | py | Python | huaweicloud-sdk-ims/huaweicloudsdkims/v2/model/add_image_tag_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-ims/huaweicloudsdkims/v2/model/add_image_tag_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-ims/huaweicloudsdkims/v2/model/add_image_tag_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class AddImageTagResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
... | 28.151163 | 79 | 0.548534 |
b4f3ca5302015309949060339be374d7295ef714 | 825 | py | Python | {{ cookiecutter.repo_name }}/core/setup.py | TBourton/cookiecutter-nectml | 5ab87f7ca1ccc39565c1f4953cdf8a055f9b2c20 | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/core/setup.py | TBourton/cookiecutter-nectml | 5ab87f7ca1ccc39565c1f4953cdf8a055f9b2c20 | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/core/setup.py | TBourton/cookiecutter-nectml | 5ab87f7ca1ccc39565c1f4953cdf8a055f9b2c20 | [
"MIT"
] | null | null | null | """Setup for the {{ cookiecutter.namespace_name }}.core package."""
import os
from setuptools import find_namespace_packages, setup
version = os.environ.get("{{ cookiecutter.namespace_name.upper() }}_VERSION", "0.0.0")
setup(
name="{{ cookiecutter.namespace_name }}.core",
version=version,
description="{{... | 35.869565 | 86 | 0.687273 |
945cbd89cb1a36ed495ccaa59d212af89ec44942 | 2,438 | py | Python | pynes/tests/cpx_test.py | BmanisKing/Mine | d33fc14c84af336ae16fefda2dcebc9f0e1e12ab | [
"BSD-3-Clause"
] | null | null | null | pynes/tests/cpx_test.py | BmanisKing/Mine | d33fc14c84af336ae16fefda2dcebc9f0e1e12ab | [
"BSD-3-Clause"
] | null | null | null | pynes/tests/cpx_test.py | BmanisKing/Mine | d33fc14c84af336ae16fefda2dcebc9f0e1e12ab | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
'''
CPX, Compare with X Test
'''
import unittest
from pynes.compiler import lexical, syntax, semantic
class CpxTest(unittest.TestCase):
def test_cpx_imm(self):
tokens = list(lexical('CPX #$10'))
self.assertEquals(2, len(tokens))
self.assertEquals('T_INSTRUCTION',... | 35.852941 | 64 | 0.611977 |
ecfdd77a68e06b91fdf7bd223fcd878c4c003eb4 | 723 | py | Python | examples/translations/korean_test_1.py | danimaiams/SeleniumBase | b14ee591fd9719c143b765d9c88b58701f0dddfe | [
"MIT"
] | 1 | 2020-10-12T23:09:34.000Z | 2020-10-12T23:09:34.000Z | examples/translations/korean_test_1.py | vitaminaa/SeleniumBase | 873c8d1d1d3758093f7f35f2a10e640795a40529 | [
"MIT"
] | null | null | null | examples/translations/korean_test_1.py | vitaminaa/SeleniumBase | 873c8d1d1d3758093f7f35f2a10e640795a40529 | [
"MIT"
] | null | null | null | # Korean Language Test
from seleniumbase.translate.korean import 셀레늄_테스트_케이스 # noqa
class 테스트_클래스(셀레늄_테스트_케이스):
def test_실시예_1(self):
self.열기("https://ko.wikipedia.org/wiki/")
self.텍스트_확인("위키백과")
self.요소_확인('[title="위키백과:소개"]')
self.텍스트를_업데이트("#searchInput", "김치")
self.클릭... | 32.863636 | 61 | 0.608575 |
2154a164895f8221c9f858576c76078c61b1feb6 | 23,939 | py | Python | code/08_cross_validation.py | alexvmt/Master-Thesis | 805fbf1c59c1dbb682cef627aba5894a9e7ecb61 | [
"MIT"
] | null | null | null | code/08_cross_validation.py | alexvmt/Master-Thesis | 805fbf1c59c1dbb682cef627aba5894a9e7ecb61 | [
"MIT"
] | null | null | null | code/08_cross_validation.py | alexvmt/Master-Thesis | 805fbf1c59c1dbb682cef627aba5894a9e7ecb61 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
##### CROSS VALIDATION #####
print('Starting cross validation...')
# import libraries
from datetime import datetime,date
start_time = datetime.now()
print('Start time: ', start_time)
import os
import sys
params = sys.argv
import numpy as np
import pandas as pd
from random impo... | 50.825902 | 399 | 0.701617 |
cd61a94c21ac1ca18c721ba0dc6bf8904a7ae344 | 1,305 | py | Python | ensysmod/schemas/base_ref_component_region.py | NOWUM/EnSysMod | 18c8a2198db3510e667c1f0298d00a3dfcb0aab7 | [
"MIT"
] | 1 | 2021-12-10T19:41:01.000Z | 2021-12-10T19:41:01.000Z | ensysmod/schemas/base_ref_component_region.py | NOWUM/EnSysMod | 18c8a2198db3510e667c1f0298d00a3dfcb0aab7 | [
"MIT"
] | 83 | 2021-10-20T22:54:28.000Z | 2022-03-24T19:07:06.000Z | ensysmod/schemas/base_ref_component_region.py | NOWUM/EnSysMod | 18c8a2198db3510e667c1f0298d00a3dfcb0aab7 | [
"MIT"
] | null | null | null | from typing import Optional
from pydantic import BaseModel, Field
from ensysmod.schemas.energy_component import EnergyComponent
from ensysmod.schemas.region import Region
class RefCRBaseBase(BaseModel):
"""
Shared attributes for a referenced component region model. Used as a base class for all schemas.
... | 29.659091 | 118 | 0.711111 |
0aeea99ab3c69c841ed4decff46f87889a6f36eb | 6,734 | py | Python | qiskit/transpiler/passes/optimization/template_optimization.py | Roshan-Thomas/qiskit-terra | 77219b5c7b7146b1545c5e5190739b36f4064b2f | [
"Apache-2.0"
] | 1,599 | 2018-07-10T10:59:12.000Z | 2022-03-31T23:56:25.000Z | qiskit/transpiler/passes/optimization/template_optimization.py | Roshan-Thomas/qiskit-terra | 77219b5c7b7146b1545c5e5190739b36f4064b2f | [
"Apache-2.0"
] | 5,244 | 2018-07-10T06:20:13.000Z | 2022-03-31T22:18:48.000Z | qiskit/transpiler/passes/optimization/template_optimization.py | Roshan-Thomas/qiskit-terra | 77219b5c7b7146b1545c5e5190739b36f4064b2f | [
"Apache-2.0"
] | 1,409 | 2018-07-10T02:16:12.000Z | 2022-03-31T09:01:32.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 42.352201 | 100 | 0.657856 |
d1dc8eede5d378dd2ccd0adf52bc2b7ec978367d | 1,063 | py | Python | virus_check1.py | rdapaz/csg5126_assignment2_scripts | 432699a2525d2a35af85ebd990784128c7a11c51 | [
"MIT"
] | null | null | null | virus_check1.py | rdapaz/csg5126_assignment2_scripts | 432699a2525d2a35af85ebd990784128c7a11c51 | [
"MIT"
] | null | null | null | virus_check1.py | rdapaz/csg5126_assignment2_scripts | 432699a2525d2a35af85ebd990784128c7a11c51 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
'''
This gets all inodes associated with one of the sorter folders so that we can
extract the files...
'''
import re
import subprocess
import os
import os.path
api='c54357bc51ad74f136441de19c093c1da7fe66c47f2a77cfd706e26b6385c88c'
print(api)
rex = re.compile(r'(C\:.*)\n'
r'.*\n'
... | 28.72973 | 90 | 0.607714 |
f9129a7144d2a1887abf9ca42bdfc32101a3549c | 1,269 | py | Python | aiida/plugins/factory.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | 1 | 2019-04-29T12:39:31.000Z | 2019-04-29T12:39:31.000Z | aiida/plugins/factory.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | aiida/plugins/factory.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 39.65625 | 79 | 0.553191 |
543b3d606cd0c21307940e2818aef74f7f51eada | 2,242 | py | Python | Day9/Day9.1-2.py | Tomev/Advent-of-Code-2018 | ae27d18879680c018688a0595bd78808f7e8fa2c | [
"Unlicense"
] | null | null | null | Day9/Day9.1-2.py | Tomev/Advent-of-Code-2018 | ae27d18879680c018688a0595bd78808f7e8fa2c | [
"Unlicense"
] | null | null | null | Day9/Day9.1-2.py | Tomev/Advent-of-Code-2018 | ae27d18879680c018688a0595bd78808f7e8fa2c | [
"Unlicense"
] | null | null | null | def play_the_game(players_num, last_marble_score):
winning_score = 0
current_marble = 1
game = [0, 1]
current_player = 1
current_marble_index = 1
players_score = []
for i in range(0, players_num):
players_score.append(0)
while current_marble != last_marble_score:
curren... | 32.970588 | 119 | 0.678858 |
d5e02758b833e25cc2d4975780196a63a7013936 | 31,328 | py | Python | python/ccxt/async_support/liqui.py | honeyligo/ccxt | 74717ffc8171bd8266b49819f7583eb8a0c32da7 | [
"MIT"
] | 5 | 2019-10-31T12:40:40.000Z | 2019-10-31T14:15:01.000Z | python/ccxt/async_support/liqui.py | honeyligo/ccxt | 74717ffc8171bd8266b49819f7583eb8a0c32da7 | [
"MIT"
] | 3 | 2021-03-11T06:16:27.000Z | 2021-05-11T23:09:26.000Z | python/ccxt/async_support/liqui.py | honeyligo/ccxt | 74717ffc8171bd8266b49819f7583eb8a0c32da7 | [
"MIT"
] | 1 | 2019-09-14T03:41:20.000Z | 2019-09-14T03:41:20.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
# -----------------------------------------------------------------------------
try... | 41.221053 | 248 | 0.52477 |
1e3121ab48de9de345bfc64ebd5e018cd0c4b2df | 7,150 | py | Python | uhfqa/python/example_result.py | zhinst/labone-api-examples | 87819e5ed4cbd27b95a1f026a1e23da7aff40bfc | [
"MIT"
] | 9 | 2021-11-23T14:16:00.000Z | 2022-03-08T13:58:34.000Z | uhfqa/python/example_result.py | zhinst/labone-api-examples | 87819e5ed4cbd27b95a1f026a1e23da7aff40bfc | [
"MIT"
] | null | null | null | uhfqa/python/example_result.py | zhinst/labone-api-examples | 87819e5ed4cbd27b95a1f026a1e23da7aff40bfc | [
"MIT"
] | null | null | null | # Copyright 2018 Zurich Instruments AG
"""
Run a basic test of the result unit.
This example demonstrates how to use the result unit for acquiring data
after weighted integration, rotation, and crosstalk suppression.
A single non-zero coefficient in each weighting function is activated. As a
consequence, the result ... | 33.568075 | 93 | 0.670769 |
10937de8b8dde5ba67f9cc123dd14a4aab20212e | 50 | py | Python | logger/__init__.py | Davis-Software/SWC_interface | 2a9584ac8e4a9dd0562a76e2e5ff71042673caad | [
"MIT"
] | null | null | null | logger/__init__.py | Davis-Software/SWC_interface | 2a9584ac8e4a9dd0562a76e2e5ff71042673caad | [
"MIT"
] | null | null | null | logger/__init__.py | Davis-Software/SWC_interface | 2a9584ac8e4a9dd0562a76e2e5ff71042673caad | [
"MIT"
] | null | null | null | from .logger_module import LoggerModule as Logger
| 25 | 49 | 0.86 |
318c3c07c80b2c77d9377be6f578cd380771bb9a | 365 | py | Python | Python/shiftLetters.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 1 | 2020-12-10T05:36:15.000Z | 2020-12-10T05:36:15.000Z | Python/shiftLetters.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | null | null | null | Python/shiftLetters.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 3 | 2020-04-06T05:55:08.000Z | 2021-08-29T14:26:54.000Z | class Solution:
def stringShift(self, s: str, shift: List[List[int]]) -> str:
move = 0
# left: -1, right: 1
for direction, amount in shift:
x = direction if direction == 1 else -1
move += x * amount
move = move % len(s)
return s[-move: ] + ... | 26.071429 | 65 | 0.441096 |
ed541885949ad97f153ac0785eccad0ee41a974b | 2,149 | py | Python | src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_maintenance_client_enums.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 2 | 2021-06-05T17:51:26.000Z | 2021-11-17T11:17:56.000Z | src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_maintenance_client_enums.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 3 | 2020-05-27T20:16:26.000Z | 2020-07-23T19:46:49.000Z | src/maintenance/azext_maintenance/vendored_sdks/maintenance/models/_maintenance_client_enums.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 5 | 2020-05-09T17:47:09.000Z | 2020-10-01T19:52:06.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 31.602941 | 94 | 0.638436 |
a7623f86d66014e3912c048c05878fd0292c069a | 112 | py | Python | app/exceptions.py | golem4300/quattran | 8ab49be9fce99d52384ada0defc94f3a0f4afff1 | [
"MIT"
] | 183 | 2016-07-23T22:29:18.000Z | 2016-09-25T15:39:10.000Z | app/exceptions.py | OpenPoGo/OpenPoGo | 02a6c955a36e25f7dd7d325f20ea9d6f5418a911 | [
"MIT"
] | 354 | 2016-07-23T21:43:27.000Z | 2016-09-15T21:01:39.000Z | app/exceptions.py | OpenPoGo/OpenPoGo | 02a6c955a36e25f7dd7d325f20ea9d6f5418a911 | [
"MIT"
] | 104 | 2016-07-23T22:28:58.000Z | 2016-09-09T11:28:01.000Z | class ServiceNotFoundException(Exception):
pass
class ContainerAlreadyBootedException(Exception):
pass
| 18.666667 | 49 | 0.8125 |
20ce2537b8e874594f52d86f6f57bc4f89c9aa47 | 6,066 | py | Python | tests/core/db/test_db_submission.py | bcdev/ocdb-server | 027078f2b022a06b3a417d76d273514a72f8cac7 | [
"MIT"
] | null | null | null | tests/core/db/test_db_submission.py | bcdev/ocdb-server | 027078f2b022a06b3a417d76d273514a72f8cac7 | [
"MIT"
] | 1 | 2019-06-21T09:43:01.000Z | 2019-06-21T09:43:01.000Z | tests/core/db/test_db_submission.py | bcdev/ocdb-server | 027078f2b022a06b3a417d76d273514a72f8cac7 | [
"MIT"
] | null | null | null | from datetime import datetime
from unittest import TestCase
from eocdb.core.db.db_submission import DbSubmission
from eocdb.core.models import DatasetValidationResult, Issue, QC_STATUS_SUBMITTED, QC_STATUS_VALIDATED
from eocdb.core.models.submission_file import SubmissionFile
class DbSubmissionTest(TestCase):
d... | 54.160714 | 119 | 0.431751 |
3e64e674c713eeefdc8db14e3d5c02c79b4268bf | 4,670 | py | Python | xlsxwriter/test/worksheet/test_worksheet06.py | shareablee/XlsxWriter | 3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/worksheet/test_worksheet06.py | shareablee/XlsxWriter | 3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/worksheet/test_worksheet06.py | shareablee/XlsxWriter | 3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ..helperfunctions import _xml_to_list
from ...worksheet import Worksheet
from ...shareds... | 33.597122 | 171 | 0.557173 |
936b2126471849361dd3f5a18c480739f4aeca89 | 27,112 | py | Python | aiogram/types/chat.py | cybernet/aiogram | 3783e7052a5b1be2c97f5f767ad7f3ecf6f75b37 | [
"MIT"
] | null | null | null | aiogram/types/chat.py | cybernet/aiogram | 3783e7052a5b1be2c97f5f767ad7f3ecf6f75b37 | [
"MIT"
] | null | null | null | aiogram/types/chat.py | cybernet/aiogram | 3783e7052a5b1be2c97f5f767ad7f3ecf6f75b37 | [
"MIT"
] | null | null | null | from __future__ import annotations
import asyncio
import datetime
import typing
from ..utils import helper, markdown
from . import base, fields
from .chat_member import ChatMember
from .chat_permissions import ChatPermissions
from .chat_photo import ChatPhoto
from .input_file import InputFile
class Chat(base.Telegr... | 38.842407 | 127 | 0.634774 |
97cd49754042cbb119d4ff08e897c92efd4b188e | 392 | py | Python | project_name/wsgi.py | lzantal/djskell | cef71bab8a4dd163b632128666c315e228cc8f0f | [
"MIT"
] | 4 | 2018-08-06T19:18:03.000Z | 2019-09-26T14:52:01.000Z | project_name/wsgi.py | lzantal/djskell | cef71bab8a4dd163b632128666c315e228cc8f0f | [
"MIT"
] | 2 | 2018-08-06T19:17:57.000Z | 2020-02-12T22:59:40.000Z | project_name/wsgi.py | lzantal/djskell | cef71bab8a4dd163b632128666c315e228cc8f0f | [
"MIT"
] | null | null | null | """
WSGI config for project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODU... | 23.058824 | 78 | 0.778061 |
77906bff6b2ccd4737c075f4e93e6a350879cce8 | 20,644 | py | Python | lib/galaxy/jobs/runners/drmaa.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/jobs/runners/drmaa.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/jobs/runners/drmaa.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | null | null | null | """
Job control via the DRMAA API.
"""
from __future__ import absolute_import
import json
import logging
import os
import shlex
import string
import subprocess
import time
from galaxy import model
from galaxy.jobs import JobDestination
from galaxy.jobs.handler import DEFAULT_JOB_PUT_FAILURE_MESSAGE
from galaxy.jobs.r... | 48.009302 | 178 | 0.636262 |
fdfd8a6f31c54ad25c8360e83b00d6ed41ea47cc | 1,261 | py | Python | QCompute/QuantumPlatform/Error.py | rickyHong/Qcompute-repl | 588b46020af209938f370032185ee8fe3e300795 | [
"Apache-2.0"
] | null | null | null | QCompute/QuantumPlatform/Error.py | rickyHong/Qcompute-repl | 588b46020af209938f370032185ee8fe3e300795 | [
"Apache-2.0"
] | null | null | null | QCompute/QuantumPlatform/Error.py | rickyHong/Qcompute-repl | 588b46020af209938f370032185ee8fe3e300795 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf8 -*-
# Copyright (c) 2020 Baidu, 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... | 17.513889 | 74 | 0.651071 |
6fe683c291b08eadd457b23d88f42325ef010723 | 1,262 | py | Python | src/db/types/predicates.py | wqian94/retrodb | e0a5655a5986f46872230d0ace8a4a28dab71f28 | [
"MIT"
] | null | null | null | src/db/types/predicates.py | wqian94/retrodb | e0a5655a5986f46872230d0ace8a4a28dab71f28 | [
"MIT"
] | null | null | null | src/db/types/predicates.py | wqian94/retrodb | e0a5655a5986f46872230d0ace8a4a28dab71f28 | [
"MIT"
] | null | null | null | """ Library for predicates during queries. """
import abc
import db.rtype as rtype
# General superclass for all predicates
class Predicate(rtype.RType):
@abc.abstractmethod
def before_query(self):
"""
Function to run at the beginning of a query chain.
Useful for aggregations that have things to res... | 21.758621 | 73 | 0.676704 |
8e0a191ef1ba452227995277e9bc2bf9eda8b478 | 2,067 | py | Python | game_of_life/game_of_life_win.py | wangwanglulu/workstation | cee21f6241448f40e6ecb528607ee551f5371f73 | [
"CC-BY-3.0"
] | null | null | null | game_of_life/game_of_life_win.py | wangwanglulu/workstation | cee21f6241448f40e6ecb528607ee551f5371f73 | [
"CC-BY-3.0"
] | null | null | null | game_of_life/game_of_life_win.py | wangwanglulu/workstation | cee21f6241448f40e6ecb528607ee551f5371f73 | [
"CC-BY-3.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 18 14:43:03 2018
@author: LU WANG
"""
'''
Game of life
author: Pleiades
'''
import os
import random
width = 60
height = 60
screen = []
def Init():
for i in range(height):
line = []
for j in range(width):
if rand... | 21.091837 | 51 | 0.472666 |
dadf4b22d31f64911b2c9cbfa424c2d6c079504d | 1,518 | py | Python | V.BETA/claseTerreno.py | Muteado/proyecto | 54cf8babe150a33f75851f6686094de8f743d332 | [
"MIT"
] | null | null | null | V.BETA/claseTerreno.py | Muteado/proyecto | 54cf8babe150a33f75851f6686094de8f743d332 | [
"MIT"
] | null | null | null | V.BETA/claseTerreno.py | Muteado/proyecto | 54cf8babe150a33f75851f6686094de8f743d332 | [
"MIT"
] | null | null | null | class Terreno:
def __init__(self):
pass
'''
def generar_terreno(posicion):
##TERRENO##
pygame.draw.rect(Pant,Verde, #Suelo
(0,
Pant.get_height()/2,
Pant.get_width(),
Pant.get_height()/2))
pygame.dr... | 38.923077 | 69 | 0.482213 |
a9a0a23431710ab27f150af17c9042452b6e359f | 4,782 | py | Python | pkgs/development/tools/analysis/radare2/update.py | collinwright/nixpkgs | d5178d65199b652c8cebab78c0e847c3a2523b40 | [
"MIT"
] | 3 | 2018-01-09T07:43:47.000Z | 2021-06-28T09:26:00.000Z | pkgs/development/tools/analysis/radare2/update.py | collinwright/nixpkgs | d5178d65199b652c8cebab78c0e847c3a2523b40 | [
"MIT"
] | 9 | 2017-06-12T12:41:58.000Z | 2018-10-19T20:14:26.000Z | pkgs/development/tools/analysis/radare2/update.py | collinwright/nixpkgs | d5178d65199b652c8cebab78c0e847c3a2523b40 | [
"MIT"
] | 11 | 2017-05-10T20:12:58.000Z | 2021-12-05T06:42:57.000Z | #!/usr/bin/env nix-shell
#!nix-shell -p nix -p python3 -p git -i python
# USAGE - just run the script: ./update.py
# When editing this file, make also sure it passes the mypy typecheck
# and is formatted with black.
import fileinput
import json
import xml.etree.ElementTree as ET
from urllib.parse import urlparse
import... | 30.851613 | 99 | 0.59724 |
d308af55e360b6f8f3b8238e4cad019c81fdbb4a | 293 | py | Python | pydec/dec/__init__.py | hirani/pydec | 0574d1148952510b0e59b1f5cb1d9a673193be7f | [
"BSD-3-Clause"
] | 49 | 2016-07-03T14:40:48.000Z | 2022-03-08T01:33:03.000Z | pydec/dec/__init__.py | hirani/pydec | 0574d1148952510b0e59b1f5cb1d9a673193be7f | [
"BSD-3-Clause"
] | 4 | 2016-09-16T18:51:06.000Z | 2020-06-20T03:53:24.000Z | pydec/dec/__init__.py | hirani/pydec | 0574d1148952510b0e59b1f5cb1d9a673193be7f | [
"BSD-3-Clause"
] | 15 | 2015-09-26T20:06:57.000Z | 2021-06-21T17:01:02.000Z | "DEC data structures and algorithms"
from .info import __doc__
from .rips_complex import *
from .cochain import *
from .simplicial_complex import *
from .regular_cube_complex import *
from .abstract_simplicial_complex import *
__all__ = list(filter(lambda s:not s.startswith('_'), dir()))
| 22.538462 | 61 | 0.774744 |
7b66206a250e39c196cacc7f601753c82020607e | 1,773 | py | Python | apps/accounts/models.py | yaskh/EvalAI | 2a47ec998010a48f8d04d5ee700326ddd0a11a94 | [
"BSD-3-Clause"
] | 2 | 2020-01-31T16:21:05.000Z | 2020-05-16T12:08:15.000Z | apps/accounts/models.py | yaskh/EvalAI | 2a47ec998010a48f8d04d5ee700326ddd0a11a94 | [
"BSD-3-Clause"
] | 388 | 2020-01-21T23:34:10.000Z | 2021-08-02T23:39:21.000Z | apps/accounts/models.py | yaskh/EvalAI | 2a47ec998010a48f8d04d5ee700326ddd0a11a94 | [
"BSD-3-Clause"
] | 1 | 2020-10-03T04:37:58.000Z | 2020-10-03T04:37:58.000Z | from __future__ import unicode_literals
from django.db import models
from django.db.models.signals import post_save
from django.contrib.auth.models import User
from django.dispatch import receiver
from base.models import TimeStampedModel
class UserStatus(TimeStampedModel):
"""
Model representing the status ... | 28.142857 | 79 | 0.693739 |
0550887222fecdc175e05e6016614f75e02e6c83 | 1,509 | py | Python | app/__init__.py | SimonAwiti/my-web-app | c5a35976ebf84b8ce712dea258f9101a6ab4b783 | [
"MIT"
] | 1 | 2019-04-24T07:42:04.000Z | 2019-04-24T07:42:04.000Z | app/__init__.py | SimonAwiti/my-web-app | c5a35976ebf84b8ce712dea258f9101a6ab4b783 | [
"MIT"
] | null | null | null | app/__init__.py | SimonAwiti/my-web-app | c5a35976ebf84b8ce712dea258f9101a6ab4b783 | [
"MIT"
] | null | null | null | '''Creating app'''
import os
from flask import Flask, redirect, jsonify
from flask_restful import Api
from flask_cors import CORS
from datetime import datetime, timedelta
from instance.config import app_config
from app.views.views import NewMessage
"""importing the configurations from the .config file which is in ... | 31.4375 | 98 | 0.698476 |
9935c4a57989e75c47af26228e048be0395055df | 5,814 | py | Python | 3rdParty/waf/waflib/Tools/waf_unit_test.py | FXTi/peachfuzz-code | 7ec04adb11f001b06ffb2b1415cc7723101486d3 | [
"MIT"
] | 10 | 2017-06-18T19:40:23.000Z | 2022-03-09T08:09:44.000Z | 3rdParty/waf/waflib/Tools/waf_unit_test.py | FXTi/peachfuzz-code | 7ec04adb11f001b06ffb2b1415cc7723101486d3 | [
"MIT"
] | 2 | 2019-07-01T12:39:41.000Z | 2020-11-09T11:40:54.000Z | 3rdParty/waf/waflib/Tools/waf_unit_test.py | FXTi/peachfuzz-code | 7ec04adb11f001b06ffb2b1415cc7723101486d3 | [
"MIT"
] | 11 | 2016-07-01T02:21:06.000Z | 2020-11-23T08:29:22.000Z | #!/usr/bin/env python
# encoding: utf-8
# Carlos Rafael Giani, 2006
# Thomas Nagy, 2010
"""
Unit testing system for C/C++/D providing test execution:
* in parallel, by using ``waf -j``
* partial (only the tests that have changed) or full (by using ``waf --alltests``)
The tests are declared by adding the **test** fea... | 30.439791 | 122 | 0.683007 |
a7b038128d182c8bb4780e8f810f73fdb70cb392 | 6,577 | py | Python | packages/infra_libs/infra_libs/test/bqh_test.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | null | null | null | packages/infra_libs/infra_libs/test/bqh_test.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | 7 | 2022-02-15T01:11:37.000Z | 2022-03-02T12:46:13.000Z | packages/infra_libs/infra_libs/test/bqh_test.py | NDevTK/chromium-infra | d38e088e158d81f7f2065a38aa1ea1894f735ec4 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import datetime
import json
import mock
import unittest
from mock import patch
from google.protobuf import duration_pb2
from google.protobuf import empty_pb... | 31.620192 | 77 | 0.618671 |
312c117fcd6513cc9b26a0ad9051f1385cc7d65c | 1,669 | py | Python | decorator.py | bossiernesto/python-snipplets | 26e3e7f651d782abc57389b6b88b4bafeb79540f | [
"BSD-3-Clause"
] | null | null | null | decorator.py | bossiernesto/python-snipplets | 26e3e7f651d782abc57389b6b88b4bafeb79540f | [
"BSD-3-Clause"
] | null | null | null | decorator.py | bossiernesto/python-snipplets | 26e3e7f651d782abc57389b6b88b4bafeb79540f | [
"BSD-3-Clause"
] | null | null | null | __author__ = 'b03418'
import sys
try:
from functools import partial
except ImportError: # python < 2.5
class partial(object): #Simple partial object to replace
def __init__(self, func, *args, **keywords):
self.func = func
self.args = args
self.keywords = keywords
... | 25.287879 | 83 | 0.650689 |
b24bfa817486063040187e3c0d50a665083bd89f | 3,736 | py | Python | launchpad/program.py | deepmind/launchpad | 4e82e6c458aa2e7550261551a3c8355ad332dc80 | [
"Apache-2.0"
] | 264 | 2021-04-22T12:55:07.000Z | 2022-03-26T05:55:13.000Z | launchpad/program.py | deepmind/launchpad | 4e82e6c458aa2e7550261551a3c8355ad332dc80 | [
"Apache-2.0"
] | 22 | 2021-04-22T18:00:13.000Z | 2022-03-30T01:45:08.000Z | launchpad/program.py | deepmind/launchpad | 4e82e6c458aa2e7550261551a3c8355ad332dc80 | [
"Apache-2.0"
] | 21 | 2021-04-22T19:20:28.000Z | 2022-03-16T05:36:27.000Z | # Lint as: python3
# Copyright 2020 DeepMind Technologies 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
#
# ... | 29.650794 | 78 | 0.687634 |
66b954c25a9f35583bd68d979779ad6e1b930996 | 30,530 | py | Python | plugins/revealer/qt.py | DNotesCoin/electrum-DNotes | daa3396598509bdb76051478f7a3eee3a8007174 | [
"MIT"
] | null | null | null | plugins/revealer/qt.py | DNotesCoin/electrum-DNotes | daa3396598509bdb76051478f7a3eee3a8007174 | [
"MIT"
] | null | null | null | plugins/revealer/qt.py | DNotesCoin/electrum-DNotes | daa3396598509bdb76051478f7a3eee3a8007174 | [
"MIT"
] | null | null | null | '''
Revealer
So you have something to hide?
plug-in for the electrum-dnotes wallet.
Features:
- Deep Cold multi-factor backup solution
- Safety - One time pad security
- Redundancy - Trustless printing & distribution
- Encrypt your seedphrase or any secret you want for your revealer
- Based on c... | 42.168508 | 144 | 0.577792 |
5db81054799f99b99a0a01467ec0ec68d119a2cd | 960 | py | Python | migrations/versions/46155f63422c_.py | pierous/sarna | f7d92193c98f25cc0d0516b3aedc6d13b7ab2a0d | [
"MIT"
] | 1 | 2022-03-15T10:55:55.000Z | 2022-03-15T10:55:55.000Z | migrations/versions/46155f63422c_.py | pierous/sarna | f7d92193c98f25cc0d0516b3aedc6d13b7ab2a0d | [
"MIT"
] | null | null | null | migrations/versions/46155f63422c_.py | pierous/sarna | f7d92193c98f25cc0d0516b3aedc6d13b7ab2a0d | [
"MIT"
] | 1 | 2022-03-15T10:56:58.000Z | 2022-03-15T10:56:58.000Z | """empty message
Revision ID: 46155f63422c
Revises: 357612dfa45b
Create Date: 2018-07-20 05:00:35.859996
"""
from alembic import op
import sqlalchemy as sa
import sarna
# revision identifiers, used by Alembic.
revision = '46155f63422c'
down_revision = '357612dfa45b'
branch_labels = None
depends_on = None
def upgr... | 30 | 154 | 0.740625 |
de22221d355faaf40b1038d87a9beaacae4ec20b | 1,601 | py | Python | venv1/Lib/site-packages/tensorflow/contrib/gan/python/estimator/__init__.py | Soum-Soum/Tensorflow_Face_Finder | fec6c15d2df7012608511ad87f4b55731bf99478 | [
"Apache-2.0",
"MIT"
] | null | null | null | venv1/Lib/site-packages/tensorflow/contrib/gan/python/estimator/__init__.py | Soum-Soum/Tensorflow_Face_Finder | fec6c15d2df7012608511ad87f4b55731bf99478 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-05-20T00:58:04.000Z | 2021-05-20T00:58:04.000Z | venv1/Lib/site-packages/tensorflow/contrib/gan/python/estimator/__init__.py | Soum-Soum/Tensorflow_Face_Finder | fec6c15d2df7012608511ad87f4b55731bf99478 | [
"Apache-2.0",
"MIT"
] | null | null | null | # 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 ... | 39.04878 | 81 | 0.740162 |
8e411153ff3d7ba239e963b50aa4d50821767933 | 2,562 | py | Python | apps/tester.py | jougs/yaada | 5ec13e2b3828e772d4b3ca2827152d51788e7b81 | [
"MIT"
] | null | null | null | apps/tester.py | jougs/yaada | 5ec13e2b3828e772d4b3ca2827152d51788e7b81 | [
"MIT"
] | null | null | null | apps/tester.py | jougs/yaada | 5ec13e2b3828e772d4b3ca2827152d51788e7b81 | [
"MIT"
] | 1 | 2021-10-01T13:58:22.000Z | 2021-10-01T13:58:22.000Z | import json
import hassapi as hass
class Tester(hass.Hass):
lights = {
"light.diningroom_bar1_light": {"state": "on", "brightness": 255},
}
buttons = {
"input/kitchen_hallwaydoor": "cooking",
}
def initialize(self):
"""Initialize the App
This function is... | 30.141176 | 96 | 0.615144 |
1e030db7a03b1e80ca477a22fe1c39cb2b894b4b | 3,789 | py | Python | sizer.py | tawalaya/cat-sizer | 109614877be03d98377bfec8cbf51d73550ef449 | [
"MIT"
] | null | null | null | sizer.py | tawalaya/cat-sizer | 109614877be03d98377bfec8cbf51d73550ef449 | [
"MIT"
] | null | null | null | sizer.py | tawalaya/cat-sizer | 109614877be03d98377bfec8cbf51d73550ef449 | [
"MIT"
] | null | null | null |
import json
from util.utils import get_recursively
from sizer.regression_sizer import RegressionSizer
from sizer.workflow_sizer import WorkflowSizer
class State:
def __init__(self, name, arn, state_dict, start, end):
self.name = name
self.arn = arn
self.state_dict = state_dict
self... | 26.3125 | 149 | 0.583267 |
3d8afbab8ee8405d90da0f1c0480fce1f43b5015 | 4,579 | py | Python | dump1090_logrotate/dump1090_logrotate.py | bzamecnik/dump1090-archive | d2aa4397491786dbbf4614d16138f090187ab4f2 | [
"MIT"
] | 2 | 2016-10-04T16:23:36.000Z | 2019-10-15T19:50:24.000Z | dump1090_logrotate/dump1090_logrotate.py | bzamecnik/dump1090-archive | d2aa4397491786dbbf4614d16138f090187ab4f2 | [
"MIT"
] | 8 | 2016-09-30T12:27:06.000Z | 2019-04-17T15:34:05.000Z | dump1090_logrotate/dump1090_logrotate.py | bzamecnik/dump1090-archive | d2aa4397491786dbbf4614d16138f090187ab4f2 | [
"MIT"
] | null | null | null | """
This module reads ADS-B messages from dump1090 over the 30003 port and stores
them to compressed CSV files which are partitioned by time (eg. hours).
Usage:
$ python dump1090_logrotate.py -h localhost -p 30003 -o logs/dump1090 -i hour
Stores files file like:
logs/dump1090-2016-10-03-17-00-00-1475514000.csv.gz
lo... | 33.918519 | 112 | 0.654073 |
974198bb6ddc9acb3efdd8cb6135fe825c67af15 | 5,633 | py | Python | setup/docker/docker_run.py | weigao95/spartan | cf9cc0be31152b7c492ba3ec1ed101c2d631d999 | [
"BSD-3-Clause-Clear"
] | null | null | null | setup/docker/docker_run.py | weigao95/spartan | cf9cc0be31152b7c492ba3ec1ed101c2d631d999 | [
"BSD-3-Clause-Clear"
] | null | null | null | setup/docker/docker_run.py | weigao95/spartan | cf9cc0be31152b7c492ba3ec1ed101c2d631d999 | [
"BSD-3-Clause-Clear"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import argparse
import os
import getpass
import yaml
import socket
user_name = getpass.getuser()
host_name = socket.gethostname()
DATA_DIRECTORY_ON_HOST = '/home/' + user_name + '/data/spartan'
CONFIG_FILE = os.path.join(os.getcwd(), 'setup/docker/docker_r... | 39.669014 | 215 | 0.646015 |
59c979d4e27a0f874c661254107f5d99abbe41f1 | 473 | py | Python | desensitize/implement/phone.py | aws-samples/desensitize-cn | 3992837e22b521ee460f3fb8b228c7eecc029d08 | [
"MIT-0"
] | null | null | null | desensitize/implement/phone.py | aws-samples/desensitize-cn | 3992837e22b521ee460f3fb8b228c7eecc029d08 | [
"MIT-0"
] | null | null | null | desensitize/implement/phone.py | aws-samples/desensitize-cn | 3992837e22b521ee460f3fb8b228c7eecc029d08 | [
"MIT-0"
] | 1 | 2021-06-10T19:00:39.000Z | 2021-06-10T19:00:39.000Z | from .base import Implement
import hashlib
class PhoneImplement(Implement):
type = 'phone'
"""
@property
def compliance(self):
content = self.text.decode("utf-8")
content_len = len(self.text)
marked=content[0:3]+"*"*(content_len-7)+content[-4:]
return marked
"""
... | 21.5 | 60 | 0.591966 |
1dbf1b0de4f211d8d313bcb129f1a039e1bc2003 | 3,298 | py | Python | language/serene/claim_tfds.py | Xtuden-com/language | 70c0328968d5ffa1201c6fdecde45bbc4fec19fc | [
"Apache-2.0"
] | 1,199 | 2018-10-16T01:30:18.000Z | 2022-03-31T21:05:24.000Z | language/serene/claim_tfds.py | Xtuden-com/language | 70c0328968d5ffa1201c6fdecde45bbc4fec19fc | [
"Apache-2.0"
] | 116 | 2018-10-18T03:31:46.000Z | 2022-03-24T13:40:50.000Z | language/serene/claim_tfds.py | Xtuden-com/language | 70c0328968d5ffa1201c6fdecde45bbc4fec19fc | [
"Apache-2.0"
] | 303 | 2018-10-22T12:35:12.000Z | 2022-03-27T17:38:17.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... | 32.653465 | 77 | 0.620376 |
2628ccdd63dc1b5dee337b77db21d3a07cb54e01 | 1,813 | py | Python | dbbackup/storage/filesystem_storage.py | UbuntuEvangelist/django-dbbackup | 775cff19f4dbf1a4e25d92fea1b690794864bfcf | [
"BSD-3-Clause"
] | null | null | null | dbbackup/storage/filesystem_storage.py | UbuntuEvangelist/django-dbbackup | 775cff19f4dbf1a4e25d92fea1b690794864bfcf | [
"BSD-3-Clause"
] | null | null | null | dbbackup/storage/filesystem_storage.py | UbuntuEvangelist/django-dbbackup | 775cff19f4dbf1a4e25d92fea1b690794864bfcf | [
"BSD-3-Clause"
] | 15 | 2017-01-12T10:38:40.000Z | 2019-04-19T08:26:59.000Z | """
Filesystem Storage API.
"""
from __future__ import (absolute_import, division,
print_function, unicode_literals)
import warnings
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from .base import StorageError
from .builtin_django import Storage as Dj... | 38.574468 | 79 | 0.608384 |
0cc92092e432a5982bac052f49d3f0b652c371e0 | 595 | py | Python | playground/bridge/metrics.py | murlokito/playground | 405a7091bbfd6705db967e872ed6c4591bd892e6 | [
"MIT"
] | null | null | null | playground/bridge/metrics.py | murlokito/playground | 405a7091bbfd6705db967e872ed6c4591bd892e6 | [
"MIT"
] | null | null | null | playground/bridge/metrics.py | murlokito/playground | 405a7091bbfd6705db967e872ed6c4591bd892e6 | [
"MIT"
] | null | null | null | __title__ = "simulation"
__author__ = "murlux"
__copyright__ = "Copyright 2019, " + __author__
__credits__ = (__author__, )
__license__ = "MIT"
__email__ = "murlux@protonmail.com"
# Global imports
from typing import Any, Dict, List, Optional
# Local imports
from playground.util import setup_logger
from playground.abs... | 23.8 | 51 | 0.685714 |
df6fb48dc611347e798fac2ea0a1f38ae6f5633f | 2,363 | py | Python | computation/turing_machine/rule.py | kigawas/computation-py | 4e1dc356c03b845cae1218a244ad2f2ce2b10132 | [
"MIT"
] | 24 | 2016-04-16T09:10:15.000Z | 2022-03-14T08:44:48.000Z | computation/turing_machine/rule.py | kigawas/computation-py | 4e1dc356c03b845cae1218a244ad2f2ce2b10132 | [
"MIT"
] | 10 | 2020-11-29T13:01:09.000Z | 2022-01-22T13:14:32.000Z | computation/turing_machine/rule.py | kigawas/computation-py | 4e1dc356c03b845cae1218a244ad2f2ce2b10132 | [
"MIT"
] | 2 | 2019-09-21T15:07:41.000Z | 2021-03-14T13:38:10.000Z | from dataclasses import dataclass
from enum import Enum, auto
from typing import List
from ..exceptions import Unreachable
from ..utils import detect
from .tape import Tape, TMConfiguration
class Direction(Enum):
LEFT = auto()
RIGHT = auto()
@dataclass
class TMRule:
state: int
character: str
ne... | 26.852273 | 78 | 0.677105 |
36b64db300998fb1f7305b201c9023b207b1e212 | 11,595 | py | Python | pycket/vector.py | krono/pycket | 5eff3401ce5cf34b16863b669ac9e274edabbe00 | [
"MIT"
] | null | null | null | pycket/vector.py | krono/pycket | 5eff3401ce5cf34b16863b669ac9e274edabbe00 | [
"MIT"
] | null | null | null | pycket/vector.py | krono/pycket | 5eff3401ce5cf34b16863b669ac9e274edabbe00 | [
"MIT"
] | null | null | null |
from pycket.values import W_MVector, W_VectorSuper, W_Fixnum, W_Flonum, W_Character, UNROLLING_CUTOFF
from pycket.base import W_Object, SingletonMeta
from pycket import config
from rpython.rlib import rerased
from rpython.rlib.objectmodel import newlist_hint, import_from_mixin
from rpython.rlib import debug, jit
@j... | 31.337838 | 101 | 0.671669 |
50b586ad03ba1c3706f5320726ca7a208f8b284d | 24,465 | py | Python | immp/hook/command.py | raveinid/IMMP | 49367296d055600701123ffff61fcd4cb31cfafd | [
"BSD-3-Clause"
] | null | null | null | immp/hook/command.py | raveinid/IMMP | 49367296d055600701123ffff61fcd4cb31cfafd | [
"BSD-3-Clause"
] | null | null | null | immp/hook/command.py | raveinid/IMMP | 49367296d055600701123ffff61fcd4cb31cfafd | [
"BSD-3-Clause"
] | null | null | null | """
Backbone for other hooks to process commands contained in channel messages.
Config:
prefix (str):
Characters at the start of a message to denote commands. Use a single character to
make commands top-level (e.g. ``"?"`` would allow commands like ``?help``), or a string
followed by a spa... | 38.588328 | 99 | 0.589822 |
9cf9252639a0747318716204fed1d66ed2c9d6ce | 635 | py | Python | test/figs/fe_pdi/make_table.py | jamesETsmith/2021_09_24_pyscf_overview_talk | e121c6754dc3854b868f9753a56543f79a8f68a0 | [
"MIT"
] | 1 | 2021-09-17T06:11:48.000Z | 2021-09-17T06:11:48.000Z | test/figs/fe_pdi/make_table.py | jamesETsmith/2021_09_24_pyscf_overview_talk | e121c6754dc3854b868f9753a56543f79a8f68a0 | [
"MIT"
] | null | null | null | test/figs/fe_pdi/make_table.py | jamesETsmith/2021_09_24_pyscf_overview_talk | e121c6754dc3854b868f9753a56543f79a8f68a0 | [
"MIT"
] | null | null | null | import pandas as pd
df = pd.read_csv("1_A.csv", index_col=0)
cols = [
"DFT Opt. Strategy",
"UHF Opt. Strategy",
"Stable",
"Energy (Ha)",
"Fe Spin Density",
"<S^2>",
"HONO-1",
"HONO",
"LUNO",
"LUNO+1",
]
df = df[cols]
df = df[df["Stable"] == True]
print(df)
formatters = {
"En... | 21.896552 | 58 | 0.516535 |
0a3c99cf004c6aeea2c79505b0b2fcefc322c361 | 3,573 | py | Python | sphinxcontrib/confluencebuilder/__main__.py | tonybaloney/sphinx-confluencebuilder | fd71fb5d5038b80fa3623dd673c198959dfbab03 | [
"BSD-2-Clause"
] | 90 | 2016-07-21T00:39:19.000Z | 2019-03-08T08:27:17.000Z | sphinxcontrib/confluencebuilder/__main__.py | tonybaloney/sphinx-confluencebuilder | fd71fb5d5038b80fa3623dd673c198959dfbab03 | [
"BSD-2-Clause"
] | 124 | 2016-10-18T20:06:48.000Z | 2019-03-08T04:41:53.000Z | sphinxcontrib/confluencebuilder/__main__.py | tonybaloney/sphinx-confluencebuilder | fd71fb5d5038b80fa3623dd673c198959dfbab03 | [
"BSD-2-Clause"
] | 39 | 2016-07-21T00:39:52.000Z | 2019-03-06T14:33:31.000Z | # -*- coding: utf-8 -*-
"""
:copyright: Copyright 2017-2021 Sphinx Confluence Builder Contributors (AUTHORS)
:license: BSD-2-Clause (LICENSE)
"""
from sphinx.util.console import color_terminal
from sphinx.util.console import nocolor # pylint: disable=no-name-in-module
from sphinxcontrib.confluencebuilder import __ver... | 33.707547 | 80 | 0.661909 |
cf18fb1fe0c40f3fb33b63dd7e0a84595fe1aa6f | 8,078 | py | Python | gnn-tracking/heptrkx/nx_graph/prepare.py | kf7lsu/exatrkx-neurips19 | d5495966282112daabc03999d851ea3374aa2087 | [
"BSD-3-Clause"
] | 1 | 2021-05-28T01:43:41.000Z | 2021-05-28T01:43:41.000Z | gnn-tracking/heptrkx/nx_graph/prepare.py | kf7lsu/exatrkx-neurips19 | d5495966282112daabc03999d851ea3374aa2087 | [
"BSD-3-Clause"
] | null | null | null | gnn-tracking/heptrkx/nx_graph/prepare.py | kf7lsu/exatrkx-neurips19 | d5495966282112daabc03999d851ea3374aa2087 | [
"BSD-3-Clause"
] | 2 | 2021-04-21T03:47:07.000Z | 2021-11-09T23:08:40.000Z | """
convert hitgraphs to network-x and prepare graphs for graph-nets
"""
import numpy as np
from ..datasets.graph import load_graph
import networkx as nx
from graph_nets import utils_np
from . import utils_io
import os
import glob
import re
import random
def load_data_dicts(file_name):
try:
with np.lo... | 33.106557 | 116 | 0.627878 |
1cb87cdd985be28e2176e22f101f507092c259a1 | 586 | py | Python | server/madmin_barcodes.py | mrngm/madmin | 19067ac41f68380f3191c9182538af74f417f174 | [
"MIT"
] | null | null | null | server/madmin_barcodes.py | mrngm/madmin | 19067ac41f68380f3191c9182538af74f417f174 | [
"MIT"
] | null | null | null | server/madmin_barcodes.py | mrngm/madmin | 19067ac41f68380f3191c9182538af74f417f174 | [
"MIT"
] | null | null | null | import logging
from madmin_server import InternalServerError, add_handler
from madmin_db import Query, DatabaseError
log = logging.getLogger(__name__)
def handle_barcodes(params, json_data):
try:
log.debug("Fetching barcode table.")
q = Query("SELECT bar_ean, bar_prd_id FROM tblbarcode")
q... | 27.904762 | 63 | 0.691126 |
1bd5beffdf7a07c652b179ae7d55866f9dab04b2 | 25,425 | py | Python | slowfast/utils/meters.py | bmaneesh/SlowFast | 5d1f44300327e36f01d8b3682bc9d63d848ffdb0 | [
"Apache-2.0"
] | null | null | null | slowfast/utils/meters.py | bmaneesh/SlowFast | 5d1f44300327e36f01d8b3682bc9d63d848ffdb0 | [
"Apache-2.0"
] | null | null | null | slowfast/utils/meters.py | bmaneesh/SlowFast | 5d1f44300327e36f01d8b3682bc9d63d848ffdb0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
"""Meters."""
import datetime
import numpy as np
import os
from collections import defaultdict, deque
import torch
from fvcore.common.timer import Timer
from sklearn.metrics import average_precision_score
import slowfast.d... | 32.891332 | 131 | 0.551426 |
4d194317e53919e30358cbb4cd92063ced137059 | 3,033 | py | Python | netlists/simplepool/netlist.py | tokenspice/tokenspice | 11d7b3b190c5b0220cc6b6e76ec525ceb7fb5f56 | [
"MIT"
] | 81 | 2021-08-01T10:00:15.000Z | 2022-03-30T15:05:52.000Z | netlists/simplepool/netlist.py | tokenspice/tokenspice | 11d7b3b190c5b0220cc6b6e76ec525ceb7fb5f56 | [
"MIT"
] | 93 | 2021-08-03T16:21:54.000Z | 2022-03-22T05:36:51.000Z | netlists/simplepool/netlist.py | tokenspice/tokenspice | 11d7b3b190c5b0220cc6b6e76ec525ceb7fb5f56 | [
"MIT"
] | 15 | 2021-08-10T04:02:32.000Z | 2022-03-30T05:51:56.000Z | from typing import List
from enforce_typing import enforce_types
from agents import PublisherAgent
from engine import KPIsBase, SimStateBase, SimStrategyBase
from util.constants import S_PER_HOUR
from util.plotutil import YParam, arrayToFloatList, LINEAR, MULT1, COUNT, DOLLAR
from util.strutil import prettyBigNum
@... | 27.825688 | 84 | 0.643587 |
2470b12979219c71333dc96f6cbd2d18eda26e0b | 5,660 | py | Python | mnelab/io/writers.py | hofaflo/mnelab | 4501d0becdd161015de592106472cb1ea86da37a | [
"BSD-3-Clause"
] | null | null | null | mnelab/io/writers.py | hofaflo/mnelab | 4501d0becdd161015de592106472cb1ea86da37a | [
"BSD-3-Clause"
] | null | null | null | mnelab/io/writers.py | hofaflo/mnelab | 4501d0becdd161015de592106472cb1ea86da37a | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) MNELAB developers
#
# License: BSD (3-clause)
from pathlib import Path
import mne
import numpy as np
from numpy.core.records import fromarrays
from scipy.io import savemat
from ..utils import have
def write_fif(fname, raw):
raw.save(fname, overwrite=True)
def write_set(fname, raw):
"""Exp... | 36.993464 | 92 | 0.54364 |
500d088fe542a127151d25fa23b4024520309eb1 | 2,161 | py | Python | lib/lambdascrapers/sources_ lambdascrapers/en/coolmoviezone.py | proxium/script.module.lambdascrapers | f96ad4c7c44c011c9d0007a83edde8c4797e0e2f | [
"Beerware"
] | 11 | 2018-12-21T22:52:37.000Z | 2021-09-02T02:13:50.000Z | lib/lambdascrapers/sources_ lambdascrapers/en/coolmoviezone.py | proxium/script.module.lambdascrapers | f96ad4c7c44c011c9d0007a83edde8c4797e0e2f | [
"Beerware"
] | null | null | null | lib/lambdascrapers/sources_ lambdascrapers/en/coolmoviezone.py | proxium/script.module.lambdascrapers | f96ad4c7c44c011c9d0007a83edde8c4797e0e2f | [
"Beerware"
] | 1 | 2020-02-01T19:52:36.000Z | 2020-02-01T19:52:36.000Z | # -*- coding: UTF-8 -*-
'''
coolmoviezone scraper for Exodus forks.
Nov 9 2018 - Checked
Updated and refactored by someone.
Originally created by others.
'''
import re,traceback,urllib,urlparse
import resolveurl
from resources.lib.modules import cleantitle
from resources.lib.modules import client
from... | 36.016667 | 134 | 0.568255 |
8f7b1fb9376cda8521ee3a1c08928ad8396b6581 | 104 | py | Python | aws_management_console/node_management/apps.py | hanumanthareddy/email-service-imap- | ddcd6cbce2d57aa5449798178a5dc43a9f2904c7 | [
"MIT"
] | null | null | null | aws_management_console/node_management/apps.py | hanumanthareddy/email-service-imap- | ddcd6cbce2d57aa5449798178a5dc43a9f2904c7 | [
"MIT"
] | 12 | 2019-08-06T02:09:44.000Z | 2022-03-11T23:50:52.000Z | aws_management_console/node_management/apps.py | hanumanthareddy/email-service-imap- | ddcd6cbce2d57aa5449798178a5dc43a9f2904c7 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class NodeManagementConfig(AppConfig):
name = 'node_management'
| 17.333333 | 38 | 0.788462 |
35b59b2d8a02fdca7b36f5075796022d493e7ea8 | 5,307 | py | Python | docs/jnpr_healthbot_swagger/swagger_client/models/pattern_set_schema.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 10 | 2019-10-23T12:54:37.000Z | 2022-02-07T19:24:30.000Z | lib/jnpr/healthbot/swagger/models/pattern_set_schema.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 5 | 2019-09-30T04:29:25.000Z | 2022-02-16T12:21:06.000Z | lib/jnpr/healthbot/swagger/models/pattern_set_schema.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 4 | 2019-09-30T01:17:48.000Z | 2020-08-25T07:27:54.000Z | # coding: utf-8
"""
Paragon Insights APIs
API interface for PI application # noqa: E501
OpenAPI spec version: 4.0.0
Contact: healthbot-feedback@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class PatternSetS... | 29.983051 | 138 | 0.579235 |
cd20267ee9f2e73702eb96b1493ac79af928b05f | 2,612 | py | Python | baselines/adagvae/train.py | ratschlab/projects2020-disentangled-gpvae | 740eb6c9e18c16909e4e752741b019957ef49c65 | [
"MIT"
] | 1 | 2021-02-02T18:28:32.000Z | 2021-02-02T18:28:32.000Z | baselines/adagvae/train.py | ratschlab/projects2020-disentangled-gpvae | 740eb6c9e18c16909e4e752741b019957ef49c65 | [
"MIT"
] | 2 | 2020-09-25T22:45:51.000Z | 2020-09-26T01:32:00.000Z | baselines/adagvae/train.py | ratschlab/projects2020-disentangled-gpvae | 740eb6c9e18c16909e4e752741b019957ef49c65 | [
"MIT"
] | null | null | null | """
Ada-GVAE training script for dsprites dataset, using disentanglement_lib.
Also evaluates DCI metric and saves outputs.
Simon Bing
ETHZ 2020
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import warnings
warnings.simplefilter(action='ignore', catego... | 38.411765 | 114 | 0.749234 |
384b1c036d5d6c011dcad20138040acc8fe14634 | 4,468 | py | Python | python/cusignal/test/test_filter_design.py | mfkiwl/cusignal | 10662f1cbde66bc214c1dc6a79dd56a29b6c7359 | [
"Apache-2.0"
] | null | null | null | python/cusignal/test/test_filter_design.py | mfkiwl/cusignal | 10662f1cbde66bc214c1dc6a79dd56a29b6c7359 | [
"Apache-2.0"
] | null | null | null | python/cusignal/test/test_filter_design.py | mfkiwl/cusignal | 10662f1cbde66bc214c1dc6a79dd56a29b6c7359 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019-2020, NVIDIA 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... | 33.848485 | 75 | 0.620859 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.