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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3728628b015a560c85154e4feb29a1d119f61e8b | 1,949 | py | Python | read_data/read_TCGA_data.py | fuhrmanj/TRANSACT_manuscript | 71ca2ec42bdd5d547d4b965aa7f84838bfd5b812 | [
"MIT"
] | 5 | 2020-10-26T13:18:40.000Z | 2022-02-21T10:03:09.000Z | read_data/read_TCGA_data.py | fuhrmanj/TRANSACT_manuscript | 71ca2ec42bdd5d547d4b965aa7f84838bfd5b812 | [
"MIT"
] | 1 | 2022-03-21T09:55:53.000Z | 2022-03-23T13:48:47.000Z | read_data/read_TCGA_data.py | fuhrmanj/TRANSACT_manuscript | 71ca2ec42bdd5d547d4b965aa7f84838bfd5b812 | [
"MIT"
] | 2 | 2020-11-04T15:40:58.000Z | 2021-01-26T09:37:33.000Z | # -*- coding: utf-8 -*-
"""
@author: Soufiane Mourragui
2020/01/16
READ TCGA DATA
"""
import os
import pandas as pd
import numpy as np
from functools import reduce
def read_one_TCGA_modality(tissues,
projects,
data_type,
folder):
if type(tissues)... | 30.453125 | 103 | 0.590559 |
bb1e99a12523fb7b776e2d0483fc6326666d147c | 66,783 | py | Python | Bio/Blast/Applications.py | szymczakpau/biopython | 6f997cd1ea7daf89f0b70854401da4cde35d6a00 | [
"PostgreSQL"
] | 5 | 2016-03-09T03:41:23.000Z | 2022-01-24T12:34:44.000Z | Bio/Blast/Applications.py | szymczakpau/biopython | 6f997cd1ea7daf89f0b70854401da4cde35d6a00 | [
"PostgreSQL"
] | null | null | null | Bio/Blast/Applications.py | szymczakpau/biopython | 6f997cd1ea7daf89f0b70854401da4cde35d6a00 | [
"PostgreSQL"
] | 6 | 2016-10-24T11:27:13.000Z | 2020-02-26T16:35:01.000Z | # Copyright 2001 Brad Chapman.
# Revisions copyright 2009-2010 by Peter Cock.
# Revisions copyright 2010 by Phillip Garland.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""D... | 45.616803 | 176 | 0.554572 |
943248558ad30a02a385d5a9b5832aa4ebde4baf | 2,244 | py | Python | maptools/fit.py | rosalindfranklininstitute/maptools | 45e4b42a6e029351098683b69f35e9be7e00c93e | [
"Apache-2.0"
] | null | null | null | maptools/fit.py | rosalindfranklininstitute/maptools | 45e4b42a6e029351098683b69f35e9be7e00c93e | [
"Apache-2.0"
] | null | null | null | maptools/fit.py | rosalindfranklininstitute/maptools | 45e4b42a6e029351098683b69f35e9be7e00c93e | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2020 RFI
#
# Author: James Parkhurst
#
# This code is distributed under the GPLv3 license, a copy of
# which is included in the root directory of this package.
#
import logging
import os
import tempfile
import maptools.external
from maptools.util import read
# Get the logger
logger = logging.getLogg... | 25.213483 | 61 | 0.597148 |
26f2b6415e0a5375b5ec179a687883b59d68ff0e | 19,979 | py | Python | NonResidualAttention/NonResidualGPT2.py | FreddeFrallan/Non-Residual-Prompting | 3cbb073c7056e0a876261897218d8813ed9bc2ab | [
"MIT"
] | null | null | null | NonResidualAttention/NonResidualGPT2.py | FreddeFrallan/Non-Residual-Prompting | 3cbb073c7056e0a876261897218d8813ed9bc2ab | [
"MIT"
] | null | null | null | NonResidualAttention/NonResidualGPT2.py | FreddeFrallan/Non-Residual-Prompting | 3cbb073c7056e0a876261897218d8813ed9bc2ab | [
"MIT"
] | null | null | null | from transformers.models.gpt2.modeling_tf_gpt2 import shape_list, TFBaseModelOutputWithPast, input_processing, \
TFCausalLMOutputWithPast
from NonResidualAttention import NonResidualAttention
import tensorflow as tf
import transformers
import numpy as np
class NonResidualGPT(tf.keras.Model):
'''
A slightl... | 52.43832 | 120 | 0.629861 |
e0353a9c0f3ee40b3f98714226db39d9935dbb3a | 1,762 | py | Python | kubernetes/test/test_v1_owner_reference_v2.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_owner_reference_v2.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_owner_reference_v2.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unitte... | 28.419355 | 124 | 0.62202 |
bc50bee6890841deeab0abf7691ac24d06883dea | 22 | py | Python | app/version.py | grepleria/SnitchDNS | 24f98b01fd5fca9aa2c660d6ee15742f2e44915c | [
"MIT"
] | 152 | 2020-12-07T13:26:53.000Z | 2022-03-23T02:00:04.000Z | app/version.py | grepleria/SnitchDNS | 24f98b01fd5fca9aa2c660d6ee15742f2e44915c | [
"MIT"
] | 22 | 2019-03-06T18:21:41.000Z | 2020-04-21T17:35:40.000Z | app/version.py | grepleria/SnitchDNS | 24f98b01fd5fca9aa2c660d6ee15742f2e44915c | [
"MIT"
] | 36 | 2020-12-09T13:04:40.000Z | 2022-03-12T18:14:36.000Z | __version__ = '1.1.4'
| 11 | 21 | 0.636364 |
f8bc5efb83ea2f458beeac7d1a5d19d5ed3aeacc | 4,720 | py | Python | loan_qualifier_app/app.py | briggslalor/Challenge_2 | ce26f4c9d960c9290fa71feb203df6d31482243c | [
"Unlicense"
] | null | null | null | loan_qualifier_app/app.py | briggslalor/Challenge_2 | ce26f4c9d960c9290fa71feb203df6d31482243c | [
"Unlicense"
] | null | null | null | loan_qualifier_app/app.py | briggslalor/Challenge_2 | ce26f4c9d960c9290fa71feb203df6d31482243c | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""Loan Qualifier Application.
This is a command line application to match applicants with qualifying loans.
Example:
$ python app.py
"""
import sys
import fire
import questionary
from pathlib import Path
from qualifier.utils.fileio import (load_csv, save_csv)
from quali... | 32.108844 | 107 | 0.69089 |
a0263f6c46cb23cdf7b923e97e1d89fbeba14ab5 | 818 | py | Python | kanbanApp/taskmanager/serializers.py | Pedroglp/kanban | 7087db6972d3b128a7af8a6b6c7b461492b6cec0 | [
"MIT"
] | 1 | 2018-03-05T16:21:54.000Z | 2018-03-05T16:21:54.000Z | kanbanApp/taskmanager/serializers.py | Pedroglp/kanban | 7087db6972d3b128a7af8a6b6c7b461492b6cec0 | [
"MIT"
] | null | null | null | kanbanApp/taskmanager/serializers.py | Pedroglp/kanban | 7087db6972d3b128a7af8a6b6c7b461492b6cec0 | [
"MIT"
] | null | null | null | from taskmanager.models import Status, Task, User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
exclude = ('password','user_permissions','username',
'is_superuser','date_joined','groups','is_staff',
'is_active','la... | 29.214286 | 77 | 0.652812 |
8329145a3b50b482491ee23ab59d665de7d25da9 | 222 | py | Python | demo/tryiter.py | abos5/pythontutor | eba451700def8bd98d74668d1b6cc08c0ccc0d3c | [
"MIT"
] | null | null | null | demo/tryiter.py | abos5/pythontutor | eba451700def8bd98d74668d1b6cc08c0ccc0d3c | [
"MIT"
] | null | null | null | demo/tryiter.py | abos5/pythontutor | eba451700def8bd98d74668d1b6cc08c0ccc0d3c | [
"MIT"
] | null | null | null |
class Foo(object):
def __iter__(self):
for i in range(100):
yield i
__str__ = __iter__
hot = Foo()
def bar():
for i in range(10):
yield i
for i in bar():
print(i)
#eof
| 9.652174 | 28 | 0.509009 |
0cee89aec16099e9ca3fdaed50a86c2da1762b8b | 3,154 | py | Python | legacy/code/tests/test_novel_samples.py | GLOMICON/emp | c1f752d1ae4c009328bbdcecf9666dbd4dac39b6 | [
"BSD-3-Clause"
] | 1 | 2020-01-30T15:06:26.000Z | 2020-01-30T15:06:26.000Z | legacy/code/tests/test_novel_samples.py | GLOMICON/emp | c1f752d1ae4c009328bbdcecf9666dbd4dac39b6 | [
"BSD-3-Clause"
] | null | null | null | legacy/code/tests/test_novel_samples.py | GLOMICON/emp | c1f752d1ae4c009328bbdcecf9666dbd4dac39b6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import division
__author__ = "Jai Ram Rideout"
__copyright__ = "Copyright 2013, The QIIME Project"
__credits__ = ["Jai Ram Rideout"]
__license__ = "GPL"
__version__ = "1.7.0-dev"
__maintainer__ = "Jai Ram Rideout"
__email__ = "jai.rideout@gmail.com"
__status__ = "Development"
"""... | 39.924051 | 652 | 0.58941 |
a5c1c8d33c748b1874ae7e8b471c23eec5b45a4c | 73,332 | py | Python | pot.py | BreitensteinLab/GABI | 534fece860dd8ce3d86471375f2d6fb817a06669 | [
"BSD-3-Clause"
] | null | null | null | pot.py | BreitensteinLab/GABI | 534fece860dd8ce3d86471375f2d6fb817a06669 | [
"BSD-3-Clause"
] | null | null | null | pot.py | BreitensteinLab/GABI | 534fece860dd8ce3d86471375f2d6fb817a06669 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 Max Planck Society
# Distributed under the BSD-3 Software license,
# (See accompanying file ./LICENSE.txt or copy at
# https://opensource.org/licenses/BSD-3-Clause)
"""This class implements POT training.
"""
import collections
import logging
import os
import time
import tensorflow as tf
import utils
f... | 47.960759 | 125 | 0.571592 |
ea5bb4b7632dc17e456335f384ead82e11b37058 | 514 | py | Python | game/blocks/impl/empty_block.py | Wastack/blocky | 1f05b142d5a62649205bdd97813e75fd60eadd40 | [
"MIT"
] | null | null | null | game/blocks/impl/empty_block.py | Wastack/blocky | 1f05b142d5a62649205bdd97813e75fd60eadd40 | [
"MIT"
] | 5 | 2021-04-24T11:36:48.000Z | 2022-02-19T12:20:50.000Z | game/blocks/impl/empty_block.py | Wastack/blocky | 1f05b142d5a62649205bdd97813e75fd60eadd40 | [
"MIT"
] | null | null | null | from game.blocks.block import AbstractBlock
from game.move_info import MoveInfo
from game.utils.move_verdict import MoveVerdict, MoveVerdictEnum
class EmptyBlock(AbstractBlock):
def before_step(self, intruder: AbstractBlock, _i: MoveInfo) -> MoveVerdict:
"""
:return: Whether intruder can step on ... | 32.125 | 80 | 0.729572 |
4a1d35781e822d848ed32add7b83a3be0b925a90 | 1,373 | py | Python | nuplan/planning/nuboard/base/test/test_nuboard_file.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 128 | 2021-12-06T15:41:14.000Z | 2022-03-29T13:16:32.000Z | nuplan/planning/nuboard/base/test/test_nuboard_file.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 28 | 2021-12-11T08:11:31.000Z | 2022-03-25T02:35:43.000Z | nuplan/planning/nuboard/base/test/test_nuboard_file.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 14 | 2021-12-11T04:12:26.000Z | 2022-03-24T06:38:30.000Z | import os
import tempfile
import unittest
from pathlib import Path
from nuplan.planning.nuboard.base.data_class import NuBoardFile
class TestNuBoardFile(unittest.TestCase):
"""Test NuBoardFile functionality."""
def setUp(self) -> None:
"""Set up a nuBoard file class."""
self.tmp_dir = tempfi... | 33.487805 | 107 | 0.694829 |
eabdd353337d009960341821add63915f970bf87 | 106,126 | py | Python | src/pypdf/pdf.py | him229/alfred-pdf-tools | e7f2f2461a74507a9553dee9f8f359ee2cc7decd | [
"MIT"
] | 88 | 2016-07-24T23:43:34.000Z | 2022-03-26T03:06:34.000Z | src/pypdf/pdf.py | dishantpandya777/alfred-pdf-tools | e7f2f2461a74507a9553dee9f8f359ee2cc7decd | [
"MIT"
] | 11 | 2016-09-06T21:07:07.000Z | 2022-03-24T07:45:50.000Z | src/pypdf/pdf.py | dishantpandya777/alfred-pdf-tools | e7f2f2461a74507a9553dee9f8f359ee2cc7decd | [
"MIT"
] | 5 | 2017-10-26T17:59:13.000Z | 2022-02-03T09:00:32.000Z | # -*- coding: utf-8 -*-
#
# vim: sw=4:expandtab:foldmethod=marker
#
# Copyright (c) 2006, Mathieu Fenniak
# Copyright (c) 2007, Ashish Kulkarni <kulkarni.ashish@gmail.com>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the foll... | 37.47387 | 102 | 0.546002 |
96881cd1eb1f0935686d96935b2d9fefb3e4f91e | 23,562 | py | Python | lib/rel_model.py | ycao5602/neural-motifs-forked | 8860ea5ec852f01fffb6a8f1d122b6977436720f | [
"MIT"
] | null | null | null | lib/rel_model.py | ycao5602/neural-motifs-forked | 8860ea5ec852f01fffb6a8f1d122b6977436720f | [
"MIT"
] | null | null | null | lib/rel_model.py | ycao5602/neural-motifs-forked | 8860ea5ec852f01fffb6a8f1d122b6977436720f | [
"MIT"
] | null | null | null | """
Let's get the relationships yo
"""
import numpy as np
import torch
import torch.nn as nn
import torch.nn.parallel
from torch.autograd import Variable
from torch.nn import functional as F
from torch.nn.utils.rnn import PackedSequence
from lib.resnet import resnet_l4
from config import BATCHNORM_MOMENTUM
from lib.fp... | 42 | 136 | 0.60466 |
db5f67f131c212c6ddb55446161f3f5d18ac0713 | 75,601 | py | Python | tests/scanner/audit/iam_rules_engine_test.py | aarontp/forseti-security | 6d03c14114468ff6170846392b7d14a0619fa9f0 | [
"Apache-2.0"
] | 921 | 2017-03-09T01:01:24.000Z | 2019-04-16T11:38:25.000Z | tests/scanner/audit/iam_rules_engine_test.py | aarontp/forseti-security | 6d03c14114468ff6170846392b7d14a0619fa9f0 | [
"Apache-2.0"
] | 1,996 | 2017-03-03T22:07:50.000Z | 2019-04-17T00:02:28.000Z | tests/scanner/audit/iam_rules_engine_test.py | aarontp/forseti-security | 6d03c14114468ff6170846392b7d14a0619fa9f0 | [
"Apache-2.0"
] | 241 | 2017-03-09T01:00:04.000Z | 2019-04-15T18:53:35.000Z | # Copyright 2017 The Forseti Security 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 ap... | 37.260227 | 104 | 0.57859 |
c5a20115ca18ffbd0ca0ae742c66a3b855cd17e0 | 48,078 | py | Python | Collections-a-installer/community-mysql-1.3.0/plugins/modules/mysql_user.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | null | null | null | Collections-a-installer/community-mysql-1.3.0/plugins/modules/mysql_user.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | null | null | null | Collections-a-installer/community-mysql-1.3.0/plugins/modules/mysql_user.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2012, Mark Theunissen <mark.theunissen@gmail.com>
# Sponsored by Four Kitchens http://fourkitchens.com.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_functi... | 37.649178 | 151 | 0.611486 |
9fd78f06981cc6831da0e737a4333e9f50d648e1 | 1,880 | py | Python | real_robots/utils.py | anonymous-authors-2018/robotics-repo | 385d1f3b49f8d414ab90f53c6f06b56614ae83ba | [
"MIT"
] | 524 | 2018-09-25T14:11:57.000Z | 2022-03-28T11:51:36.000Z | real_robots/utils.py | BillChan226/POAR-SRL-4-Robot | a6a8052e105369656d34fffc4f7ca4475dcc38df | [
"MIT"
] | 27 | 2018-09-28T13:56:41.000Z | 2020-11-25T09:32:22.000Z | real_robots/utils.py | BillChan226/POAR-SRL-4-Robot | a6a8052e105369656d34fffc4f7ca4475dcc38df | [
"MIT"
] | 95 | 2018-09-25T14:11:46.000Z | 2022-03-15T10:45:53.000Z | from __future__ import print_function, absolute_import, division
import sys
import zmq
import numpy as np
if sys.version_info > (3,):
buffer = memoryview
def recvMatrix(socket):
"""
Receive a numpy array over zmq
:param socket: (zmq socket)
:return: (Numpy matrix)
"""
metadata = socket.... | 26.478873 | 88 | 0.620213 |
058f29f9b4f3f42fee6cb4bdfb660ad84d2b65a9 | 8,361 | py | Python | foresee/webapp/layout.py | HamidM6/foresee | fbea54dbec46330dc5127db2714d310ee1ffa0a1 | [
"MIT"
] | null | null | null | foresee/webapp/layout.py | HamidM6/foresee | fbea54dbec46330dc5127db2714d310ee1ffa0a1 | [
"MIT"
] | null | null | null | foresee/webapp/layout.py | HamidM6/foresee | fbea54dbec46330dc5127db2714d310ee1ffa0a1 | [
"MIT"
] | 1 | 2020-04-26T01:46:51.000Z | 2020-04-26T01:46:51.000Z |
import dash_html_components as html
import dash_core_components as dcc
import dash_bootstrap_components as dbc
# app layout
app_layout = dbc.Container([
dcc.Tabs(id='tab-collection', value='tab-1', children=[
dcc.Tab(label='Introduction', value='tab-1'),
dcc.Tab(label='Main', value='tab-2'),
]),
html.Div(id=... | 23.225 | 160 | 0.579955 |
b9e523336eea87f26276a40f9e9a3cc1569079ab | 564 | py | Python | opportunities/migrations/0013_auto_20210103_0116.py | MrEscape54/CRM | 36be1fcc74bbfddf343dc0b1b7f8af83be3fe8d3 | [
"MIT"
] | null | null | null | opportunities/migrations/0013_auto_20210103_0116.py | MrEscape54/CRM | 36be1fcc74bbfddf343dc0b1b7f8af83be3fe8d3 | [
"MIT"
] | null | null | null | opportunities/migrations/0013_auto_20210103_0116.py | MrEscape54/CRM | 36be1fcc74bbfddf343dc0b1b7f8af83be3fe8d3 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-01-03 04:16
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('accounts', '0018_auto_20201230_1302'),
('opportunities', '0012_auto_20210103_0100'),
]
operations = [
... | 26.857143 | 134 | 0.657801 |
e8726422ab9ac6bd8c49e98f7b537ce51e01aca0 | 920 | py | Python | p32.py | alpatine/project-euler-python | d731d2deebff4bfb812811921f56da7b984652c0 | [
"MIT"
] | null | null | null | p32.py | alpatine/project-euler-python | d731d2deebff4bfb812811921f56da7b984652c0 | [
"MIT"
] | null | null | null | p32.py | alpatine/project-euler-python | d731d2deebff4bfb812811921f56da7b984652c0 | [
"MIT"
] | null | null | null | from math import ceil, prod
from typing import List, Set
from digits import is_pandigital
def p32() -> int:
pandigital_products = set()
pandigital_products.update(find_pandigital(2, 8, 1234, 9876, 1234, 9876))
pandigital_products.update(find_pandigital(12, 98, 123, 987, 1234, 9876))
return sum(pandigit... | 28.75 | 77 | 0.605435 |
411e0b25536748513c952b0e82e6f32f5a14a496 | 1,004 | bzl | Python | third_party/toolchains/preconfig/generate/containers.bzl | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | third_party/toolchains/preconfig/generate/containers.bzl | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | third_party/toolchains/preconfig/generate/containers.bzl | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | """SHA 256 values for each image."""
container_digests = {
"ubuntu16.04": "sha256:b90dcf2f35f3354909f4491bdf019c110b4b4d95ef0395ebf178bc5d523a4208",
"centos6": "sha256:d09c12fb26fbbe8398b4973260c75172eb67d509dae9d6f4ad54279b7d6b0494",
"ubuntu16.04-manylinux2010": "sha256:3a9b4820021801b1fa7d0592c1738483ac7a... | 77.230769 | 123 | 0.840637 |
9af363810163bf3d132ad0278921c2a54bd5e258 | 1,233 | py | Python | util/Htmal2Pdf.py | Ncohen1/pix2pix_pytorch | 6d063684b13b86401bebd6241c3b9779cee605e8 | [
"BSD-3-Clause"
] | null | null | null | util/Htmal2Pdf.py | Ncohen1/pix2pix_pytorch | 6d063684b13b86401bebd6241c3b9779cee605e8 | [
"BSD-3-Clause"
] | null | null | null | util/Htmal2Pdf.py | Ncohen1/pix2pix_pytorch | 6d063684b13b86401bebd6241c3b9779cee605e8 | [
"BSD-3-Clause"
] | null | null | null | # from PyQt4.QtGui import QTextDocument, QPrinter, QApplication
#
# import sys
# app = QApplication(sys.argv)
#
# doc = QTextDocument()
# location = "/home/neama_yuval/pytorch-CycleGAN-and-pix2pix/results/ctUs_pix2pix_noDropout/test_latest/index.html"
# html = open(location).read()
# doc.setHtml(html)
#
# printer = QPr... | 30.073171 | 133 | 0.770479 |
bff584ca7dfa768ffbeed345eda3100511515c84 | 40,286 | py | Python | scripts/checkfiles.py | ebi-ait/lattice-tools | 7d72b04fae879f4330702df93bbfc0ea8a6bbdaa | [
"MIT"
] | null | null | null | scripts/checkfiles.py | ebi-ait/lattice-tools | 7d72b04fae879f4330702df93bbfc0ea8a6bbdaa | [
"MIT"
] | 3 | 2021-02-09T14:57:00.000Z | 2021-09-27T23:23:45.000Z | scripts/checkfiles.py | ebi-ait/lattice-tools | 7d72b04fae879f4330702df93bbfc0ea8a6bbdaa | [
"MIT"
] | 1 | 2022-02-23T14:21:17.000Z | 2022-02-23T14:21:17.000Z | import argparse
import boto3
import botocore
import crcmod
import hashlib
import h5py
import json
import lattice
import logging
import os
import re
import requests
import shutil
import socket
import subprocess
import sys
import tables
from datetime import datetime
from ftplib import error_perm, FTP
from urllib.parse im... | 39.226874 | 175 | 0.593606 |
ee7a1d0c02268fe097c93ae7700378ea23db5620 | 2,915 | py | Python | pcdet/models/backbones_3d/minkowski.py | StarGazer1995/OpenPCDet | 4af33e8badb0c8e68c7c94c71b0ec5667aad2348 | [
"Apache-2.0"
] | null | null | null | pcdet/models/backbones_3d/minkowski.py | StarGazer1995/OpenPCDet | 4af33e8badb0c8e68c7c94c71b0ec5667aad2348 | [
"Apache-2.0"
] | null | null | null | pcdet/models/backbones_3d/minkowski.py | StarGazer1995/OpenPCDet | 4af33e8badb0c8e68c7c94c71b0ec5667aad2348 | [
"Apache-2.0"
] | null | null | null | import torch.nn as nn
import MinkowskiEngine as ME
def post_act_block(in_channels,out_channels,kernel_size=1,stride=1,padding=0,dimension=None):
'''
:param in_channels:
:param out_channels:
:param kernel_size:
:param stride:
:param padding:
:param dimension:
:return:
'''
m = nn... | 31.344086 | 95 | 0.531389 |
b49e3cc02797f2674136b3bce0580447dd69313d | 1,760 | py | Python | axial/config_imagenet32.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | axial/config_imagenet32.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | axial/config_imagenet32.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 32.592593 | 74 | 0.603977 |
1af250d9032f4e07d3395be5daf8fc4a0bedf585 | 1,995 | py | Python | webinterface/src/WebChilds/PlayService.py | builder08/enigma2-plugins | 45583c69b807ce26d756a51973c81d877afe3694 | [
"OLDAP-2.3"
] | null | null | null | webinterface/src/WebChilds/PlayService.py | builder08/enigma2-plugins | 45583c69b807ce26d756a51973c81d877afe3694 | [
"OLDAP-2.3"
] | null | null | null | webinterface/src/WebChilds/PlayService.py | builder08/enigma2-plugins | 45583c69b807ce26d756a51973c81d877afe3694 | [
"OLDAP-2.3"
] | null | null | null | from __future__ import print_function
from enigma import eServiceReference
from twisted.web import resource, http, server
from os import path as os_path
class ServiceplayerResource(resource.Resource):
def __init__(self, session):
resource.Resource.__init__(self)
self.session = session
self.oldservice = None
d... | 33.25 | 99 | 0.725313 |
81354c3d1a1736a0256397ef5ff6dbf61382db56 | 660 | py | Python | files/save_structured_data.py | PitPietro/pascal-triangle | eb81e9fc4728f4e09a631922c470201a9f897195 | [
"MIT"
] | 1 | 2020-03-11T10:20:53.000Z | 2020-03-11T10:20:53.000Z | files/save_structured_data.py | PitPietro/python-structure | eb81e9fc4728f4e09a631922c470201a9f897195 | [
"MIT"
] | 1 | 2020-07-06T15:45:01.000Z | 2020-07-06T15:50:32.000Z | files/save_structured_data.py | PitPietro/python-structure | eb81e9fc4728f4e09a631922c470201a9f897195 | [
"MIT"
] | 1 | 2020-07-02T05:21:58.000Z | 2020-07-02T05:21:58.000Z | import shelve
LIST_FILE_NAME = 'my_list.pd'
def write_list():
shelf_file = shelve.open(LIST_FILE_NAME)
shelf_file['languages'] = ['C', 'Go', 'Java', 'Javascript', 'PHP', 'Python', 'Ruby', 'Perl']
shelf_file.close()
def read_list(index):
shelf_file = shelve.open(LIST_FILE_NAME)
return shelf_file... | 22.758621 | 96 | 0.662121 |
f6262b85b7eaafc53fc076e6a558c795ca4ba75b | 652 | py | Python | submissions/count-nice-pairs-in-an-array/solution.py | Wattyyy/LeetCode | 13a9be056d0a0c38c2f8c8222b11dc02cb25a935 | [
"MIT"
] | null | null | null | submissions/count-nice-pairs-in-an-array/solution.py | Wattyyy/LeetCode | 13a9be056d0a0c38c2f8c8222b11dc02cb25a935 | [
"MIT"
] | 1 | 2022-03-04T20:24:32.000Z | 2022-03-04T20:31:58.000Z | submissions/count-nice-pairs-in-an-array/solution.py | Wattyyy/LeetCode | 13a9be056d0a0c38c2f8c8222b11dc02cb25a935 | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/count-nice-pairs-in-an-array
from collections import defaultdict
from bisect import bisect_right
class Solution:
def countNicePairs(self, nums: List[int]) -> int:
MOD = 7 + 10 ** 9
ls = []
num2indices = defaultdict(list)
for i, num in enumerate(nums... | 27.166667 | 61 | 0.562883 |
3c6f7ab1f3efe8ddf3a904f1715592bf6df89e5f | 1,387 | py | Python | var/spack/repos/builtin/packages/pgdspider/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/pgdspider/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/pgdspider/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 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 os.path
class Pgdspider(Package):
""""PGDSpider is a powerful automated data conversion t... | 35.564103 | 97 | 0.674117 |
c3d7f5bd585839ca16a50798874e1ae46f786cd8 | 283 | py | Python | tests/artificial/transf_RelativeDifference/trend_MovingAverage/cycle_5/ar_12/test_artificial_128_RelativeDifference_MovingAverage_5_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/artificial/transf_RelativeDifference/trend_MovingAverage/cycle_5/ar_12/test_artificial_128_RelativeDifference_MovingAverage_5_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/artificial/transf_RelativeDifference/trend_MovingAverage/cycle_5/ar_12/test_artificial_128_RelativeDifference_MovingAverage_5_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 5, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_order = 12); | 40.428571 | 178 | 0.745583 |
d9a94b470785738274cbce71c2ff5de0da3e9834 | 24,186 | py | Python | seleniumbase/plugins/selenium_plugin.py | oobeya-space/SeleniumBase | ab94569d3ed79e5c6d389336fae7fa18ffeba093 | [
"MIT"
] | 1 | 2021-02-21T18:01:54.000Z | 2021-02-21T18:01:54.000Z | seleniumbase/plugins/selenium_plugin.py | oobeya-space/SeleniumBase | ab94569d3ed79e5c6d389336fae7fa18ffeba093 | [
"MIT"
] | null | null | null | seleniumbase/plugins/selenium_plugin.py | oobeya-space/SeleniumBase | ab94569d3ed79e5c6d389336fae7fa18ffeba093 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" This is the Nosetest plugin for setting Selenium test configuration. """
import sys
from nose.plugins import Plugin
from seleniumbase.core import proxy_helper
from seleniumbase.fixtures import constants
class SeleniumBrowser(Plugin):
"""
This plugin adds the following command-line... | 46.422265 | 78 | 0.573307 |
477e8f417c63c92affc1824c44694b7d17135bd9 | 5,551 | py | Python | pipeline/build_docs.py | CambridgeSemiticsLab/nena_pipeline | 127e3ffee38996f3c7a98bc31dae1915ebbf4840 | [
"MIT"
] | null | null | null | pipeline/build_docs.py | CambridgeSemiticsLab/nena_pipeline | 127e3ffee38996f3c7a98bc31dae1915ebbf4840 | [
"MIT"
] | null | null | null | pipeline/build_docs.py | CambridgeSemiticsLab/nena_pipeline | 127e3ffee38996f3c7a98bc31dae1915ebbf4840 | [
"MIT"
] | null | null | null | import json
import tabulate
import collections
from pathlib import Path
from tf.fabric import Fabric
class DocsBuilder:
"""
Automatically build corpus documentation using TF files.
"""
def __init__(self, configdata, outdir):
self.outdir = Path(outdir)
# read in the template file for... | 37.006667 | 103 | 0.514142 |
9c677dc7dec3eb75e3a5bfb1be7d81606709d082 | 87,587 | py | Python | salt/utils/cloud.py | lilinji/salt | 93901ef446e9dea7149f034cdc211afbfdb3283b | [
"Apache-2.0"
] | 1 | 2018-09-18T05:45:43.000Z | 2018-09-18T05:45:43.000Z | salt/utils/cloud.py | wesleylancel/salt | d16c97341cc56f3f59bdda067ec60a30b2469d8a | [
"Apache-2.0"
] | null | null | null | salt/utils/cloud.py | wesleylancel/salt | d16c97341cc56f3f59bdda067ec60a30b2469d8a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Utility functions for salt.cloud
'''
# Import python libs
import os
import sys
import stat
import codecs
import shutil
import hashlib
import socket
import tempfile
import time
import subprocess
import multiprocessing
import logging
import pipes
import msgpack
import traceback
import copy
im... | 35.402991 | 144 | 0.551235 |
ef9026d45075fd101b5a9e0f0297bd6f3a8b262c | 24,963 | py | Python | python/mxnet/initializer.py | ijkguo/mxnet | c7667126163c0d90c5cfab19579272ea714cf949 | [
"Apache-2.0"
] | 4 | 2018-10-25T23:05:25.000Z | 2019-06-29T11:44:07.000Z | python/mxnet/initializer.py | ijkguo/mxnet | c7667126163c0d90c5cfab19579272ea714cf949 | [
"Apache-2.0"
] | 6 | 2018-06-21T17:08:26.000Z | 2018-08-09T17:58:08.000Z | python/mxnet/initializer.py | ijkguo/mxnet | c7667126163c0d90c5cfab19579272ea714cf949 | [
"Apache-2.0"
] | 3 | 2016-07-19T15:36:21.000Z | 2018-03-19T01:27:52.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.242798 | 97 | 0.593398 |
fe3a87640dbebc90c80c199c856e11954490848c | 5,415 | py | Python | Other files (test scripts etc.)/assorted.py | dg1223/InsectRecognition-UniversityOfGuelph_SemiosBio-Project | 597ae45e04895984669b001129871ebed1a3178c | [
"MIT"
] | 2 | 2015-10-18T04:30:22.000Z | 2017-01-03T15:24:27.000Z | Other files (test scripts etc.)/assorted.py | dg1223/InsectRecognition-UniversityOfGuelph_SemiosBio-Project | 597ae45e04895984669b001129871ebed1a3178c | [
"MIT"
] | null | null | null | Other files (test scripts etc.)/assorted.py | dg1223/InsectRecognition-UniversityOfGuelph_SemiosBio-Project | 597ae45e04895984669b001129871ebed1a3178c | [
"MIT"
] | null | null | null | grid = ImageGrid(fig, 111, # similar to subplot(111)
nrows_ncols = (3, 3), # creates 2x2 grid of axes
axes_pad=0.5, # pad between axes in inch.
share_all=True,
)
##############################################################################################... | 38.404255 | 156 | 0.575808 |
53749d6be5994400632374b040ef8fd315aa7a16 | 393 | py | Python | cryptids/wsgi.py | echarlotte612/jets | fec53d669186731980fcfdc1dbad03d713831b3c | [
"Unlicense"
] | null | null | null | cryptids/wsgi.py | echarlotte612/jets | fec53d669186731980fcfdc1dbad03d713831b3c | [
"Unlicense"
] | 18 | 2020-11-30T13:56:28.000Z | 2020-12-04T11:13:57.000Z | cryptids/wsgi.py | echarlotte612/jets | fec53d669186731980fcfdc1dbad03d713831b3c | [
"Unlicense"
] | 1 | 2020-12-02T16:24:46.000Z | 2020-12-02T16:24:46.000Z | """
WSGI config for cryptids 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_SETT... | 23.117647 | 78 | 0.78626 |
2a341587ff674ad29b1e19ceed689212edab518a | 3,909 | py | Python | etl/management/commands/setup_ecantina.py | LuchaComics/comicscantina-django | 78e630000fb1e1f6299f80655c8f57a496236ab1 | [
"BSD-2-Clause"
] | null | null | null | etl/management/commands/setup_ecantina.py | LuchaComics/comicscantina-django | 78e630000fb1e1f6299f80655c8f57a496236ab1 | [
"BSD-2-Clause"
] | 5 | 2021-03-19T02:58:32.000Z | 2022-03-11T23:57:30.000Z | etl/management/commands/setup_ecantina.py | lendierickx/comics-django | 3f5c6e85c89ff157dbf67179ea3b9007d7de446c | [
"BSD-2-Clause"
] | null | null | null | import os
import sys
from datetime import datetime
from django.db import connection, transaction
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from ecantina_project import constants
from api.models.ec.category import Category
from api.models.ec.unified_shi... | 35.536364 | 97 | 0.460732 |
c8ebcfc0750fe7cc4ee56016ada4ce24641bae2f | 642 | py | Python | ignore_duplicates.py | adriennekarnoski/code-katas | c90c51780174110d6292b57248b77723db6ad6ac | [
"MIT"
] | null | null | null | ignore_duplicates.py | adriennekarnoski/code-katas | c90c51780174110d6292b57248b77723db6ad6ac | [
"MIT"
] | null | null | null | ignore_duplicates.py | adriennekarnoski/code-katas | c90c51780174110d6292b57248b77723db6ad6ac | [
"MIT"
] | null | null | null | """Kata: Sum a list but ignore any duplicates
Writes a function that sums a list,
but ignores any duplicate items in the list.
#1 Best Practices Solution by zebulan, ExhaleO2, DCoulter:
from collections import Counter
def sum_no_duplicates(nums):
return sum(k for k, v in Counter(nums).items() if v == 1)
"""
... | 23.777778 | 61 | 0.661994 |
40a6f507d99b43d3ba37bc63577bb93a2184f60c | 2,606 | py | Python | demos/multirotor/check_trajectory_threaded.py | GiuppoUni/MALRL | 4b889a9e6fcf884cd229796cf2febf0bc0998468 | [
"MIT"
] | 3 | 2021-08-13T17:02:06.000Z | 2022-03-12T06:30:26.000Z | demos/multirotor/check_trajectory_threaded.py | GiuppoUni/MALRL | 4b889a9e6fcf884cd229796cf2febf0bc0998468 | [
"MIT"
] | null | null | null | demos/multirotor/check_trajectory_threaded.py | GiuppoUni/MALRL | 4b889a9e6fcf884cd229796cf2febf0bc0998468 | [
"MIT"
] | null | null | null | # Please add "EnableTrace": true to your setting.json as shown below
# {
# "SettingsVersion": 1.2,
# "SimMode": "Multirotor",
# "Vehicles": {
# "Drone": {
# "VehicleType": "SimpleFlight",
# "EnableTrace": true
# }
# }
# }
import setup_path
import airsim
import time
import t... | 22.084746 | 86 | 0.6132 |
88efd77d1f45ebde1ede0b6fc56924d06aab8027 | 1,594 | py | Python | tests/test_time_related_features.py | platiagro/tasks | a6103cb101eeed26381cdb170a11d0e1dc53d3ad | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2021-02-16T12:39:57.000Z | 2021-07-21T11:36:39.000Z | tests/test_time_related_features.py | platiagro/tasks | a6103cb101eeed26381cdb170a11d0e1dc53d3ad | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 20 | 2020-10-26T18:05:27.000Z | 2021-11-30T19:05:22.000Z | tests/test_time_related_features.py | platiagro/tasks | a6103cb101eeed26381cdb170a11d0e1dc53d3ad | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 7 | 2020-10-13T18:12:22.000Z | 2021-08-13T19:16:21.000Z | import os
import unittest
import uuid
import papermill
from tests import datasets, server
EXPERIMENT_ID = str(uuid.uuid4())
OPERATOR_ID = str(uuid.uuid4())
RUN_ID = str(uuid.uuid4())
class TestTimeRelatedFeatures(unittest.TestCase):
def setUp(self):
# Set environment variables needed to run notebooks
... | 26.566667 | 62 | 0.547679 |
fe0c000afc4a337accbe7d745d80641f4fe4b6dd | 1,247 | py | Python | core/consts.py | moonlightflysky/model-factory | 7515cde85c05622d07bbf60387cb76228929892c | [
"MIT"
] | null | null | null | core/consts.py | moonlightflysky/model-factory | 7515cde85c05622d07bbf60387cb76228929892c | [
"MIT"
] | null | null | null | core/consts.py | moonlightflysky/model-factory | 7515cde85c05622d07bbf60387cb76228929892c | [
"MIT"
] | null | null | null | ################################################################################
# Model Factory Config File Path.
################################################################################
MODEL_FACTORY_CONFIG_FILE = "~/.model_factory.ini"
#######################################################################... | 35.628571 | 80 | 0.500401 |
e9ab61de33d66f898060de82acab6cf3e0aef561 | 557 | py | Python | manage.py | ostrowskaaa/face_detection | 68d3ac9c6b2f0ed257dc1ebcaa40542c27b715a1 | [
"MIT"
] | 1 | 2019-11-24T11:16:56.000Z | 2019-11-24T11:16:56.000Z | manage.py | ziebisty/Django_Face_Detector | f22a499e4d812d12cb9bca9ff0bd5d37d1b594a1 | [
"MIT"
] | 8 | 2020-02-12T02:52:17.000Z | 2022-02-10T09:05:12.000Z | manage.py | ziebisty/Django_Face_Detector | f22a499e4d812d12cb9bca9ff0bd5d37d1b594a1 | [
"MIT"
] | 1 | 2019-11-21T17:51:42.000Z | 2019-11-21T17:51:42.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't impo... | 34.8125 | 74 | 0.662478 |
948e0a0fafd54e8b0137ba430af523303dfc3efa | 10,926 | py | Python | examples/inspection/plot_partial_dependence.py | BrandonLiang/scikit-learn | 845b1fac9e8bcfc146e7b38119ce6c500e00a10b | [
"BSD-3-Clause"
] | 4 | 2020-06-23T18:56:57.000Z | 2021-08-28T15:27:01.000Z | examples/inspection/plot_partial_dependence.py | BrandonLiang/scikit-learn | 845b1fac9e8bcfc146e7b38119ce6c500e00a10b | [
"BSD-3-Clause"
] | 26 | 2019-05-11T13:16:43.000Z | 2022-03-16T22:21:23.000Z | examples/inspection/plot_partial_dependence.py | BrandonLiang/scikit-learn | 845b1fac9e8bcfc146e7b38119ce6c500e00a10b | [
"BSD-3-Clause"
] | 4 | 2019-03-26T02:05:40.000Z | 2021-10-02T13:50:40.000Z | """
===============================================================
Partial Dependence and Individual Conditional Expectation Plots
===============================================================
Partial dependence plots show the dependence between the target function [2]_
and a set of features of interest, marginaliz... | 37.546392 | 88 | 0.731649 |
3808a57fa02fd176606b44315d6963f149f3a5db | 959 | py | Python | tools/p3_switch_test.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 163 | 2015-01-25T02:19:50.000Z | 2022-03-26T12:00:28.000Z | tools/p3_switch_test.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 1,086 | 2015-03-23T19:53:17.000Z | 2022-03-24T20:46:11.000Z | tools/p3_switch_test.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 148 | 2015-01-28T02:31:39.000Z | 2022-03-22T13:54:01.000Z | """Switch test for P3."""
import sys
try: # pragma: no cover
import pinproc
pinproc_imported = True
except ImportError: # pragma: no cover
try:
if sys.platform == 'darwin':
from mpf.platforms.pinproc.osx import pinproc
elif sys.platform == 'win32':
if sys.plat... | 29.060606 | 61 | 0.613139 |
00e49184e60a68941f9b407a3301e1d2018d3922 | 13,355 | py | Python | elevenclock/tools.py | zuidstroopwafel/ElevenClock | 33c795817d4496f1b1f5e6eef12c889fc857469a | [
"Apache-2.0"
] | null | null | null | elevenclock/tools.py | zuidstroopwafel/ElevenClock | 33c795817d4496f1b1f5e6eef12c889fc857469a | [
"Apache-2.0"
] | null | null | null | elevenclock/tools.py | zuidstroopwafel/ElevenClock | 33c795817d4496f1b1f5e6eef12c889fc857469a | [
"Apache-2.0"
] | null | null | null | import os
import sys
import winreg
import threading
import locale
from PySide2.QtGui import *
from PySide2.QtCore import *
from PySide2.QtWidgets import *
import globals
from languages import *
version = 2.89
versionName = "2.9.0-beta"
def _(s): #Translate function
global lang
try:
t = lang.lang[s]... | 36.094595 | 116 | 0.546387 |
cb8d18a51ed33f7493d1d1390d1b88088edb80c3 | 6,508 | py | Python | app/classes/bot.py | Sonic4999/Starboard-2 | ca3d1bcfd1321e0c295d26026a3d825067bb4bbd | [
"MIT"
] | null | null | null | app/classes/bot.py | Sonic4999/Starboard-2 | ca3d1bcfd1321e0c295d26026a3d825067bb4bbd | [
"MIT"
] | null | null | null | app/classes/bot.py | Sonic4999/Starboard-2 | ca3d1bcfd1321e0c295d26026a3d825067bb4bbd | [
"MIT"
] | null | null | null | import asyncio
import io
import json
import logging
import sys
import textwrap
import traceback
from contextlib import redirect_stdout
from typing import List
import discord
import websockets
from discord.ext import commands
from pretty_help import PrettyHelp
from app import checks
from ..cache import Cache
from ..d... | 31.439614 | 77 | 0.533958 |
37b671f3c4a809fbc2d0125c39d4b5ba78551952 | 11,405 | py | Python | RL/DDPG.py | sameul-yuan/markdowns | fcb8b77bfe402ffabba42352f1ae686cf1a12ecd | [
"MIT"
] | null | null | null | RL/DDPG.py | sameul-yuan/markdowns | fcb8b77bfe402ffabba42352f1ae686cf1a12ecd | [
"MIT"
] | null | null | null | RL/DDPG.py | sameul-yuan/markdowns | fcb8b77bfe402ffabba42352f1ae686cf1a12ecd | [
"MIT"
] | null | null | null |
import sys
import os
import argparse
import atexit
import warnings
import random
import numpy as np
from tqdm import tqdm
import pandas as pd
import tensorflow as tf
from tensorflow import keras
# sys.path.append(os.path.dirname(os.path.split(os.path.abspath(__file__))[0]))
from actor import Actor
from critic impo... | 45.62 | 165 | 0.651381 |
9811da78b7dede3f29c9beacecf4df1714cd116f | 28,695 | py | Python | dask/order.py | galipremsagar/dask | 134182e05009dbb20bd8e59ccf8bf771e5d4399a | [
"BSD-3-Clause"
] | null | null | null | dask/order.py | galipremsagar/dask | 134182e05009dbb20bd8e59ccf8bf771e5d4399a | [
"BSD-3-Clause"
] | null | null | null | dask/order.py | galipremsagar/dask | 134182e05009dbb20bd8e59ccf8bf771e5d4399a | [
"BSD-3-Clause"
] | null | null | null | r""" Static order of nodes in dask graph
Dask makes decisions on what tasks to prioritize both
* Dynamically at runtime
* Statically before runtime
Dynamically we prefer to run tasks that were just made available. However when
several tasks become available at the same time we have an opportunity to break
ties in... | 40.132867 | 109 | 0.549608 |
c9fc5704f3bfda24310824ae9237b7767d9b06a4 | 20,443 | py | Python | neutron/tests/unit/agent/metadata/test_agent.py | freyes/neutron | 197c222acb0390728106a083d1663f2c06427518 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/agent/metadata/test_agent.py | freyes/neutron | 197c222acb0390728106a083d1663f2c06427518 | [
"Apache-2.0"
] | 3 | 2015-02-27T00:48:55.000Z | 2015-04-21T05:29:37.000Z | neutron/tests/unit/agent/metadata/test_agent.py | freyes/neutron | 197c222acb0390728106a083d1663f2c06427518 | [
"Apache-2.0"
] | 3 | 2015-02-26T00:55:17.000Z | 2020-03-01T17:05:40.000Z | # Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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 a... | 40.163065 | 79 | 0.593113 |
37163cbe2eb6bf3bbd11e510645b661343f5312f | 23,987 | py | Python | backend/tests.py | tenweek/LiveEducation | 54f2ecbf78ac7b6943a4f0329b192969fa5f6981 | [
"BSD-3-Clause"
] | 10 | 2019-03-05T10:34:31.000Z | 2021-11-25T11:10:34.000Z | backend/tests.py | tenweek/LiveEducation | 54f2ecbf78ac7b6943a4f0329b192969fa5f6981 | [
"BSD-3-Clause"
] | 4 | 2020-02-11T23:08:41.000Z | 2022-03-02T09:56:30.000Z | backend/tests.py | tenweek/LiveEducation | 54f2ecbf78ac7b6943a4f0329b192969fa5f6981 | [
"BSD-3-Clause"
] | 10 | 2017-12-27T13:31:50.000Z | 2021-05-08T01:42:22.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase, Client
from django.http import JsonResponse
from django.contrib.auth import authenticate
from backend.models import Room, User, RoomStudent, VideoRoom
import json
#共29个测试
#测试获取房间 2个测试
class TestGetRooms(TestCase):
d... | 48.166667 | 121 | 0.629383 |
7c43987d33a6c20f43203e9061dd74dae3405eee | 1,570 | py | Python | phonebook.py | prak112/python_practice | f310534d61be68c2ee9502fca666224d7d0bebae | [
"MIT"
] | null | null | null | phonebook.py | prak112/python_practice | f310534d61be68c2ee9502fca666224d7d0bebae | [
"MIT"
] | null | null | null | phonebook.py | prak112/python_practice | f310534d61be68c2ee9502fca666224d7d0bebae | [
"MIT"
] | null | null | null | # TASK
"""Given names and phone numbers, assemble a phone book that maps friends' names to their respective phone numbers.
You will then be given an unknown number of names to query your phone book for.
For each queried, print the associated entry from your phone book on a new line in the form name=phoneNumber;
if... | 37.380952 | 117 | 0.658599 |
b4b439b1bde396a9f54a71c9188a01db710ce21c | 1,393 | py | Python | unittest/qm/qmverifierTest.py | faribas/RMG-Py | 6149e29b642bf8da9537e2db98f15121f0e040c7 | [
"MIT"
] | 1 | 2021-11-15T10:30:48.000Z | 2021-11-15T10:30:48.000Z | unittest/qm/qmverifierTest.py | faribas/RMG-Py | 6149e29b642bf8da9537e2db98f15121f0e040c7 | [
"MIT"
] | null | null | null | unittest/qm/qmverifierTest.py | faribas/RMG-Py | 6149e29b642bf8da9537e2db98f15121f0e040c7 | [
"MIT"
] | 1 | 2019-06-19T08:05:21.000Z | 2019-06-19T08:05:21.000Z | """
Created on May 17, 2012
@author: nmvdewie
"""
import unittest
import rmgpy.qm.qmtp as qm
import os
import rmgpy.qm.qmverifier as verif
import rmgpy.molecule as mol
class Test(unittest.TestCase):
def testVerifierDoesNotExist(self):
molecule = mol.Molecule()
name = 'UMRZSTCPUPJPOJ-UHFFFAOYSA'
... | 33.97561 | 84 | 0.660445 |
d56a35fc719ea51add3e09c07c5c1388b50690e5 | 32,947 | py | Python | TNSAgent/tns/building_agent.py | VOLTTRON/volttron-applications | c7d3766bffddcd651e11297e1c46fc95eb308494 | [
"BSD-3-Clause"
] | 8 | 2016-11-03T05:00:58.000Z | 2020-10-18T14:49:36.000Z | TNSAgent/tns/building_agent.py | VOLTTRON/volttron-applications | c7d3766bffddcd651e11297e1c46fc95eb308494 | [
"BSD-3-Clause"
] | 29 | 2016-06-15T17:45:48.000Z | 2020-08-01T02:41:32.000Z | TNSAgent/tns/building_agent.py | VOLTTRON/volttron-applications | c7d3766bffddcd651e11297e1c46fc95eb308494 | [
"BSD-3-Clause"
] | 39 | 2016-06-08T01:57:49.000Z | 2020-05-27T14:33:44.000Z | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright (c) 2015, Battelle Memorial Institute
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistrib... | 49.321856 | 123 | 0.592072 |
63c09955af8498315fe7f9dde7156d5054f94288 | 425 | py | Python | mainapp/migrations/0004_product_reserved.py | ZeroXKiritsu/geekshop | 9a6fc6c3a5671d5701f1ba2743566f35cb8149ab | [
"MIT"
] | null | null | null | mainapp/migrations/0004_product_reserved.py | ZeroXKiritsu/geekshop | 9a6fc6c3a5671d5701f1ba2743566f35cb8149ab | [
"MIT"
] | null | null | null | mainapp/migrations/0004_product_reserved.py | ZeroXKiritsu/geekshop | 9a6fc6c3a5671d5701f1ba2743566f35cb8149ab | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-01-19 19:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mainapp', '0003_product_is_active'),
]
operations = [
migrations.AddField(
model_name='product',
name='reserved',
... | 22.368421 | 89 | 0.623529 |
cd64d22516e7d16f97d2528f2bc77094a54af355 | 6,104 | py | Python | esolang/whitespace.py | i-am-zaidali/Toxic-Cogs | 088cb364f9920c20879751da6b7333118ba1bf41 | [
"MIT"
] | 56 | 2019-03-21T21:03:26.000Z | 2022-03-14T08:26:55.000Z | esolang/whitespace.py | i-am-zaidali/Toxic-Cogs | 088cb364f9920c20879751da6b7333118ba1bf41 | [
"MIT"
] | 38 | 2019-08-20T02:18:27.000Z | 2022-02-22T11:19:05.000Z | esolang/whitespace.py | i-am-zaidali/Toxic-Cogs | 088cb364f9920c20879751da6b7333118ba1bf41 | [
"MIT"
] | 44 | 2019-07-04T06:17:54.000Z | 2022-03-25T19:18:31.000Z | from typing import List
import io
# Exceptions
class EmptyStack(SyntaxError):
"""Raised when the the stack is accessed in an empty state"""
def __init__(self, message: str, code: str, pointer: int):
if pointer > 50:
line = pointer // 50
start = line * 50
code = cod... | 30.217822 | 95 | 0.483781 |
72cafbf9efd59e632e929b921374f925a15ad658 | 310 | py | Python | mojprojekt/sklep/models.py | thehypre/django-was-2019z | caffdeb3770f5520fd4f2cf56f8baa0c168fd1f0 | [
"MIT"
] | null | null | null | mojprojekt/sklep/models.py | thehypre/django-was-2019z | caffdeb3770f5520fd4f2cf56f8baa0c168fd1f0 | [
"MIT"
] | null | null | null | mojprojekt/sklep/models.py | thehypre/django-was-2019z | caffdeb3770f5520fd4f2cf56f8baa0c168fd1f0 | [
"MIT"
] | null | null | null | from django.db import models
class Product(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=100)
price = models.FloatField(default=0)
description = models.CharField(max_length=500, default='Brak Opisu')
weight = models.FloatField(default=0)
| 23.846154 | 72 | 0.712903 |
3186c0ae4945f9892fa4da841ee1c7ca06a512ee | 1,744 | py | Python | AxonDeepSeg/visualization/generate_axons_from_myelin.py | wukathryn/axondeepseg | b5533f37d5337759fd0fd4186e286cb201b66c65 | [
"MIT"
] | 115 | 2017-11-08T02:24:31.000Z | 2022-02-10T19:03:57.000Z | AxonDeepSeg/visualization/generate_axons_from_myelin.py | wukathryn/axondeepseg | b5533f37d5337759fd0fd4186e286cb201b66c65 | [
"MIT"
] | 511 | 2017-12-05T15:23:09.000Z | 2022-02-22T19:38:43.000Z | AxonDeepSeg/visualization/generate_axons_from_myelin.py | wukathryn/axondeepseg | b5533f37d5337759fd0fd4186e286cb201b66c65 | [
"MIT"
] | 35 | 2017-11-30T13:36:28.000Z | 2022-01-10T18:11:06.000Z |
# -*- coding: utf-8 -*-
# Function to generate corrected axon+myelin image after correcting the myelin mask.
import os
import numpy as np
# AxonDeepSeg imports
import AxonDeepSeg.ads_utils as ads
from AxonDeepSeg.ads_utils import convert_path
def generate_axons_from_myelin(path_prediction,path_myelin_corrected):
... | 36.333333 | 130 | 0.759174 |
9081688ed6c25ebddd8e23a2335a0d6ee9b1248a | 7,936 | py | Python | src/clusterman/cli.py | photoszzt/clusterman | 955f14b741626eb8846736a345c5a79148964760 | [
"Apache-2.0"
] | null | null | null | src/clusterman/cli.py | photoszzt/clusterman | 955f14b741626eb8846736a345c5a79148964760 | [
"Apache-2.0"
] | null | null | null | src/clusterman/cli.py | photoszzt/clusterman | 955f14b741626eb8846736a345c5a79148964760 | [
"Apache-2.0"
] | null | null | null | """
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mclusterman` python will execute
``__main__.py`` as a... | 30.40613 | 119 | 0.683342 |
23558ae4912413293057518ef0bf614251559a21 | 165 | py | Python | sluggee/six.py | koorgoo/django-sluggee | 502d315a81f3fb26da123d15274935240e35738f | [
"MIT"
] | 4 | 2015-06-06T15:52:37.000Z | 2021-04-20T00:08:29.000Z | sluggee/six.py | koorgoo/django-sluggee | 502d315a81f3fb26da123d15274935240e35738f | [
"MIT"
] | null | null | null | sluggee/six.py | koorgoo/django-sluggee | 502d315a81f3fb26da123d15274935240e35738f | [
"MIT"
] | null | null | null | from django.utils.six import *
_u = u
def u(c):
if PY3: return c
else:
if isinstance(c, unicode): return c
else: return unicode(c,'utf-8')
| 16.5 | 43 | 0.587879 |
9d1d9d1fccfc1c41e50ba445be281ade2cb2a1e2 | 1,146 | py | Python | workshops/views.py | aiventimptner/faking-vote | fcf84adf32c69a232c2513fa09bc9db1f1818dfb | [
"MIT"
] | null | null | null | workshops/views.py | aiventimptner/faking-vote | fcf84adf32c69a232c2513fa09bc9db1f1818dfb | [
"MIT"
] | null | null | null | workshops/views.py | aiventimptner/faking-vote | fcf84adf32c69a232c2513fa09bc9db1f1818dfb | [
"MIT"
] | null | null | null | from datetime import date
from django.shortcuts import get_object_or_404
from django.views.generic import ListView, CreateView, TemplateView
from workshops.forms import ParticipantForm
from workshops.models import Workshop, Template
class WorkshopList(ListView):
model = Workshop
queryset = Workshop.objects.ex... | 31.833333 | 93 | 0.735602 |
8b99e2f539d1b4902af102100d777a7fd240b946 | 4,317 | py | Python | setup.py | xilingzhao0117/django_ecommerce | 45aba395c0d224abe0098fae3a05ea4f1d413e70 | [
"BSD-3-Clause"
] | null | null | null | setup.py | xilingzhao0117/django_ecommerce | 45aba395c0d224abe0098fae3a05ea4f1d413e70 | [
"BSD-3-Clause"
] | null | null | null | setup.py | xilingzhao0117/django_ecommerce | 45aba395c0d224abe0098fae3a05ea4f1d413e70 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Installation script:
To release a new version to PyPi:
- Ensure the version is correctly set in oscar.__init__.py
- Run: make release
"""
import os
import re
import sys
from setuptools import find_packages, setup
PROJECT_DIR = os.path.dirname(__file__)
sys.path.append(os.path.join(PROJECT_... | 33.992126 | 96 | 0.625203 |
b997f9065e454c37472831e342ee3ebf6bdd9f52 | 11,019 | py | Python | script.py | MathMatowicki/ProjektSztucznaInteligencja | fcafa5bc2870e14f5691d2d366424e7f13c88661 | [
"MIT"
] | null | null | null | script.py | MathMatowicki/ProjektSztucznaInteligencja | fcafa5bc2870e14f5691d2d366424e7f13c88661 | [
"MIT"
] | null | null | null | script.py | MathMatowicki/ProjektSztucznaInteligencja | fcafa5bc2870e14f5691d2d366424e7f13c88661 | [
"MIT"
] | null | null | null | import sys
from scipy.special import expit
import matplotlib.pyplot as plt
import os
import struct
import numpy as np
def load_mnist(path, kind='train'):
labels_path = os.path.join(path, '%s-labels.idx1-ubyte' % kind)
images_path = os.path.join(path, '%s-images.idx3-ubyte' % kind)
with open(labels_path, ... | 36.486755 | 176 | 0.559851 |
f4ad368608d04067484e03fab689480c13dd1c16 | 619 | py | Python | test/test_utils.py | aantti/haystack | 6f6f2357fdef9e98850a7ffcd80f18b05aa7cfaf | [
"Apache-2.0"
] | null | null | null | test/test_utils.py | aantti/haystack | 6f6f2357fdef9e98850a7ffcd80f18b05aa7cfaf | [
"Apache-2.0"
] | null | null | null | test/test_utils.py | aantti/haystack | 6f6f2357fdef9e98850a7ffcd80f18b05aa7cfaf | [
"Apache-2.0"
] | 1 | 2021-02-16T10:52:38.000Z | 2021-02-16T10:52:38.000Z | import pytest
from haystack.preprocessor.utils import convert_files_to_dicts, tika_convert_files_to_dicts
from haystack.preprocessor.cleaning import clean_wiki_text
@pytest.mark.tika
def test_convert_files_to_dicts(xpdf_fixture):
documents = convert_files_to_dicts(dir_path="samples", clean_func=clean_wiki_text, ... | 34.388889 | 114 | 0.831987 |
d0bb23c202286e4e4cc02dee0a07ba1bce3f2ace | 5,807 | py | Python | web-config-payload-create.py | ismailbozkurt/HACKTHEBOX-WRITEUPS | 77dea4c9d3447dfb4801ae7d6230efd28fde85bb | [
"MIT"
] | null | null | null | web-config-payload-create.py | ismailbozkurt/HACKTHEBOX-WRITEUPS | 77dea4c9d3447dfb4801ae7d6230efd28fde85bb | [
"MIT"
] | null | null | null | web-config-payload-create.py | ismailbozkurt/HACKTHEBOX-WRITEUPS | 77dea4c9d3447dfb4801ae7d6230efd28fde85bb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import pyfiglet
base_payload = """<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read, Script, Write">
<add name="web_config" path="*.config" verb="*" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\... | 30.563158 | 207 | 0.613225 |
6cf41376ec3a2a97832ecb83f1f4e9e55bd43a20 | 13,062 | py | Python | cinder/tests/unit/test_volume_rpcapi.py | overcastcloud/cinder | ad977d456c5d50e992eee95ea40f4e3dd21981dc | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/test_volume_rpcapi.py | overcastcloud/cinder | ad977d456c5d50e992eee95ea40f4e3dd21981dc | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/test_volume_rpcapi.py | overcastcloud/cinder | ad977d456c5d50e992eee95ea40f4e3dd21981dc | [
"Apache-2.0"
] | null | null | null | # Copyright 2012, Intel, 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 agree... | 40.565217 | 78 | 0.50735 |
59bf11899814e96a6445e51e5608d572c53c2f55 | 4,138 | py | Python | futuquant/examples/make_order_and_cancel.py | dongxiao999999/futuquant | c48f4b195cda6b56e28a5e12c987eab4f3621e5f | [
"Apache-2.0"
] | 8 | 2020-10-22T00:51:49.000Z | 2021-01-21T08:13:41.000Z | futuquant/examples/make_order_and_cancel.py | dongxiao999999/futuquant | c48f4b195cda6b56e28a5e12c987eab4f3621e5f | [
"Apache-2.0"
] | null | null | null | futuquant/examples/make_order_and_cancel.py | dongxiao999999/futuquant | c48f4b195cda6b56e28a5e12c987eab4f3621e5f | [
"Apache-2.0"
] | 1 | 2020-11-19T14:09:10.000Z | 2020-11-19T14:09:10.000Z | # -*- coding: utf-8 -*-
"""
验证接口:下单然后立即撤单, 为避免成交损失,买单价格港股放在十档,美股为一档下降10%, 买单数量为1手(美股为1股)
"""
from time import sleep
import sys
import os
sys.path.append(os.path.split(os.path.abspath(os.path.pardir))[0])
from futuquant.open_context import *
'''
验证接口:下单然后立即撤单, 为避免成交损失,买单价格港股放在十档,美股为一档下降10%, 买单数量为1手(美股为1股)
使用请先配置... | 30.20438 | 113 | 0.569116 |
507cc5b1e4e58f8d718056d2a8615124ca8d642f | 452 | py | Python | consul/__init__.py | snesbittsea/python-consul2 | 702916c511125240fcfb172cff8f4c2ac2f094fa | [
"MIT"
] | null | null | null | consul/__init__.py | snesbittsea/python-consul2 | 702916c511125240fcfb172cff8f4c2ac2f094fa | [
"MIT"
] | null | null | null | consul/__init__.py | snesbittsea/python-consul2 | 702916c511125240fcfb172cff8f4c2ac2f094fa | [
"MIT"
] | null | null | null | __version__ = '0.1.1'
from consul.base import ACLDisabled # noqa
from consul.base import ACLPermissionDenied # noqa
from consul.base import Check # noqa
from consul.base import ConsulException # noqa
from consul.base import NotFound # noqa
from consul.base import Timeout # noqa
from consul.std import Consul # n... | 34.769231 | 51 | 0.767699 |
bd118a08e5c15b15782caa104b8cbe37b51281ba | 46,444 | py | Python | labelImg.py | lvchigo/labelImg_mutilabel | 0042fcca8604424e810b62cf2e76076f17b2f9cd | [
"MIT"
] | null | null | null | labelImg.py | lvchigo/labelImg_mutilabel | 0042fcca8604424e810b62cf2e76076f17b2f9cd | [
"MIT"
] | null | null | null | labelImg.py | lvchigo/labelImg_mutilabel | 0042fcca8604424e810b62cf2e76076f17b2f9cd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
import _init_path
import os.path
import re
import sys
import subprocess
import shutil
from functools import partial
from collections import defaultdict
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import resources
from lib import struct, newAction, newIcon, addAc... | 38.606816 | 122 | 0.595211 |
b5ac6aad15d25dcdb491a267051b1a8ee5360954 | 337 | py | Python | list_objects_and_methods_lab_13.py | QPThree/python-mycode | 9823fa89eee3019287200f1af8a01efd181fcc79 | [
"MIT"
] | 1 | 2022-01-05T16:07:46.000Z | 2022-01-05T16:07:46.000Z | list_objects_and_methods_lab_13.py | QPThree/python-mycode | 9823fa89eee3019287200f1af8a01efd181fcc79 | [
"MIT"
] | null | null | null | list_objects_and_methods_lab_13.py | QPThree/python-mycode | 9823fa89eee3019287200f1af8a01efd181fcc79 | [
"MIT"
] | null | null | null | #Lab 13
proto = ["ssh", "http", "https"]
protoa = ["ssh", "http", "https"]
print(proto)
print(proto[1])
proto.append("dns")
print(proto)
proto2 = [ 22, 80, 443, 53 ]
proto.extend(proto2) # pass proto2 as an argument to the extend method
print(proto)
protoa.append(proto2) # pass proto2 as an argument to the append met... | 24.071429 | 71 | 0.694362 |
464b742e3a909932241c8fafad2caac2b3114cf7 | 7,135 | py | Python | seq2seq/trainer/supervised_trainer.py | sooftware/Awesome-seq2seq | 646c3cd70f19c761a657cb7ea7a54be04934a58d | [
"Apache-2.0"
] | 8 | 2020-02-10T17:08:10.000Z | 2020-03-24T07:31:46.000Z | seq2seq/trainer/supervised_trainer.py | sooftware/PyTorch-Seq2seq | 646c3cd70f19c761a657cb7ea7a54be04934a58d | [
"Apache-2.0"
] | null | null | null | seq2seq/trainer/supervised_trainer.py | sooftware/PyTorch-Seq2seq | 646c3cd70f19c761a657cb7ea7a54be04934a58d | [
"Apache-2.0"
] | 1 | 2021-08-21T12:52:39.000Z | 2021-08-21T12:52:39.000Z | import logging
import os
import random
import torch
import torchtext
from seq2seq.loss.loss import NLLLoss
from seq2seq.checkpoint.checkpoint import Checkpoint
class SupervisedTrainer(object):
""" The SupervisedTrainer class helps in setting up a training framework in a
supervised setting.
Args:
e... | 41.970588 | 117 | 0.60883 |
a51d706990b927a11ac4e838eeefb40ea19c9b91 | 2,159 | py | Python | lib/googlecloudsdk/third_party/apis/cloudfunctions/v1/resources.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/third_party/apis/cloudfunctions/v1/resources.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/third_party/apis/cloudfunctions/v1/resources.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2015 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 25.702381 | 74 | 0.624826 |
aaae32263ed85f674222d3cf3ada17205957c211 | 7,153 | py | Python | canvas_course_site_wizard/mixins.py | Harvard-University-iCommons/django-canvas-course-site-wizard | 0210849e959407e5a850188f50756eb69b9a4dc2 | [
"MIT"
] | null | null | null | canvas_course_site_wizard/mixins.py | Harvard-University-iCommons/django-canvas-course-site-wizard | 0210849e959407e5a850188f50756eb69b9a4dc2 | [
"MIT"
] | 5 | 2018-05-10T19:49:43.000Z | 2021-01-29T19:39:34.000Z | canvas_course_site_wizard/mixins.py | Harvard-University-iCommons/django-canvas-course-site-wizard | 0210849e959407e5a850188f50756eb69b9a4dc2 | [
"MIT"
] | null | null | null | from .models_api import get_course_data
from icommons_common.canvas_utils import SessionInactivityExpirationRC
from canvas_sdk.methods import admins
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
from django.views.generic.detail import SingleObjectMixin
from django.http import Http404
from djan... | 46.148387 | 115 | 0.692157 |
b1988442510b78c07a1e5091e7742c20c2bf518c | 1,903 | py | Python | dlk/core/schedulers/constant.py | cstsunfu/dlkit | 69e0efd372fa5c0ae5313124d0ba1ef55b535196 | [
"Apache-2.0"
] | null | null | null | dlk/core/schedulers/constant.py | cstsunfu/dlkit | 69e0efd372fa5c0ae5313124d0ba1ef55b535196 | [
"Apache-2.0"
] | null | null | null | dlk/core/schedulers/constant.py | cstsunfu/dlkit | 69e0efd372fa5c0ae5313124d0ba1ef55b535196 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 cstsunfu. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 31.196721 | 87 | 0.676826 |
a402f8a1b0b28dbe6c39e3c3c516fd31ff60514e | 21,588 | py | Python | components/icdc-fence/tests/scripting/test_fence-create.py | CBIIT/icdc-docker | 5dc78b96a8d885b3fa427c55b9cc19f4771910fa | [
"Apache-2.0"
] | 2 | 2019-06-10T15:30:51.000Z | 2020-01-18T23:24:13.000Z | components/icdc-fence/tests/scripting/test_fence-create.py | CBIIT/icdc-docker | 5dc78b96a8d885b3fa427c55b9cc19f4771910fa | [
"Apache-2.0"
] | null | null | null | components/icdc-fence/tests/scripting/test_fence-create.py | CBIIT/icdc-docker | 5dc78b96a8d885b3fa427c55b9cc19f4771910fa | [
"Apache-2.0"
] | 1 | 2022-03-31T09:52:46.000Z | 2022-03-31T09:52:46.000Z | import time
import mock
# Python 2 and 3 compatible
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from mock import MagicMock
import pytest
import cirrus
from cirrus.google_cloud.errors import GoogleAuthError
from fence.config import config
from fence.jwt.validate import vali... | 31.561404 | 95 | 0.686678 |
e4bf46b21eef23ab6088edbc6c7bdfddc7048312 | 1,170 | py | Python | Struct_Example/struct_example_compiler2.0.py | ONT-Avocados/python-template | 0acb5032adf8f4968c5d46cf53681f31ac917650 | [
"Apache-2.0"
] | 17 | 2018-09-26T07:09:16.000Z | 2020-05-28T06:16:47.000Z | Struct_Example/struct_example_compiler2.0.py | zhangxiaocong/python-template | 0acb5032adf8f4968c5d46cf53681f31ac917650 | [
"Apache-2.0"
] | 8 | 2018-09-26T02:08:04.000Z | 2021-12-14T02:53:26.000Z | Struct_Example/struct_example_compiler2.0.py | zhangxiaocong/python-template | 0acb5032adf8f4968c5d46cf53681f31ac917650 | [
"Apache-2.0"
] | 30 | 2018-09-25T08:27:42.000Z | 2020-12-08T09:02:33.000Z | OntCversion = '2.0.0'
from ontology.interop.System.Runtime import Notify, CheckWitness
from ontology.interop.Ontology.Native import Invoke
from ontology.builtins import state
contractAddress = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01')
def Main(operation, args):
... | 24.375 | 112 | 0.636752 |
916527836e1de4b3e2efb6d1eb9ec52ef5030358 | 839 | py | Python | backend/setup.py | simonfong6/applications | dea9e324f33b3647ab8e1fcf01f67b37e20e37a9 | [
"MIT"
] | null | null | null | backend/setup.py | simonfong6/applications | dea9e324f33b3647ab8e1fcf01f67b37e20e37a9 | [
"MIT"
] | null | null | null | backend/setup.py | simonfong6/applications | dea9e324f33b3647ab8e1fcf01f67b37e20e37a9 | [
"MIT"
] | null | null | null | from setuptools import find_packages
from setuptools import setup
setup(
name="applications",
version="0.0.1",
author="Simon Fong",
author_email="simonfong6@gmail.com",
description="A package.",
long_description="Description",
long_description_content_type="text/markdown",
url="https://... | 27.064516 | 53 | 0.578069 |
aa8bbcf5a01553b1dda0d1840d77b3d26ad2d6e1 | 8,923 | py | Python | src/lib/trains/landmark.py | nerminsamet/HPRNet | a23e691102ed50bd24391e6295c74f452592cdae | [
"MIT"
] | 34 | 2021-06-09T16:47:59.000Z | 2022-03-29T08:03:46.000Z | src/lib/trains/landmark.py | nerminsamet/HPRNet | a23e691102ed50bd24391e6295c74f452592cdae | [
"MIT"
] | 3 | 2021-12-14T11:47:06.000Z | 2022-03-17T04:08:39.000Z | src/lib/trains/landmark.py | nerminsamet/HPRNet | a23e691102ed50bd24391e6295c74f452592cdae | [
"MIT"
] | 4 | 2021-06-10T07:44:15.000Z | 2021-08-30T07:12:40.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
import numpy as np
from src.lib.models.losses import FocalLoss, RegL1Loss, RegLoss, RegWeightedL1Loss
from src.lib.models.decode import multi_pose_decode
from src.lib.models.utils import _sigmoid,... | 50.412429 | 107 | 0.536815 |
eac272a05fb56ea3ff4ca5f4f0f88dba048f3657 | 25,915 | py | Python | tests/functional/conftest.py | ashahba/OpenVINO-model-server | feb7d7119f56fa0787b83393e38e8ea36762a34b | [
"Apache-2.0"
] | null | null | null | tests/functional/conftest.py | ashahba/OpenVINO-model-server | feb7d7119f56fa0787b83393e38e8ea36762a34b | [
"Apache-2.0"
] | 4 | 2020-09-26T01:26:14.000Z | 2021-08-25T16:12:47.000Z | tests/functional/conftest.py | ashahba/OpenVINO-model-server | feb7d7119f56fa0787b83393e38e8ea36762a34b | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2018-2019 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 agre... | 40.492188 | 114 | 0.633494 |
6c12e7e490e27a92cffc08708422973fec34b5c7 | 4,425 | py | Python | 8-CCMP_windspeed_process.py | nicpittman/tropical_pacific_carbon_export | eacd3e0382616388f418eb21cad859fe7ae0144a | [
"Apache-2.0"
] | null | null | null | 8-CCMP_windspeed_process.py | nicpittman/tropical_pacific_carbon_export | eacd3e0382616388f418eb21cad859fe7ae0144a | [
"Apache-2.0"
] | null | null | null | 8-CCMP_windspeed_process.py | nicpittman/tropical_pacific_carbon_export | eacd3e0382616388f418eb21cad859fe7ae0144a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 3 12:11:42 2021
@author: npittman
"""
import numpy as np
import pandas as pd
import xarray as xr
import matplotlib.pyplot as plt
import requests
import os
import sys
import xesmf as xe
glob=True
download=False
#http://data.remss.com/ccmp/v02.0/Y... | 31.834532 | 139 | 0.662373 |
6ce6da482cbab1cd07487cf8af0fa530b3192799 | 1,099 | py | Python | ceres/wallet/puzzles/p2_delegated_puzzle.py | duderino999/ceres-combineharvester | f63ab6c4d0e33c3b6550c1f5641f28ab2c68b001 | [
"Apache-2.0"
] | 39 | 2021-08-04T14:49:27.000Z | 2022-03-29T16:30:19.000Z | ceres/wallet/puzzles/p2_delegated_puzzle.py | rickguo216/ceres-combineharvester | e93b26a77b1fc4fe9de80d10f745b09a13f9c288 | [
"Apache-2.0"
] | 30 | 2021-08-19T22:44:31.000Z | 2022-03-29T19:09:26.000Z | ceres/wallet/puzzles/p2_delegated_puzzle.py | rickguo216/ceres-combineharvester | e93b26a77b1fc4fe9de80d10f745b09a13f9c288 | [
"Apache-2.0"
] | 23 | 2021-08-07T07:33:20.000Z | 2022-03-27T11:15:00.000Z | """
Pay to delegated puzzle
In this puzzle program, the solution must be a signed delegated puzzle, along with
its (unsigned) solution. The delegated puzzle is executed, passing in the solution.
This obviously could be done recursively, arbitrarily deep (as long as the maximum
cost is not exceeded).
If you want to sp... | 32.323529 | 101 | 0.805278 |
adbee680248ffdc004f5e6b1e9743cd85d263997 | 976 | bzl | Python | googleurl/build_config/common_settings.bzl | MacroLau/quiche | 21b1a63ead0a03497127d7f9ae74c3f0eed07e58 | [
"Apache-2.0"
] | 102 | 2021-05-18T10:31:57.000Z | 2022-03-29T04:25:42.000Z | googleurl/build_config/common_settings.bzl | MacroLau/quiche | 21b1a63ead0a03497127d7f9ae74c3f0eed07e58 | [
"Apache-2.0"
] | 11 | 2019-10-15T23:03:57.000Z | 2020-06-14T16:10:12.000Z | googleurl/build_config/common_settings.bzl | MacroLau/quiche | 21b1a63ead0a03497127d7f9ae74c3f0eed07e58 | [
"Apache-2.0"
] | 23 | 2021-05-18T13:07:50.000Z | 2022-02-24T02:16:02.000Z | # Copyright 2019 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 36.148148 | 117 | 0.76332 |
43fa934675fad004d0bb3abc0e300b8cd77813c9 | 58,768 | py | Python | rmgpy/data/base.py | cfgoldsmith/RMG-Py | 375d9039f5206ed49a4ce2884085ec1428d00627 | [
"MIT"
] | null | null | null | rmgpy/data/base.py | cfgoldsmith/RMG-Py | 375d9039f5206ed49a4ce2884085ec1428d00627 | [
"MIT"
] | 72 | 2016-06-06T18:18:49.000Z | 2019-11-17T03:21:10.000Z | rmgpy/data/base.py | cfgoldsmith/RMG-Py | 375d9039f5206ed49a4ce2884085ec1428d00627 | [
"MIT"
] | 3 | 2017-09-22T15:47:37.000Z | 2021-12-30T23:51:47.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# #
# RMG - Reaction Mechanism Generator #
# ... | 42.585507 | 215 | 0.550827 |
834c0cbf8587f757aeeb24e22431b30514692992 | 9,517 | py | Python | okl4_kernel/okl4_2.1.1-patch.9/tools/pyelf/weaver/display.py | CyberQueenMara/baseband-research | e1605537e10c37e161fff1a3416b908c9894f204 | [
"MIT"
] | 77 | 2018-12-31T22:12:09.000Z | 2021-12-31T22:56:13.000Z | okl4_kernel/okl4_2.1.1-patch.9/tools/pyelf/weaver/display.py | CyberQueenMara/baseband-research | e1605537e10c37e161fff1a3416b908c9894f204 | [
"MIT"
] | null | null | null | okl4_kernel/okl4_2.1.1-patch.9/tools/pyelf/weaver/display.py | CyberQueenMara/baseband-research | e1605537e10c37e161fff1a3416b908c9894f204 | [
"MIT"
] | 24 | 2019-01-20T15:51:52.000Z | 2021-12-25T18:29:13.000Z | ##############################################################################
# Copyright (c) 2007 Open Kernel Labs, Inc. (Copyright Holder).
# All rights reserved.
#
# 1. Redistribution and use of OKL4 (Software) in source and binary
# forms, with or without modification, are permitted provided that the
# following ... | 43.259091 | 96 | 0.616896 |
4eb256f1e5014eaf96da1c045d80ff6fa054ced0 | 3,050 | py | Python | tests/test_std_shift_intensityd.py | KohYoungResearchAmerica/MONAI | eca3f19182b9fcee0be7123728a9826cd382d152 | [
"Apache-2.0"
] | 2,971 | 2019-10-16T23:53:16.000Z | 2022-03-31T20:58:24.000Z | tests/test_std_shift_intensityd.py | KohYoungResearchAmerica/MONAI | eca3f19182b9fcee0be7123728a9826cd382d152 | [
"Apache-2.0"
] | 2,851 | 2020-01-10T16:23:44.000Z | 2022-03-31T22:14:53.000Z | tests/test_std_shift_intensityd.py | KohYoungResearchAmerica/MONAI | eca3f19182b9fcee0be7123728a9826cd382d152 | [
"Apache-2.0"
] | 614 | 2020-01-14T19:18:01.000Z | 2022-03-31T14:06:14.000Z | # Copyright 2020 - 2021 MONAI Consortium
# 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 wri... | 42.361111 | 119 | 0.641967 |
f1bcc17375194a5dea62da8e10f2b53283b0cc97 | 3,016 | py | Python | attendees/occasions/views/page/datagrid_user_organization_attendances.py | xjlin0/-attendees30 | 48a2f2cbec11ec471d7a40d24903b48890feebf9 | [
"MIT"
] | null | null | null | attendees/occasions/views/page/datagrid_user_organization_attendances.py | xjlin0/-attendees30 | 48a2f2cbec11ec471d7a40d24903b48890feebf9 | [
"MIT"
] | null | null | null | attendees/occasions/views/page/datagrid_user_organization_attendances.py | xjlin0/-attendees30 | 48a2f2cbec11ec471d7a40d24903b48890feebf9 | [
"MIT"
] | null | null | null | from datetime import timedelta
from django.utils import timezone
import pytz
import time
from django.db.models import Q
from django.views.generic.list import ListView
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.http import Http404
from djan... | 39.168831 | 109 | 0.690981 |
0d34b270c1b7ceef9ba5b5e56ece43390f570f33 | 2,267 | py | Python | src/models/CollabSessions.py | teatauri/Collab-2-Panopto | 84972d3c5b32e741149dd857b284ca02cdc32e59 | [
"MIT"
] | 2 | 2021-07-27T12:08:33.000Z | 2021-12-18T23:00:51.000Z | src/models/CollabSessions.py | teatauri/Collab-2-Panopto | 84972d3c5b32e741149dd857b284ca02cdc32e59 | [
"MIT"
] | 2 | 2021-07-29T11:22:58.000Z | 2021-07-29T11:25:12.000Z | src/models/CollabSessions.py | teatauri/Collab-2-Panopto | 84972d3c5b32e741149dd857b284ca02cdc32e59 | [
"MIT"
] | 1 | 2022-01-18T12:47:48.000Z | 2022-01-18T12:47:48.000Z | import requests
from src.views import Logger
from src.models import Utilities as Utils
LOGGER = Logger.init_logger(__name__)
class CollabSessions:
def __init__(self, url, token, cert):
LOGGER.debug("")
self.url = url
self.token = token
self.cert = cert
def get_recordings(self... | 33.835821 | 82 | 0.58712 |
ac7500616db0a20a53f68ef491e115dbcb8f4773 | 182,981 | py | Python | languages/ko.py | PeterDaveHello/eden | 26174a9dde2f19cd3bc879694f373ad5f765b6ed | [
"MIT"
] | null | null | null | languages/ko.py | PeterDaveHello/eden | 26174a9dde2f19cd3bc879694f373ad5f765b6ed | [
"MIT"
] | null | null | null | languages/ko.py | PeterDaveHello/eden | 26174a9dde2f19cd3bc879694f373ad5f765b6ed | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
{
"'Cancel' will indicate an asset log entry did not occur": "' 취소 ' 자산 로그 항목을 표시합니다 발생하지 않았습니다.",
"A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that has a boundary for the area.": "위치 이... | 45.562998 | 655 | 0.671594 |
dbf7c9a9d2755588399886e829994742c875ce34 | 4,789 | py | Python | test/functional/httpbasics.py | wolfoxonly/dake | 81b684a132561b838a37489d025e82b6408ced18 | [
"MIT"
] | 1 | 2019-09-03T07:02:30.000Z | 2019-09-03T07:02:30.000Z | test/functional/httpbasics.py | wolfoxonly/dake | 81b684a132561b838a37489d025e82b6408ced18 | [
"MIT"
] | 1 | 2018-06-12T05:18:32.000Z | 2018-06-12T05:18:32.000Z | test/functional/httpbasics.py | wolfoxonly/dake | 81b684a132561b838a37489d025e82b6408ced18 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The DakeCoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the RPC HTTP basics."""
from test_framework.test_framework import DakeCoinTestFramework
from tes... | 43.93578 | 109 | 0.633535 |
4690a0ad64ad8cbf23dc17e13869d304c49ba1ad | 45,059 | py | Python | src/transformers/models/electra/modeling_flax_electra.py | techthiyanes/transformers | 705d65368fb28246534ef636fe62c008f4fb2682 | [
"Apache-2.0"
] | 2 | 2021-11-25T13:27:29.000Z | 2022-02-25T19:21:19.000Z | src/transformers/models/electra/modeling_flax_electra.py | techthiyanes/transformers | 705d65368fb28246534ef636fe62c008f4fb2682 | [
"Apache-2.0"
] | 1 | 2022-03-26T12:10:11.000Z | 2022-03-26T12:10:11.000Z | src/transformers/models/electra/modeling_flax_electra.py | techthiyanes/transformers | 705d65368fb28246534ef636fe62c008f4fb2682 | [
"Apache-2.0"
] | 1 | 2022-01-12T14:45:41.000Z | 2022-01-12T14:45:41.000Z | # coding=utf-8
# Copyright 2021 The Google Flax Team Authors and The HuggingFace Inc. team.
#
# 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
... | 36.48502 | 156 | 0.670321 |
2d79f39fc0c79b4cb998e00b4bec29a305f0befd | 1,585 | py | Python | gallery/migrations/0001_initial.py | Lornakimani62/PERSONAL-GALLERY-1P7 | 93fc23d09da44bb1e79d104f311a7c6cf84b4881 | [
"MIT"
] | null | null | null | gallery/migrations/0001_initial.py | Lornakimani62/PERSONAL-GALLERY-1P7 | 93fc23d09da44bb1e79d104f311a7c6cf84b4881 | [
"MIT"
] | null | null | null | gallery/migrations/0001_initial.py | Lornakimani62/PERSONAL-GALLERY-1P7 | 93fc23d09da44bb1e79d104f311a7c6cf84b4881 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-12-09 17:07
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | 33.723404 | 116 | 0.569716 |
b8a90ed04251b306cf392afe1ec7d56221e77f3f | 1,583 | py | Python | wordCloudQQ.py | DrAugus/AugusTestPython | cf4db43fbfe1d04bff98c79c3f36a65e0f3bc9c9 | [
"MIT"
] | null | null | null | wordCloudQQ.py | DrAugus/AugusTestPython | cf4db43fbfe1d04bff98c79c3f36a65e0f3bc9c9 | [
"MIT"
] | null | null | null | wordCloudQQ.py | DrAugus/AugusTestPython | cf4db43fbfe1d04bff98c79c3f36a65e0f3bc9c9 | [
"MIT"
] | null | null | null | import jieba # 中文分词组件
import numpy as np
# from PIL import Image
# from wordcloud import WordCloud
# import matplotlib.pyplot as plt
def wordCloudQQ():
# 步骤一:将文本导入到程序中
text = open(r'C:\Users\Administrator\Desktop\2.txt', encoding='utf-8')
# 步骤二:净化文本数据
text_clean = open(r'C:\Users\Administrator\Desk... | 27.293103 | 147 | 0.648768 |
af6c56213b560fd6e578fc6cf35b7968d56d5af9 | 3,577 | py | Python | game/simulator.py | arturovaldivia/LG-competition | ea418bd52417ce3da10e278bcc50898fbfade080 | [
"MIT"
] | null | null | null | game/simulator.py | arturovaldivia/LG-competition | ea418bd52417ce3da10e278bcc50898fbfade080 | [
"MIT"
] | null | null | null | game/simulator.py | arturovaldivia/LG-competition | ea418bd52417ce3da10e278bcc50898fbfade080 | [
"MIT"
] | null | null | null | import requests
import json
class BaseSimulator(object):
def __init__(self, host: str = 'http://localhost:8080', **kwargs):
self.host = host
def load(self, level_index: int, seed: int) -> any:
return self._do_request('/load', {
'seed': seed,
'levelIndex': level_index
... | 32.225225 | 115 | 0.567515 |
63b9216c58067eac905ac6f37bff92ae5aff7fed | 8,678 | py | Python | temboardagent/plugins/monitoring/__init__.py | pierrehilbert/temboard-agent | 40c670dd607c6fea651630a353ebe639f4ba661e | [
"PostgreSQL"
] | null | null | null | temboardagent/plugins/monitoring/__init__.py | pierrehilbert/temboard-agent | 40c670dd607c6fea651630a353ebe639f4ba661e | [
"PostgreSQL"
] | null | null | null | temboardagent/plugins/monitoring/__init__.py | pierrehilbert/temboard-agent | 40c670dd607c6fea651630a353ebe639f4ba661e | [
"PostgreSQL"
] | null | null | null | import time
import os
import logging
import json
try:
from urllib2 import HTTPError
except ImportError:
from urllib.error import HTTPError
from temboardagent.toolkit import taskmanager
from temboardagent.routing import RouteSet
from temboardagent.toolkit.configuration import OptionSpec
from temboardagent.toolk... | 30.992857 | 78 | 0.680917 |
4dee14c72ae15107680960727dfe0dde40bb6514 | 1,255 | py | Python | python/input_args_cli/input_from_cli.py | punisherVX/Skillets | a9e9055742b6ad0751547393087d6508a07e034b | [
"Apache-2.0"
] | null | null | null | python/input_args_cli/input_from_cli.py | punisherVX/Skillets | a9e9055742b6ad0751547393087d6508a07e034b | [
"Apache-2.0"
] | null | null | null | python/input_args_cli/input_from_cli.py | punisherVX/Skillets | a9e9055742b6ad0751547393087d6508a07e034b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# This example uses CLI arguments to gather input from the user
# The .meta-cnc file defines 3 input variables:
# username, password, and secret
#
# This script shows how to obtain the values entered from the user
#
import argparse
import sys
def main():
print('*' * 80)
print('This ... | 26.702128 | 86 | 0.658964 |
321f77dcc6854ecf4a0697ca104010bbe555c8e7 | 3,427 | py | Python | pyjsonrpc/cp.py | digimatspa/python-jsonrpc | 7f8a022c112f8957cee18c54fc48557690cfe417 | [
"MIT"
] | null | null | null | pyjsonrpc/cp.py | digimatspa/python-jsonrpc | 7f8a022c112f8957cee18c54fc48557690cfe417 | [
"MIT"
] | null | null | null | pyjsonrpc/cp.py | digimatspa/python-jsonrpc | 7f8a022c112f8957cee18c54fc48557690cfe417 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
"""
Use JSON-RPC with CherryPy
http://www.cherrypy.org/
http://cherrypy.readthedocs.org/
"""
import os
import six
import cherrypy
if six.PY2:
import httplib
import rpclib
import rpcrequest
import cherrypy
import rpcjson
import tools
else:
import http.... | 27.637097 | 85 | 0.586811 |
daeec04412c964248e2ffa35aa10ad3bd1d48774 | 2,394 | py | Python | Zoo/Zoo/migrations/0001_initial.py | DiogenesPuig/PVD_1 | 79b8e5dd3a0abf3f7e22ceb6230bbcc2ee8abcca | [
"MIT"
] | null | null | null | Zoo/Zoo/migrations/0001_initial.py | DiogenesPuig/PVD_1 | 79b8e5dd3a0abf3f7e22ceb6230bbcc2ee8abcca | [
"MIT"
] | null | null | null | Zoo/Zoo/migrations/0001_initial.py | DiogenesPuig/PVD_1 | 79b8e5dd3a0abf3f7e22ceb6230bbcc2ee8abcca | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-09-25 14:44
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Personal',
fields=[
... | 41.275862 | 191 | 0.579365 |
195cbc6fa67aeba790c21b5d1f196b2cf5aeaaca | 159 | py | Python | tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_Lag1Trend_Seasonal_MonthOfYear_AR.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_Lag1Trend_Seasonal_MonthOfYear_AR.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_Lag1Trend_Seasonal_MonthOfYear_AR.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['BoxCox'] , ['Lag1Trend'] , ['Seasonal_MonthOfYear'] , ['AR'] ); | 39.75 | 86 | 0.754717 |
891dee63db1998d67849b193960f603389405c69 | 913 | py | Python | test/nn/conv/test_appnp.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 2,350 | 2021-09-12T08:32:50.000Z | 2022-03-31T18:09:36.000Z | test/nn/conv/test_appnp.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 588 | 2021-09-12T08:49:08.000Z | 2022-03-31T21:02:13.000Z | test/nn/conv/test_appnp.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 505 | 2021-09-13T13:13:32.000Z | 2022-03-31T15:54:00.000Z | import torch
from torch_sparse import SparseTensor
from torch_geometric.nn import APPNP
from torch_geometric.testing import is_full_test
def test_appnp():
x = torch.randn(4, 16)
edge_index = torch.tensor([[0, 0, 0, 1, 2, 3], [1, 2, 3, 0, 0, 0]])
row, col = edge_index
adj = SparseTensor(row=row, col=c... | 32.607143 | 71 | 0.624315 |
57bdc0f36d35523955e9362602ce4ddfb8ce3851 | 1,775 | py | Python | test/test_occurrence_less_than_or_equal_to.py | nodeum-io/nodeum-sdk-python | 205536491bff507dea7be44af46202c17e7121d9 | [
"MIT"
] | null | null | null | test/test_occurrence_less_than_or_equal_to.py | nodeum-io/nodeum-sdk-python | 205536491bff507dea7be44af46202c17e7121d9 | [
"MIT"
] | null | null | null | test/test_occurrence_less_than_or_equal_to.py | nodeum-io/nodeum-sdk-python | 205536491bff507dea7be44af46202c17e7121d9 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Nodeum API
# About This document describes the Nodeum API version 2: If you are looking for any information about the product itself, reach the product website https://www.nodeum.io. You can also contact us at this email address : info@nodeum.io # Filter parameters When browsing a list ... | 44.375 | 876 | 0.716056 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.