hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0fd3f38639b58bfaa2d13a8e15df20cc8f1aedbf | 1,675 | py | Python | keckcode/esiredux/esi1d.py | cdfassnacht/keck_code | a952b3806b3e64eef70deec2b2d1352e6ef6dfa0 | [
"MIT"
] | null | null | null | keckcode/esiredux/esi1d.py | cdfassnacht/keck_code | a952b3806b3e64eef70deec2b2d1352e6ef6dfa0 | [
"MIT"
] | null | null | null | keckcode/esiredux/esi1d.py | cdfassnacht/keck_code | a952b3806b3e64eef70deec2b2d1352e6ef6dfa0 | [
"MIT"
] | 1 | 2020-07-15T23:16:36.000Z | 2020-07-15T23:16:36.000Z | import numpy as np
from astropy.table import Table
from specim.specfuncs import echelle1d
"""
============================== Esi1d class ==============================
"""
class Esi1d(echelle1d.Ech1d):
"""
A class for ESI 1D spectra, which have been extracted by the Esi2d
methods, but have not yet been c... | 31.603774 | 79 | 0.519403 |
6542bb7cfb613ccd399cc99b96409fbf75f0166c | 347 | py | Python | python/example_code/iam/iam_basics/test/conftest.py | gabehollombe-aws/aws-doc-sdk-examples | dfc0e06ebe1762ab127f3ef5f425507644c6a99c | [
"Apache-2.0"
] | 5,166 | 2016-09-02T08:48:38.000Z | 2022-03-31T19:12:43.000Z | python/example_code/iam/iam_basics/test/conftest.py | gabehollombe-aws/aws-doc-sdk-examples | dfc0e06ebe1762ab127f3ef5f425507644c6a99c | [
"Apache-2.0"
] | 1,186 | 2016-09-28T23:05:19.000Z | 2022-03-31T18:07:47.000Z | python/example_code/iam/iam_basics/test/conftest.py | gabehollombe-aws/aws-doc-sdk-examples | dfc0e06ebe1762ab127f3ef5f425507644c6a99c | [
"Apache-2.0"
] | 4,003 | 2016-08-29T19:51:40.000Z | 2022-03-31T16:40:02.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Contains common test fixtures used to run AWS Identity and Access Management (IAM)
tests.
"""
import sys
# This is needed so Python can find test_tools on the path.
sys.path.append('../../..')
from test_tool... | 26.692308 | 82 | 0.740634 |
0621d34561a1d8ea0b4e9dca5a8889df597c87e3 | 505 | py | Python | logging/logger_mongo.py | flyhigher139/flask_example | 9a109d10616f6c63e8b3e0f119e9ec7c3c90d703 | [
"MIT"
] | 3 | 2016-09-10T15:00:36.000Z | 2020-05-27T09:14:18.000Z | logging/logger_mongo.py | flyhigher139/flask_example | 9a109d10616f6c63e8b3e0f119e9ec7c3c90d703 | [
"MIT"
] | null | null | null | logging/logger_mongo.py | flyhigher139/flask_example | 9a109d10616f6c63e8b3e0f119e9ec7c3c90d703 | [
"MIT"
] | 4 | 2017-08-31T02:00:22.000Z | 2021-01-13T05:20:22.000Z | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
import logging
from log4mongo.handlers import MongoHandler
logger = logging.getLogger('mongo_example')
mon = MongoHandler(host='localhost', database_name='mongo_logs')
mon.setLevel(logging.WARNING)
ch = logging.StreamHandler()
ch.setLevel(logging.ERROR)
logger.addHan... | 21.956522 | 64 | 0.768317 |
e0b235e1818e2eba00700c075e90262a048ad565 | 2,934 | py | Python | model_basics.py | kondiz/casme | 52cd5769bb7c1089934dd528a331afaf3882eff2 | [
"BSD-3-Clause"
] | 79 | 2018-06-05T21:26:55.000Z | 2022-03-12T13:44:15.000Z | model_basics.py | kondiz/casme | 52cd5769bb7c1089934dd528a331afaf3882eff2 | [
"BSD-3-Clause"
] | 1 | 2019-10-30T12:51:54.000Z | 2019-11-06T11:51:28.000Z | model_basics.py | kondiz/casme | 52cd5769bb7c1089934dd528a331afaf3882eff2 | [
"BSD-3-Clause"
] | 13 | 2018-06-06T03:31:11.000Z | 2021-03-09T11:38:17.000Z | import numpy as np
import scipy.ndimage
import torch
import torch.nn.functional as F
import archs
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
def load_model(casm_path):
name = casm_path.split('/')[-1].replace('.chk','')
print("\n=> Loading model localized in '{}'".format(casm_pa... | 32.241758 | 106 | 0.639741 |
59c5276f5d38df4166a83b84b5b9460bf8a6f727 | 1,759 | py | Python | unit/test_bootstrap_vshard.py | FizikRoot/ansible-cartridge | ad06411ec701b68fbf5b8ed5e184a47ffb0ac70f | [
"BSD-2-Clause"
] | 17 | 2019-09-02T15:31:56.000Z | 2022-03-29T18:49:59.000Z | unit/test_bootstrap_vshard.py | FizikRoot/ansible-cartridge | ad06411ec701b68fbf5b8ed5e184a47ffb0ac70f | [
"BSD-2-Clause"
] | 171 | 2019-10-24T15:34:34.000Z | 2022-03-29T09:18:46.000Z | unit/test_bootstrap_vshard.py | FizikRoot/ansible-cartridge | ad06411ec701b68fbf5b8ed5e184a47ffb0ac70f | [
"BSD-2-Clause"
] | 14 | 2019-12-23T08:27:06.000Z | 2021-07-06T15:53:49.000Z | import sys
import unittest
import module_utils.helpers as helpers
from unit.instance import Instance
sys.modules['ansible.module_utils.helpers'] = helpers
from library.cartridge_bootstrap_vshard import bootstrap_vshard
def call_bootstrap_vshard(console_sock):
return bootstrap_vshard({
'console_sock': co... | 30.859649 | 77 | 0.715179 |
08c8c27acd0761df667428a39c3da702ec3d50f8 | 12,704 | py | Python | char_gen.py | turpenar/dion | 48ce4e664441c107e39293ebc4aae4d1e88faf13 | [
"0BSD"
] | null | null | null | char_gen.py | turpenar/dion | 48ce4e664441c107e39293ebc4aae4d1e88faf13 | [
"0BSD"
] | null | null | null | char_gen.py | turpenar/dion | 48ce4e664441c107e39293ebc4aae4d1e88faf13 | [
"0BSD"
] | null | null | null |
import tkinter as tk
import pathlib as pathlib
import pickle as pickle
import player as player
import world as world
global terminal_output
def link_terminal(terminal):
global terminal_output
terminal_output = terminal
class General(tk.Frame):
def __init__(self, parent, *args, **kwargs):
tk.Fr... | 37.037901 | 131 | 0.623898 |
804ff3b804987b14f0561b15872a534bfae36db1 | 5,976 | py | Python | jasmin/bin/dlrlookupd.py | s4mu3lbk/jasmin | ed37cd7258b1cebc3c27543e33f6e14eaf58e5c7 | [
"Apache-2.0"
] | 1 | 2021-06-09T15:26:31.000Z | 2021-06-09T15:26:31.000Z | jasmin/bin/dlrlookupd.py | s4mu3lbk/jasmin | ed37cd7258b1cebc3c27543e33f6e14eaf58e5c7 | [
"Apache-2.0"
] | 1 | 2020-11-20T12:41:08.000Z | 2020-11-20T12:41:08.000Z | jasmin/bin/dlrlookupd.py | s4mu3lbk/jasmin | ed37cd7258b1cebc3c27543e33f6e14eaf58e5c7 | [
"Apache-2.0"
] | 1 | 2021-09-01T19:07:41.000Z | 2021-09-01T19:07:41.000Z | #!/usr/bin/python
import os
import signal
import sys
import syslog
import ntpath
from lockfile import FileLock, LockTimeout, AlreadyLocked
from twisted.internet import reactor, defer
from twisted.python import usage
from jasmin.managers.configs import DLRLookupConfig
from jasmin.managers.dlr import DLRLookup
from ja... | 34.543353 | 113 | 0.635877 |
ab54430129d0ef44fb637109a49c6b34a5b8ceca | 1,271 | py | Python | sdk/python/kfp/v2/compiler_cli_tests/test_data/pipeline_with_reused_component.py | tomar27/pipelines | fc6a2761b3770cb3b854115b841c1a50876665c3 | [
"Apache-2.0"
] | 1 | 2021-11-22T12:22:14.000Z | 2021-11-22T12:22:14.000Z | sdk/python/kfp/v2/compiler_cli_tests/test_data/pipeline_with_reused_component.py | tomar27/pipelines | fc6a2761b3770cb3b854115b841c1a50876665c3 | [
"Apache-2.0"
] | 4 | 2020-06-07T18:45:09.000Z | 2021-02-12T16:03:58.000Z | sdk/python/kfp/v2/compiler_cli_tests/test_data/pipeline_with_reused_component.py | tomar27/pipelines | fc6a2761b3770cb3b854115b841c1a50876665c3 | [
"Apache-2.0"
] | 1 | 2020-10-29T04:24:27.000Z | 2020-10-29T04:24:27.000Z | # Copyright 2020 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 31.775 | 74 | 0.736428 |
e40e7999b64d153918e89ea1bddd1a2a9a2fe4c5 | 80,336 | py | Python | Lib/test/test_asyncio/test_base_events.py | eldipa/cpython | 0d6bd1ca7c683137d52041194f3a2b02219f225a | [
"0BSD"
] | 5 | 2021-06-22T19:41:37.000Z | 2022-01-03T18:49:33.000Z | Lib/test/test_asyncio/test_base_events.py | eldipa/cpython | 0d6bd1ca7c683137d52041194f3a2b02219f225a | [
"0BSD"
] | 50 | 2020-01-07T19:11:11.000Z | 2022-03-01T14:40:03.000Z | Lib/test/test_asyncio/test_base_events.py | thomboroboto/cpyth | 7375b42fe8ac3562f5179ca5a6edcffda578ce35 | [
"0BSD"
] | 4 | 2018-07-13T08:20:36.000Z | 2020-09-28T18:02:05.000Z | """Tests for base_events.py"""
import concurrent.futures
import errno
import math
import socket
import sys
import threading
import time
import unittest
from unittest import mock
import asyncio
from asyncio import base_events
from asyncio import constants
from test.test_asyncio import utils as test_utils
from test imp... | 37.141008 | 91 | 0.612652 |
df9f3c7a7799245e7c007d9baaa8e14834437ef7 | 4,513 | py | Python | python/test/lonestar/assortativity.py | bowu/katana | 85bef7f17a1d294c1de2bda627a9be22bac0bbc5 | [
"BSD-3-Clause"
] | 1 | 2021-07-06T15:51:14.000Z | 2021-07-06T15:51:14.000Z | python/test/lonestar/assortativity.py | bowu/katana | 85bef7f17a1d294c1de2bda627a9be22bac0bbc5 | [
"BSD-3-Clause"
] | 2 | 2020-08-15T23:41:58.000Z | 2020-08-29T04:46:35.000Z | python/test/lonestar/assortativity.py | bowu/katana | 85bef7f17a1d294c1de2bda627a9be22bac0bbc5 | [
"BSD-3-Clause"
] | null | null | null | from enum import Enum
from math import sqrt
from test.lonestar.calculate_degree import calculate_degree
import numpy as np
from katana import do_all, do_all_operator
from katana.local import Graph
from katana.local.atomic import ReduceSum
class DegreeType(Enum):
IN = 1
OUT = 2
@do_all_operator()
def sum_d... | 37.608333 | 115 | 0.70729 |
7d12fa65c97dbc1661e65f9f6e6f6a1a2923219f | 1,713 | py | Python | tests/test_handler_instance_mixin.py | debox-dev/wormhole | 631bf8dd123178fb371096456afa4bb545f70931 | [
"MIT"
] | null | null | null | tests/test_handler_instance_mixin.py | debox-dev/wormhole | 631bf8dd123178fb371096456afa4bb545f70931 | [
"MIT"
] | null | null | null | tests/test_handler_instance_mixin.py | debox-dev/wormhole | 631bf8dd123178fb371096456afa4bb545f70931 | [
"MIT"
] | null | null | null | import pytest
import redis
from tests.test_objects import Vector3MixinHandler, Vector3Message
from wormhole.channel import WormholeRedisChannel
from wormhole.async_implementations.async_gevent import GeventWormhole
from typing import *
from wormhole.error import WormholeHandlingError, WormholeWaitForReplyE... | 38.066667 | 92 | 0.725628 |
42ac988486469ffcdb421044da2c13b706261a7c | 6,741 | py | Python | lib/job_outcome.py | angelonakos/aws-build-accumulator | 8768bb60dfda13d1f8b3ca334a2d0c4d84eea2bb | [
"Apache-2.0"
] | 24 | 2020-07-31T14:23:54.000Z | 2022-03-04T23:58:05.000Z | lib/job_outcome.py | angelonakos/aws-build-accumulator | 8768bb60dfda13d1f8b3ca334a2d0c4d84eea2bb | [
"Apache-2.0"
] | 68 | 2020-09-11T17:36:33.000Z | 2022-03-30T18:14:45.000Z | lib/job_outcome.py | angelonakos/aws-build-accumulator | 8768bb60dfda13d1f8b3ca334a2d0c4d84eea2bb | [
"Apache-2.0"
] | 11 | 2020-10-18T20:13:26.000Z | 2022-02-03T18:49:09.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" fil... | 32.723301 | 81 | 0.584928 |
037ce7e6eb3a9a3ee738cb89fcd2007aab02dfef | 5,774 | py | Python | src/ebay_rest/api/sell_marketing/models/delete_ad_request.py | matecsaj/ebay_rest | dd23236f39e05636eff222f99df1e3699ce47d4a | [
"MIT"
] | 3 | 2021-12-12T04:28:03.000Z | 2022-03-10T03:29:18.000Z | src/ebay_rest/api/sell_marketing/models/delete_ad_request.py | jdavv/ebay_rest | 20fc88c6aefdae9ab90f9c1330e79abddcd750cd | [
"MIT"
] | 33 | 2021-06-16T20:44:36.000Z | 2022-03-30T14:55:06.000Z | src/ebay_rest/api/sell_marketing/models/delete_ad_request.py | jdavv/ebay_rest | 20fc88c6aefdae9ab90f9c1330e79abddcd750cd | [
"MIT"
] | 7 | 2021-06-03T09:30:23.000Z | 2022-03-08T19:51:33.000Z | # coding: utf-8
"""
Marketing API
<p>The <i>Marketing API </i> offers two platforms that sellers can use to promote and advertise their products:</p> <ul><li><b>Promoted Listings</b> is an eBay ad service that lets sellers set up <i>ad campaigns </i> for the products they want to promote. eBay displays the ad... | 51.097345 | 2,092 | 0.656044 |
ffeda97fbd31a76722ed34c8ec46d511da3368cc | 4,365 | py | Python | openstack_dashboard/dashboards/admin/networks/ports/views.py | 2020human/horizon | fab662a19c02318c10c69efced0fac43c28d95f9 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/networks/ports/views.py | 2020human/horizon | fab662a19c02318c10c69efced0fac43c28d95f9 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/networks/ports/views.py | 2020human/horizon | fab662a19c02318c10c69efced0fac43c28d95f9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 NEC 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 ag... | 38.289474 | 79 | 0.678121 |
f5fdba6692b2feff53ee4db39ea770af81a42f00 | 150,273 | py | Python | Data-Analysis/venv_macos/lib/python3.8/site-packages/IPython/core/interactiveshell.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | Data-Analysis/venv_macos/lib/python3.8/site-packages/IPython/core/interactiveshell.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | 2 | 2021-06-08T21:41:55.000Z | 2021-09-08T02:06:41.000Z | Data-Analysis/venv_macos/lib/python3.8/site-packages/IPython/core/interactiveshell.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Main IPython class."""
#-----------------------------------------------------------------------------
# Copyright (C) 2001 Janko Hauser <jhauser@zscout.de>
# Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu>
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distribu... | 40.461228 | 147 | 0.591444 |
556c646f2a72145f40d1b425db76dc9bef63864e | 39,343 | py | Python | tensorflow/python/ops/losses/losses_impl.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 57 | 2017-09-03T07:08:31.000Z | 2022-02-28T04:33:42.000Z | tensorflow/python/ops/losses/losses_impl.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 58 | 2021-11-22T05:41:28.000Z | 2022-01-19T01:33:40.000Z | tensorflow/python/ops/losses/losses_impl.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 66 | 2020-05-15T10:05:12.000Z | 2022-02-14T07:28:18.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 44.255343 | 98 | 0.712325 |
57fe35a82dd0e3fdee0077b8e1d67041f9368543 | 95,002 | py | Python | unzipping_simulation/unzipping_simulation.py | tobiasjj/unzipping_simulation | 929cd61ba62698f7d1bc994d72130b4ed4ccbd5a | [
"Apache-2.0"
] | null | null | null | unzipping_simulation/unzipping_simulation.py | tobiasjj/unzipping_simulation | 929cd61ba62698f7d1bc994d72130b4ed4ccbd5a | [
"Apache-2.0"
] | null | null | null | unzipping_simulation/unzipping_simulation.py | tobiasjj/unzipping_simulation | 929cd61ba62698f7d1bc994d72130b4ed4ccbd5a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Unzipping Simulation, simulate the unzipping of DNA double strands
# Copyright 2018-2020 Tobias Jachowski
#
# 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 Li... | 34.799267 | 135 | 0.579725 |
ece9f7584ea22f4306d68fbfa2b8ef9b040fa85f | 792 | py | Python | AddExonSN/genExonRefBed/sortBed.py | seahurt/tcga_tools | 97ff6954df676e73b7c70f0515aec1ab6e026151 | [
"MIT"
] | 1 | 2020-06-08T06:35:45.000Z | 2020-06-08T06:35:45.000Z | AddExonSN/genExonRefBed/sortBed.py | seahurt/tcga-utils | 97ff6954df676e73b7c70f0515aec1ab6e026151 | [
"MIT"
] | null | null | null | AddExonSN/genExonRefBed/sortBed.py | seahurt/tcga-utils | 97ff6954df676e73b7c70f0515aec1ab6e026151 | [
"MIT"
] | null | null | null | #!python
import os
import sys
input = sys.argv[1]
output = sys.argv[2]
f = open(input)
exon_pool=dict()
o = open(output,'w')
for line in f.readlines():
if('#' in line):
continue
if(line==""):
break
(chr,start,end,gene)=line.split()
#print(gene)
if (gene in exon_pool):
exon_p... | 24 | 127 | 0.60101 |
c268f81c536f50746e8b9c223ed48f76781fb78f | 1,731 | py | Python | tests/test_thriftstruct.py | WKPlus/jsonthrift | 975cc097afc92c53fa8b46f5f6c5b6da807a2acb | [
"MIT"
] | 4 | 2017-04-05T07:01:27.000Z | 2017-04-10T04:15:37.000Z | tests/test_thriftstruct.py | WKPlus/jsonthrift | 975cc097afc92c53fa8b46f5f6c5b6da807a2acb | [
"MIT"
] | null | null | null | tests/test_thriftstruct.py | WKPlus/jsonthrift | 975cc097afc92c53fa8b46f5f6c5b6da807a2acb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import sys
import json
import unittest
sys.path.append(os.path.abspath(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")
))
from jsonthrift.thriftstruct import ThriftStruct
protocol = 'TBinaryProtocol'
class ThriftStructTest(unittest.TestCase... | 27.046875 | 84 | 0.544772 |
e48208d587d4f40385302196a132d2236c757b76 | 813 | py | Python | app/fedgraphnn/ego_networks_node_clf/model/gat.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | app/fedgraphnn/ego_networks_node_clf/model/gat.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | app/fedgraphnn/ego_networks_node_clf/model/gat.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn.functional as F
from torch_geometric.nn import GATConv
class GATNodeCLF(torch.nn.Module):
def __init__(self, in_channels, out_channels, dropout, heads=2):
super(GATNodeCLF, self).__init__()
self.dropout = dropout
self.conv1 = GATConv(in_channels, heads, heads=h... | 33.875 | 93 | 0.661747 |
fa69897a9fb3059f78660df2151df89a3dc3c33a | 4,032 | py | Python | flask_web/werkzeug-master/scripts/make-release.py | bopopescu/local_scda | 40fa4a586f140dc00b8d3f53c732e22e022be338 | [
"MIT"
] | 1 | 2015-11-06T02:41:24.000Z | 2015-11-06T02:41:24.000Z | scripts/make-release.py | Chitrank-Dixit/werkzeug | 60670cb98db1934b7aa7df454cbe4508c467f403 | [
"BSD-3-Clause"
] | null | null | null | scripts/make-release.py | Chitrank-Dixit/werkzeug | 60670cb98db1934b7aa7df454cbe4508c467f403 | [
"BSD-3-Clause"
] | 2 | 2020-07-23T21:55:21.000Z | 2021-01-14T12:27:19.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
make-release
~~~~~~~~~~~~
Helper script that performs a release. Does pretty much everything
automatically for us.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import sys
import os
import re
from dat... | 26.526316 | 80 | 0.59747 |
9e77334169ede1b9a29930a97e93e5d3014fef0a | 1,759 | py | Python | paper/F5a.py | mlares/hearsay | 27e833f49eaea1c3d185c27036f149bc6f834edc | [
"MIT"
] | null | null | null | paper/F5a.py | mlares/hearsay | 27e833f49eaea1c3d185c27036f149bc6f834edc | [
"MIT"
] | null | null | null | paper/F5a.py | mlares/hearsay | 27e833f49eaea1c3d185c27036f149bc6f834edc | [
"MIT"
] | null | null | null | from itertools import product as pp
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from hearsay import hearsay
# Figura 5
# (a) Variation of tau_survive for fixed tau_awakening
# -----------------------------------------------------
ta = [10000]
ts = [5000, 10000, 20000, 50000, 500000]
t... | 21.716049 | 67 | 0.608869 |
cfeda6cb146e07955dd21973e578939cab32d5c1 | 2,872 | py | Python | iseq/profile.py | EBI-Metagenomics/iseq | 3c28fc92e5af05c91c6669d7f1a28d1ce857f3f1 | [
"MIT"
] | null | null | null | iseq/profile.py | EBI-Metagenomics/iseq | 3c28fc92e5af05c91c6669d7f1a28d1ce857f3f1 | [
"MIT"
] | null | null | null | iseq/profile.py | EBI-Metagenomics/iseq | 3c28fc92e5af05c91c6669d7f1a28d1ce857f3f1 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from math import log
from typing import NamedTuple
from imm import Alphabet, Sequence, lprob_zero
from .model import AltModel, NullModel, SpecialTransitions
from .result import SearchResults
__all__ = ["Profile", "ProfileID"]
ProfileID = NamedTuple("ProfileID", [("name", str), ("... | 26.109091 | 81 | 0.613162 |
26700d5e46c5c50620d587ffc22163c397dcf05a | 193 | py | Python | ex2/11.py | EAGLE12/studyPython | 3ffffd89fd5cf8a2183bcc2fa3584e5ab2b64146 | [
"MIT"
] | null | null | null | ex2/11.py | EAGLE12/studyPython | 3ffffd89fd5cf8a2183bcc2fa3584e5ab2b64146 | [
"MIT"
] | null | null | null | ex2/11.py | EAGLE12/studyPython | 3ffffd89fd5cf8a2183bcc2fa3584e5ab2b64146 | [
"MIT"
] | null | null | null | import numpy as np
import math
p0 = np.array((1, 1))
p1 = np.array((6, 4))
A = p1 - p0
print(A)
dist = math.sqrt(pow(A[0],2) + pow(A[1],2))
print(dist)
a_dist = np.linalg.norm(A)
print(a_dist) | 19.3 | 43 | 0.626943 |
ba3a11d862bc2d57fcf3312fb481cae4884047e0 | 7,561 | py | Python | tests/components/sensor/test_jewish_calendar.py | raymondelooff/home-assistant | a9a8cbbd100b4ca5c7f90210fb37da37bc634923 | [
"Apache-2.0"
] | 1 | 2019-07-24T09:26:57.000Z | 2019-07-24T09:26:57.000Z | tests/components/sensor/test_jewish_calendar.py | raymondelooff/home-assistant | a9a8cbbd100b4ca5c7f90210fb37da37bc634923 | [
"Apache-2.0"
] | 5 | 2021-02-08T20:32:11.000Z | 2022-01-13T01:19:23.000Z | tests/components/sensor/test_jewish_calendar.py | raymondelooff/home-assistant | a9a8cbbd100b4ca5c7f90210fb37da37bc634923 | [
"Apache-2.0"
] | null | null | null | """The tests for the Jewish calendar sensor platform."""
import unittest
from datetime import time
from datetime import datetime as dt
from unittest.mock import patch
from homeassistant.util.async_ import run_coroutine_threadsafe
from homeassistant.util.dt import get_time_zone
from homeassistant.setup import setup_com... | 44.216374 | 76 | 0.638804 |
47f5df51db4c94ecef9d5b389fe266d707826d12 | 897 | py | Python | core/shell.py | swagkarna/arissploit | b0a58f61afc12ac78c65e0275dfa5e4d1e44989e | [
"MIT"
] | 3 | 2019-12-09T10:07:10.000Z | 2021-09-18T18:20:09.000Z | core/shell.py | swagkarna/arissploit | b0a58f61afc12ac78c65e0275dfa5e4d1e44989e | [
"MIT"
] | null | null | null | core/shell.py | swagkarna/arissploit | b0a58f61afc12ac78c65e0275dfa5e4d1e44989e | [
"MIT"
] | 1 | 2021-11-04T11:18:09.000Z | 2021-11-04T11:18:09.000Z | # Import python modules
import sys
# Import core modules
from core.module_manager import ModuleManager
from core import colors
from core import command_handler
shellface = "["+colors.bold+"arissploit"+colors.end+"]:"
mm = ModuleManager
def run():
global shellface
global mm
ch = command_handler.Commandhandler(mm,... | 21.878049 | 102 | 0.684504 |
fa5edfd07282bc524bb36b6e8128503dcde00958 | 2,036 | py | Python | tests/e2e/binance_blvt.py | PetrZufan/cryptoxlib-aio | 8fbb817ee7a7a88693804e24877863370d1d53c7 | [
"MIT"
] | 90 | 2020-04-09T18:34:49.000Z | 2022-03-09T14:29:32.000Z | tests/e2e/binance_blvt.py | PetrZufan/cryptoxlib-aio | 8fbb817ee7a7a88693804e24877863370d1d53c7 | [
"MIT"
] | 44 | 2020-04-03T17:02:20.000Z | 2022-01-29T14:51:51.000Z | tests/e2e/binance_blvt.py | PetrZufan/cryptoxlib-aio | 8fbb817ee7a7a88693804e24877863370d1d53c7 | [
"MIT"
] | 28 | 2020-04-25T21:34:53.000Z | 2022-03-31T07:20:07.000Z | import unittest
import os
import logging
from cryptoxlib.CryptoXLib import CryptoXLib
from cryptoxlib.clients.binance.exceptions import BinanceRestException
from CryptoXLibTest import CryptoXLibTest
api_key = os.environ['BINANCEAPIKEY']
sec_key = os.environ['BINANCESECKEY']
class BinanceBLVTRestApi(CryptoXLibTest)... | 32.31746 | 72 | 0.717092 |
7e89f5b1930fd07585b2e216d2e67e5f2686d333 | 10,663 | py | Python | sdk/python/pulumi_aws/get_availability_zone.py | alexbowers/pulumi-aws | 7dbdb03b1e4f7c0d51d5b5d17233ff4465c3eff5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/get_availability_zone.py | alexbowers/pulumi-aws | 7dbdb03b1e4f7c0d51d5b5d17233ff4465c3eff5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/get_availability_zone.py | alexbowers/pulumi-aws | 7dbdb03b1e4f7c0d51d5b5d17233ff4465c3eff5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 43.880658 | 271 | 0.67542 |
f6588627082e0a9c95c4156478e7d75abaef3ede | 1,311 | py | Python | console_basic/exception.py | QthCN/console-basic | 619fe47ac28dbc669bf84064ff4a729923aa978d | [
"Apache-2.0"
] | null | null | null | console_basic/exception.py | QthCN/console-basic | 619fe47ac28dbc669bf84064ff4a729923aa978d | [
"Apache-2.0"
] | null | null | null | console_basic/exception.py | QthCN/console-basic | 619fe47ac28dbc669bf84064ff4a729923aa978d | [
"Apache-2.0"
] | null | null | null | from oslo_config import cfg
from oslo_log import log
from oslo_utils import encodeutils
CONF = cfg.CONF
LOG = log.getLogger(__name__)
class Error(Exception):
message_format = None
def __init__(self, message=None, **kwargs):
try:
message = self._build_message(message, **kwargs)
e... | 26.22 | 70 | 0.595728 |
282610eab654ffcd0140a3aff241a85554b29381 | 3,770 | py | Python | tests/web/unauthenticated.py | eBrandValue/instagram_private_api | 2cd84362caccc83e2c87cfd359f714d4b43a5b3a | [
"MIT"
] | 2,564 | 2017-01-17T07:48:00.000Z | 2022-03-31T18:52:55.000Z | tests/web/unauthenticated.py | NTgitdude23/instagram_private_api | 1d70e99bc11591161b0cd71cff3f0c08cd04b34f | [
"MIT"
] | 335 | 2017-01-19T13:44:47.000Z | 2022-03-15T09:51:43.000Z | tests/web/unauthenticated.py | NTgitdude23/instagram_private_api | 1d70e99bc11591161b0cd71cff3f0c08cd04b34f | [
"MIT"
] | 729 | 2017-01-27T14:40:56.000Z | 2022-03-31T12:30:59.000Z |
from ..common import WebApiTestBase
class UnauthenticatedTests(WebApiTestBase):
"""Tests for endpoints with authentication"""
@staticmethod
def init_all(api):
return [
{
'name': 'test_unauthenticated_tag_feed',
'test': UnauthenticatedTests('test_unauth... | 42.840909 | 103 | 0.625729 |
68f39a8375980b7220a1bbd78bfe0b258881d830 | 3,871 | py | Python | log_it/extensions/marshmallow/log.py | tanj/log-it | d7223af1d0216d3febe4ebc39e06e24dceb3115f | [
"BSD-3-Clause"
] | null | null | null | log_it/extensions/marshmallow/log.py | tanj/log-it | d7223af1d0216d3febe4ebc39e06e24dceb3115f | [
"BSD-3-Clause"
] | null | null | null | log_it/extensions/marshmallow/log.py | tanj/log-it | d7223af1d0216d3febe4ebc39e06e24dceb3115f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=R0903, C0115
"""
log_it.extensions.marshmallow.log
---------------------------------
Marshmallow Log Models
:copyright: (c) 2021 by John te Bokkel
:license: BSD, see LICENSE for more details
"""
from datetime import datetime
from marshmallow_sqlalchemy i... | 22.375723 | 67 | 0.686386 |
363de2138d30267f26bed5b17cf288ffd906442b | 28,224 | py | Python | pysnmp/HM2-LOGGING-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/HM2-LOGGING-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/HM2-LOGGING-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module HM2-LOGGING-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HM2-LOGGING-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:18:56 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 133.763033 | 5,084 | 0.777884 |
a382adbdfe03beb9a45528820dbc73d5f134ca4e | 823 | py | Python | String/python/leetcode383_Ransom_Note.py | wenxinjie/leetcode | c459a01040c8fe0783e15a16b8d7cca4baf4612a | [
"Apache-2.0"
] | null | null | null | String/python/leetcode383_Ransom_Note.py | wenxinjie/leetcode | c459a01040c8fe0783e15a16b8d7cca4baf4612a | [
"Apache-2.0"
] | null | null | null | String/python/leetcode383_Ransom_Note.py | wenxinjie/leetcode | c459a01040c8fe0783e15a16b8d7cca4baf4612a | [
"Apache-2.0"
] | null | null | null | # Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it will return false.
# Each letter in the magazine string can only be used once in your ransom note.
# Not... | 34.291667 | 232 | 0.679222 |
52f5f9d4fdf2d4a2ce4dab9e84d93692e8770331 | 6,493 | py | Python | src/openprocurement/tender/openeu/validation.py | pontostroy/api | 5afdd3a62a8e562cf77e2d963d88f1a26613d16a | [
"Apache-2.0"
] | 3 | 2020-03-13T06:44:23.000Z | 2020-11-05T18:25:29.000Z | src/openprocurement/tender/openeu/validation.py | pontostroy/api | 5afdd3a62a8e562cf77e2d963d88f1a26613d16a | [
"Apache-2.0"
] | 2 | 2021-03-25T23:29:58.000Z | 2022-03-21T22:18:37.000Z | src/openprocurement/tender/openeu/validation.py | pontostroy/api | 5afdd3a62a8e562cf77e2d963d88f1a26613d16a | [
"Apache-2.0"
] | 3 | 2020-10-16T16:25:14.000Z | 2021-05-22T12:26:20.000Z | # -*- coding: utf-8 -*-
from openprocurement.api.utils import get_now, raise_operation_error, get_first_revision_date
from openprocurement.api.validation import validate_data, OPERATIONS
from openprocurement.api.constants import RELEASE_2020_04_19
from openprocurement.tender.openeu.models import Qualification
def val... | 38.88024 | 120 | 0.699677 |
f09480347b63010cd167a50e14a1de1bf78d4c7d | 27,839 | py | Python | sqliteanalyzer/storageanalyzer.py | santigl/sqliteanalyzer | 16b269337d3a13b3b438775a60866a732e05beaf | [
"BSD-2-Clause"
] | null | null | null | sqliteanalyzer/storageanalyzer.py | santigl/sqliteanalyzer | 16b269337d3a13b3b438775a60866a732e05beaf | [
"BSD-2-Clause"
] | null | null | null | sqliteanalyzer/storageanalyzer.py | santigl/sqliteanalyzer | 16b269337d3a13b3b438775a60866a732e05beaf | [
"BSD-2-Clause"
] | 1 | 2021-08-02T02:43:02.000Z | 2021-08-02T02:43:02.000Z | # Copyright 2018 Santiago Gil
# (github.com/santigl)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the foll... | 35.92129 | 89 | 0.534969 |
c336a0891f715c90f49832698a5dbe9209903b1e | 4,840 | py | Python | Application/appResanet.py | Aaldn/Resanet | 23bc2d69e82b99c35d464d4a6e82cdd15c182952 | [
"MIT"
] | null | null | null | Application/appResanet.py | Aaldn/Resanet | 23bc2d69e82b99c35d464d4a6e82cdd15c182952 | [
"MIT"
] | null | null | null | Application/appResanet.py | Aaldn/Resanet | 23bc2d69e82b99c35d464d4a6e82cdd15c182952 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from flask import *
from modeles import modeleResanet
from technique import datesResanet
app = Flask(__name__)
app.secret_key = 'resanet'
@app.route('/', methods=['GET'])
def index():
return render_template('vueAccueil.html')
@app.route('/usager/session/choisir', met... | 33.37931 | 140 | 0.688017 |
0118978e82d3c106136f1e216c1f31c6abf6e8f1 | 263 | py | Python | day04/app04/models.py | 940716tian/PythonStudy | 05738c50c9d504d5f073ded9e70b29c2f76f5ea6 | [
"Apache-2.0"
] | null | null | null | day04/app04/models.py | 940716tian/PythonStudy | 05738c50c9d504d5f073ded9e70b29c2f76f5ea6 | [
"Apache-2.0"
] | null | null | null | day04/app04/models.py | 940716tian/PythonStudy | 05738c50c9d504d5f073ded9e70b29c2f76f5ea6 | [
"Apache-2.0"
] | null | null | null | from django.db import models
# Create your models here.
class Language(models.Model):
name = models.CharField(
max_length=20
)
desc = models.CharField(
max_length=30
)
def get_desc(self):
return "爱你的理由:%s"% self.desc
| 18.785714 | 36 | 0.627376 |
e5d113db595273bab9ce8e18cde9e73ee8ab2111 | 45,852 | py | Python | metar/Metar.py | mkjunker/python-metar | ba599ad78f8e7d2f46849a5e98106a6221d1f787 | [
"BSD-1-Clause"
] | 136 | 2018-07-25T06:44:30.000Z | 2022-03-29T18:39:03.000Z | metar/Metar.py | mkjunker/python-metar | ba599ad78f8e7d2f46849a5e98106a6221d1f787 | [
"BSD-1-Clause"
] | 125 | 2018-07-22T19:00:41.000Z | 2022-03-30T13:28:44.000Z | metar/Metar.py | mkjunker/python-metar | ba599ad78f8e7d2f46849a5e98106a6221d1f787 | [
"BSD-1-Clause"
] | 66 | 2018-07-22T18:57:23.000Z | 2022-03-10T18:29:28.000Z | # Copyright (c) 2004,2018 Python-Metar Developers.
# Distributed under the terms of the BSD 2-Clause License.
# SPDX-License-Identifier: BSD-2-Clause
"""This module defines the Metar class.
A Metar object represents the weather report encoded by a single METAR code.
"""
import re
import datetime
import warnings
import... | 33.322674 | 88 | 0.521264 |
edf40e09cc30a180fb7113f0b7e03df685123dfa | 4,836 | py | Python | tests/test_functiondef_handler.py | DrewTChrist/obscurepy | 4c1f28bc2fef27519fa7e8eddfeefa8e766d117e | [
"MIT"
] | 11 | 2021-05-21T18:22:40.000Z | 2021-08-23T23:56:38.000Z | tests/test_functiondef_handler.py | DrewTChrist/obscurepy | 4c1f28bc2fef27519fa7e8eddfeefa8e766d117e | [
"MIT"
] | 7 | 2021-09-14T02:42:45.000Z | 2021-09-18T14:40:47.000Z | tests/test_functiondef_handler.py | DrewTChrist/obscurepy | 4c1f28bc2fef27519fa7e8eddfeefa8e766d117e | [
"MIT"
] | 2 | 2021-05-26T12:27:15.000Z | 2021-07-18T02:47:31.000Z | import ast
import unittest
from obscurepy.handlers.classdef_handler import ClassDefHandler
from obscurepy.handlers.functiondef_handler import FunctionDefHandler
from obscurepy.utils.definition_tracker import DefinitionTracker
from obscurepy.handlers.functiondef_handler import get_args, get_variables, get_return
from ob... | 42.79646 | 113 | 0.662531 |
f9468a2ad3928536f2c2c43536236706b8ea7a3a | 1,477 | py | Python | pcat2py/class/20c0e630-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | pcat2py/class/20c0e630-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | pcat2py/class/20c0e630-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
################################################################################
# 20c0e630-5cc5-11e4-af55-00155d01fe08
#
# Justin Dierking
# justindierking@hardbitsolutions.com
# phnomcobra@gmail.com
#
# 10/24/2014 Original Construction
################################################################... | 38.868421 | 160 | 0.606635 |
7b2377da8aa227ef89f8505e063750c4d250b58b | 2,125 | py | Python | templates/zerotier_client/zerotier_client_test.py | threefoldtech/0-templates | 4106bb3d4d1de305557bf4748a7d77ffeb302abb | [
"Apache-2.0"
] | 1 | 2019-01-20T17:50:53.000Z | 2019-01-20T17:50:53.000Z | templates/zerotier_client/zerotier_client_test.py | threefoldtech/0-templates | 4106bb3d4d1de305557bf4748a7d77ffeb302abb | [
"Apache-2.0"
] | 192 | 2018-08-01T13:31:16.000Z | 2020-05-29T09:41:06.000Z | templates/zerotier_client/zerotier_client_test.py | threefoldtech/0-templates | 4106bb3d4d1de305557bf4748a7d77ffeb302abb | [
"Apache-2.0"
] | 1 | 2018-08-09T12:30:52.000Z | 2018-08-09T12:30:52.000Z | from unittest.mock import MagicMock, patch
import os
import pytest
from zerotier_client import ZerotierClient
from JumpscaleZrobot.test.utils import ZrobotBaseTest
class TestZerotierClientTemplate(ZrobotBaseTest):
@classmethod
def setUpClass(cls):
super().preTest(os.path.dirname(__file__), ZerotierC... | 37.280702 | 118 | 0.676235 |
ce3194dccea8e81de00212a837d91672139f4eab | 280 | py | Python | tests/conftest.py | k-sriram/rotins | fbb398bf5a46b5869081bce149afdf2cfd5bc2dd | [
"MIT"
] | null | null | null | tests/conftest.py | k-sriram/rotins | fbb398bf5a46b5869081bce149afdf2cfd5bc2dd | [
"MIT"
] | null | null | null | tests/conftest.py | k-sriram/rotins | fbb398bf5a46b5869081bce149afdf2cfd5bc2dd | [
"MIT"
] | null | null | null | import pytest
def pytest_addoption(parser):
parser.addoption(
"--makeplots",
action="store_true",
help="make diagnostic plots for manual inspection.",
)
@pytest.fixture
def makeplots(request):
return request.config.getoption("--makeplots")
| 18.666667 | 60 | 0.671429 |
8dd30e34d94360c272ea6abf62b78413ec4e81b0 | 2,766 | py | Python | lldb/test/API/macosx/find-dsym/deep-bundle/TestDeepBundle.py | AnthonyLatsis/llvm-project | 2acd6cdb9a4bfb2c34b701527e04dd4ffe791d74 | [
"Apache-2.0"
] | 34 | 2020-01-31T17:50:00.000Z | 2022-02-16T20:19:29.000Z | lldb/test/API/macosx/find-dsym/deep-bundle/TestDeepBundle.py | coolstar/llvm-project | e21ccdd5b5667de50de65ee8903a89a21020e89a | [
"Apache-2.0"
] | 14 | 2020-02-03T23:39:51.000Z | 2021-07-20T16:24:25.000Z | lldb/test/API/macosx/find-dsym/deep-bundle/TestDeepBundle.py | coolstar/llvm-project | e21ccdd5b5667de50de65ee8903a89a21020e89a | [
"Apache-2.0"
] | 6 | 2021-02-08T16:57:07.000Z | 2022-01-13T11:32:34.000Z | """Test that a dSYM can be found when a binary is in a deep bundle with multiple pathname components."""
#import unittest2
from time import sleep
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
exe_name = 'deep-bundle' # must match Make... | 37.890411 | 123 | 0.67462 |
57e29633d6b75c8d369510dd6155c5eac34c5bf5 | 1,260 | py | Python | pirates/piratesbase/TODDefs.py | ksmit799/POTCO-PS | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 8 | 2017-01-24T04:33:29.000Z | 2020-11-01T08:36:24.000Z | pirates/piratesbase/TODDefs.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 1 | 2017-03-02T18:05:17.000Z | 2017-03-14T06:47:10.000Z | pirates/piratesbase/TODDefs.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 11 | 2017-03-02T18:46:07.000Z | 2020-11-01T08:36:26.000Z | # File: T (Python 2.4)
SKY_OFF = 0
SKY_LAST = 1
SKY_DAWN = 2
SKY_DAY = 3
SKY_DUSK = 4
SKY_NIGHT = 5
SKY_STARS = 6
SKY_HALLOWEEN = 7
SKY_SWAMP = 8
SKY_INVASION = 9
SKY_OVERCAST = 10
SKY_OVERCASTNIGHT = 11
SKY_CODES = {
SKY_OFF: 'SKY_OFF',
SKY_LAST: 'SKY_LAST',
SKY_DAWN: 'SKY_DAWN',
SKY_DAY: 'SKY_DAY',
... | 20 | 43 | 0.72619 |
2444014ac9779ce809ca9f0f3a9b0792dc7bad67 | 168,589 | py | Python | pandas/core/index.py | ichuang/pandas | b31574a9ec6bccee427ed08d5b5b995cc6753439 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/index.py | ichuang/pandas | b31574a9ec6bccee427ed08d5b5b995cc6753439 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/index.py | ichuang/pandas | b31574a9ec6bccee427ed08d5b5b995cc6753439 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | # pylint: disable=E1101,E1103,W0232
import datetime
import warnings
import operator
from functools import partial
from pandas.compat import range, zip, lrange, lzip, u, reduce, filter, map
from pandas import compat
import numpy as np
from sys import getsizeof
import pandas.tslib as tslib
import pandas.lib as lib
impor... | 34.252133 | 120 | 0.55019 |
4bff0c55c149369feb494481f1d99d07bae1e231 | 43,410 | py | Python | pysnmp-with-texts/APPIAN-SERVICES-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/APPIAN-SERVICES-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/APPIAN-SERVICES-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module APPIAN-SERVICES-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/APPIAN-SERVICES-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:23:56 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default... | 156.714801 | 3,296 | 0.786317 |
f63bdf0b2ad799ec15897527cbda561052434faa | 248 | py | Python | Ipython/Requests_1.py | shantnu/WebScraping | 3f8c2cc486c31cdadfaf3edd7efa917d13766ffc | [
"MIT"
] | 2 | 2020-07-28T02:19:26.000Z | 2021-03-14T19:19:01.000Z | Ipython/Requests_1.py | shantnu/WebScraping | 3f8c2cc486c31cdadfaf3edd7efa917d13766ffc | [
"MIT"
] | null | null | null | Ipython/Requests_1.py | shantnu/WebScraping | 3f8c2cc486c31cdadfaf3edd7efa917d13766ffc | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[15]:
import requests
from bs4 import BeautifulSoup
# In[16]:
r = requests.get("http://pythonforengineers.com/pythonforengineersbook/")
# In[ ]:
for link in soup.find_all('a'):
print link.get('href')
# In[22]:
| 9.92 | 73 | 0.649194 |
0fccb7967793055c2dd7118ca1572f8573660899 | 166 | py | Python | blog_post/forms.py | ManukumarNM/Django_Blog | 96c3d666c8bb897a2529c2bdb6ec5186d0e2d98c | [
"MIT"
] | null | null | null | blog_post/forms.py | ManukumarNM/Django_Blog | 96c3d666c8bb897a2529c2bdb6ec5186d0e2d98c | [
"MIT"
] | null | null | null | blog_post/forms.py | ManukumarNM/Django_Blog | 96c3d666c8bb897a2529c2bdb6ec5186d0e2d98c | [
"MIT"
] | null | null | null | from django import forms
from .models import Post
class PostForm(forms.ModelForm):
class Meta:
model= Post
fields= ["title", "content", "image"]
| 20.75 | 45 | 0.656627 |
80989a9d2bfc4b765af9ab7a71205e71d8338971 | 5,535 | py | Python | src/python/lstm_seqlabel_load_data.py | dptam/neural_wfst | c0cd3e340a45c13fbe47310753432d496c20eb83 | [
"MIT"
] | null | null | null | src/python/lstm_seqlabel_load_data.py | dptam/neural_wfst | c0cd3e340a45c13fbe47310753432d496c20eb83 | [
"MIT"
] | null | null | null | src/python/lstm_seqlabel_load_data.py | dptam/neural_wfst | c0cd3e340a45c13fbe47310753432d496c20eb83 | [
"MIT"
] | null | null | null | '''
| Filename : lstm_seqlabel_load_data.py
| Description : The load data function used in lstm_seqlabel.py
| Author : Pushpendre Rastogi
| Created : Mon Oct 26 19:36:47 2015 (-0400)
| Last-Updated: Tue Nov 24 03:57:11 2015 (-0500)
| By: Pushpendre Rastogi
| Update #: 25
'''
from collections i... | 41 | 98 | 0.560614 |
47904585755d391dff3ae9c18f453c7c88138a21 | 639 | py | Python | tests/vkscript_converter_test.py | van-burgerberg/vkbottle | 134eb76e6289b7674142316ca72646ce999d9388 | [
"MIT"
] | 2 | 2020-11-12T09:26:16.000Z | 2020-11-14T16:52:10.000Z | tests/vkscript_converter_test.py | van-burgerberg/vkbottle | 134eb76e6289b7674142316ca72646ce999d9388 | [
"MIT"
] | null | null | null | tests/vkscript_converter_test.py | van-burgerberg/vkbottle | 134eb76e6289b7674142316ca72646ce999d9388 | [
"MIT"
] | null | null | null | from vkbottle import vkscript
BASIC_CYCLE = "var a=%A%;var some_list=[];while(a<100){API.users.get({user_id:a});a = a + 1;};return some_list;"
@vkscript
def basic_cycle(api, a: int = 10):
some_list = []
while a < 100:
api.users.get(user_id=a)
a += 1
return some_list
@vkscript
def types(... | 21.3 | 112 | 0.594679 |
90600d4431aefdc66f1f18eaf1e3ddbb24bb6df6 | 4,053 | py | Python | util/logger.py | zhaolongkzz/DeepMimic_configuration | 48824e44aa1470dc01956faf83f66d59488d0dce | [
"MIT"
] | 9 | 2019-07-06T14:14:06.000Z | 2021-08-16T12:58:44.000Z | util/logger.py | zhaolongkzz/DeepMimic_configuration | 48824e44aa1470dc01956faf83f66d59488d0dce | [
"MIT"
] | 1 | 2019-09-11T12:10:28.000Z | 2019-09-11T12:10:28.000Z | util/logger.py | zhaolongkzz/DeepMimic_configuration | 48824e44aa1470dc01956faf83f66d59488d0dce | [
"MIT"
] | 1 | 2021-07-27T08:55:57.000Z | 2021-07-27T08:55:57.000Z | import util.mpi_util as MPIUtil
"""
Some simple logging functionality, inspired by rllab's logging.
Assumes that each diagnostic gets logged each iteration
Call logz.configure_output_file() to start logging to a
tab-separated-values file (some_file_name.txt)
To load the learning curves, you can do, for example
A ... | 31.418605 | 129 | 0.574389 |
a12476eb7ed899b357626fd0790a6c9b99a9c1ea | 2,505 | py | Python | tornado/translate_tornado_4_2_1/demos/benchmark/benchmark.py | noogel/xyzStudyPython | 521cee4dc033e2ab1032b561a3229eed75d8067a | [
"Apache-2.0"
] | 2 | 2016-07-19T09:23:27.000Z | 2016-09-27T17:21:24.000Z | tornado/translate_tornado_4_2_1/demos/benchmark/benchmark.py | noogel/xyzStudyPython | 521cee4dc033e2ab1032b561a3229eed75d8067a | [
"Apache-2.0"
] | null | null | null | tornado/translate_tornado_4_2_1/demos/benchmark/benchmark.py | noogel/xyzStudyPython | 521cee4dc033e2ab1032b561a3229eed75d8067a | [
"Apache-2.0"
] | 1 | 2020-07-23T17:09:19.000Z | 2020-07-23T17:09:19.000Z | #!/usr/bin/env python
# -*— coding:utf-8 -*-
#
# A simple benchmark of tornado's HTTP stack.
# 一个简单的基本的Tornado HTTP 堆栈。
# Requires 'ab' to be installed.
#
# Running without profiling:
# demos/benchmark/benchmark.py
# demos/benchmark/benchmark.py --quiet --num_runs=5|grep "Requests per second"
#
# Running with profiling... | 27.527473 | 78 | 0.698204 |
5377892aa151e0c140875e319fe3fb4019d8d09f | 511 | py | Python | main.py | ttw2514/compute_task | 7744300be06a47c750cc7d7dfe8a25a38b4d067e | [
"MIT"
] | 1 | 2018-05-03T02:32:31.000Z | 2018-05-03T02:32:31.000Z | main.py | ttw2514/compute_task | 7744300be06a47c750cc7d7dfe8a25a38b4d067e | [
"MIT"
] | null | null | null | main.py | ttw2514/compute_task | 7744300be06a47c750cc7d7dfe8a25a38b4d067e | [
"MIT"
] | 1 | 2018-05-03T02:32:34.000Z | 2018-05-03T02:32:34.000Z | import schedule
import time
import logging
from ml_task import model_update
from compute import daily_compute
FORMAT = '%(asctime)-15s %(levelname)s %(module)s %(filename)s:%(lineno)d - %(message)s'
logging.basicConfig(format=FORMAT, level=logging.DEBUG, filename='./test.log', filemode='a')
def main():
schedule.... | 24.333333 | 92 | 0.708415 |
5248718dd786927ddc70148821c7363bbbe1987c | 281 | py | Python | tests/compiler/test_opcodes.py | Solexplorer/vyper | 135edd6a91d47c72de105066d6e6c1bdfe9ea66e | [
"MIT"
] | 1 | 2021-04-23T21:48:20.000Z | 2021-04-23T21:48:20.000Z | tests/compiler/test_opcodes.py | Solexplorer/vyper | 135edd6a91d47c72de105066d6e6c1bdfe9ea66e | [
"MIT"
] | null | null | null | tests/compiler/test_opcodes.py | Solexplorer/vyper | 135edd6a91d47c72de105066d6e6c1bdfe9ea66e | [
"MIT"
] | null | null | null | import vyper
def test_opcodes():
code = """
@public
def a() -> bool:
return True
"""
out = vyper.compile_code(code, ['opcodes_runtime', 'opcodes'])
assert len(out['opcodes']) > len(out['opcodes_runtime'])
assert out['opcodes_runtime'] in out['opcodes']
| 18.733333 | 66 | 0.626335 |
5b02a7a231427421a39fbfce53255ed3869cd49e | 1,441 | py | Python | examples/script/eval_subnet_noise_ratiorand_insuper.py | zyh1999/pytorch-quantum | c00bd564a99001fee2fd6b30e5e34562ab981e28 | [
"MIT"
] | 98 | 2021-07-23T07:11:32.000Z | 2021-12-19T14:04:58.000Z | examples/script/eval_subnet_noise_ratiorand_insuper.py | zyh1999/pytorch-quantum | c00bd564a99001fee2fd6b30e5e34562ab981e28 | [
"MIT"
] | 2 | 2021-02-11T19:01:48.000Z | 2021-04-04T20:29:57.000Z | examples/script/eval_subnet_noise_ratiorand_insuper.py | zyh1999/pytorch-quantum | c00bd564a99001fee2fd6b30e5e34562ab981e28 | [
"MIT"
] | 12 | 2021-07-23T07:10:47.000Z | 2021-12-16T23:44:44.000Z | import subprocess
from torchpack.utils.logging import logger
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--supernet', type=str)
parser.add_argument('--gpu', type=int)
args = parser.parse_args()
pres = ['python',
'examples/eval.py',... | 36.948718 | 79 | 0.528105 |
1843962330a18d0c095a4fe1f2427fd560d278c8 | 44,872 | py | Python | mytrain.py | xuritian317/pytorch-image-models | 034139e4871cddd0f6c24931b6ac380ba9f28711 | [
"Apache-2.0"
] | null | null | null | mytrain.py | xuritian317/pytorch-image-models | 034139e4871cddd0f6c24931b6ac380ba9f28711 | [
"Apache-2.0"
] | null | null | null | mytrain.py | xuritian317/pytorch-image-models | 034139e4871cddd0f6c24931b6ac380ba9f28711 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
""" ImageNet Training Script
This is intended to be a lean and easily modifiable ImageNet training script that reproduces ImageNet
training results with some of the latest networks and training techniques. It favours canonical PyTorch
and standard Python style over trying to be able to 'do it al... | 47.184017 | 120 | 0.639553 |
5cf8ed5bac1ca41cf21aead137b275864868297d | 562 | py | Python | enaml/enaml/web/hyperlink.py | ContinuumIO/ashiba | a93e7785d1fcf397baeb8a0b687a162a2b2aef3d | [
"BSD-3-Clause"
] | 11 | 2015-03-14T14:30:51.000Z | 2022-03-15T13:01:44.000Z | enaml/enaml/web/hyperlink.py | ContinuumIO/ashiba | a93e7785d1fcf397baeb8a0b687a162a2b2aef3d | [
"BSD-3-Clause"
] | 3 | 2015-01-31T11:12:56.000Z | 2022-03-14T00:53:25.000Z | enaml/enaml/web/hyperlink.py | ContinuumIO/ashiba | a93e7785d1fcf397baeb8a0b687a162a2b2aef3d | [
"BSD-3-Clause"
] | 4 | 2015-01-27T01:56:14.000Z | 2021-02-23T07:21:20.000Z |
from atom.api import Unicode
from enaml.core.declarative import d_
from html_object import HTMLObject
from lxml.html import builder as E
class Hyperlink(HTMLObject):
tag = E.A
text = d_(Unicode())
id = d_(Unicode())
type = d_(Unicode())
def initialize(self):
super(Hyperlink, self).init... | 22.48 | 54 | 0.645907 |
2e213fa8fb3d7a787ca0e0556eadcceaff035628 | 1,942 | py | Python | spacq/tests/tool/box.py | bleutooth65/SpanishAcquisition3 | 50d1445c57f7ecf3bbf03a2cb28befedba1bd57a | [
"BSD-2-Clause"
] | null | null | null | spacq/tests/tool/box.py | bleutooth65/SpanishAcquisition3 | 50d1445c57f7ecf3bbf03a2cb28befedba1bd57a | [
"BSD-2-Clause"
] | null | null | null | spacq/tests/tool/box.py | bleutooth65/SpanishAcquisition3 | 50d1445c57f7ecf3bbf03a2cb28befedba1bd57a | [
"BSD-2-Clause"
] | null | null | null | import logging
log = logging.getLogger(__name__)
from nose.plugins.skip import SkipTest
import re
from unittest import TestCase
from testconfig import config as tc
class AssertHandler(logging.handlers.BufferingHandler):
"""
A logging handler that allows making assertions based on its contents.
"""
def __init__... | 23.975309 | 86 | 0.692585 |
d56e5a741e7672b87fed4e665ba078dd851d4764 | 1,325 | py | Python | pymillerrabin.py | milanboers/pymillerrabin | f42e4a8de934b1906dfe8000da3a1b09b976c560 | [
"MIT"
] | 1 | 2021-06-01T22:59:18.000Z | 2021-06-01T22:59:18.000Z | pymillerrabin.py | milanboers/pymillerrabin | f42e4a8de934b1906dfe8000da3a1b09b976c560 | [
"MIT"
] | null | null | null | pymillerrabin.py | milanboers/pymillerrabin | f42e4a8de934b1906dfe8000da3a1b09b976c560 | [
"MIT"
] | null | null | null | def findsd(n):
d = n - 1
s = 0
while d % 2 == 0:
d >>= 1
s += 1
return (s, d)
# Is composite?
def MillerRabin(n, a, s, d):
if pow(a, d, n) == 1:
return False #might be prime
for r in range(0, s, 1):
if pow(a, 2**r*d, n) == n-1:
return False #might be prime
return True #definitely not prime
# Is n ... | 21.721311 | 71 | 0.581132 |
f8b40307423db0804310b9650782734b139fb697 | 498 | py | Python | modules/order_strategy/models/logic/static.py | heolin123/funcrowd | 20167783de208394c09ed0429a5f02ec6dd79c42 | [
"MIT"
] | null | null | null | modules/order_strategy/models/logic/static.py | heolin123/funcrowd | 20167783de208394c09ed0429a5f02ec6dd79c42 | [
"MIT"
] | 11 | 2019-11-12T23:26:45.000Z | 2021-06-10T17:37:23.000Z | modules/order_strategy/models/logic/static.py | heolin123/funcrowd | 20167783de208394c09ed0429a5f02ec6dd79c42 | [
"MIT"
] | null | null | null | from .base import BaseStrategyLogic
class StaticStrategyLogic(BaseStrategyLogic):
def next(self):
items = self.task.items
if not self.task.multiple_annotations:
items = self.task.exclude_items_with_user_annotations(items, self.user)
if self.item:
return items.filt... | 27.666667 | 83 | 0.664659 |
486ad788737a7dce7e043b56cb56dd402a61e4b7 | 12,841 | py | Python | ebirdtaiwan/dash_apps/ShowWinners.py | even311379/EbirdTaiwan2020 | 2c1aa4d7346b5ade909d45f7c245fa4988394124 | [
"MIT"
] | null | null | null | ebirdtaiwan/dash_apps/ShowWinners.py | even311379/EbirdTaiwan2020 | 2c1aa4d7346b5ade909d45f7c245fa4988394124 | [
"MIT"
] | null | null | null | ebirdtaiwan/dash_apps/ShowWinners.py | even311379/EbirdTaiwan2020 | 2c1aa4d7346b5ade909d45f7c245fa4988394124 | [
"MIT"
] | null | null | null | import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from django_plotly_dash import DjangoDash
import dash_bootstrap_components as dbc
import plotly.graph_objs as go
import dash_table
import datetime, re
import pandas as pd
from fall.mod... | 42.66113 | 146 | 0.551515 |
3fa502faf70c398bf078b702343f7e9a67252400 | 781 | pyde | Python | sketch_191218d_list79_zadanie/sketch_191218d_list79_zadanie.pyde | takoe-sebe/2019-fall-polytech-cs | a98472c7689cfdc42da710bf6ef8aef7278b276f | [
"MIT"
] | null | null | null | sketch_191218d_list79_zadanie/sketch_191218d_list79_zadanie.pyde | takoe-sebe/2019-fall-polytech-cs | a98472c7689cfdc42da710bf6ef8aef7278b276f | [
"MIT"
] | null | null | null | sketch_191218d_list79_zadanie/sketch_191218d_list79_zadanie.pyde | takoe-sebe/2019-fall-polytech-cs | a98472c7689cfdc42da710bf6ef8aef7278b276f | [
"MIT"
] | null | null | null | lg_diam =0
lg_rad=0
lg_circ=0
sm_diam=0
cx=0
cy=0
def setup():
global lg_diam , lg_rad , lg_circ , sm_diam , cx , cy
background(100)
smooth()
size(500,400)
noStroke()
lg_diam = width * .55
lg_rad = lg_diam /2
lg_circ = PI * lg_diam
cx = width /2
cy = height /2
colorMode (HSB)... | 23.666667 | 57 | 0.573624 |
cb670a8d0da408c0175f99a7ecd067395b0d35c3 | 141 | py | Python | att_app/templatetags/filters.py | tunir27/django-Attendance | 4075c93bce56f02b06de126349bcc63294e07f0b | [
"MIT"
] | 3 | 2019-07-05T16:03:39.000Z | 2019-11-06T07:20:29.000Z | att_app/templatetags/filters.py | tunir27/django-Attendance | 4075c93bce56f02b06de126349bcc63294e07f0b | [
"MIT"
] | 6 | 2020-06-05T17:53:31.000Z | 2021-09-07T23:50:09.000Z | att_app/templatetags/filters.py | tunir27/django-Attendance | 4075c93bce56f02b06de126349bcc63294e07f0b | [
"MIT"
] | 3 | 2018-04-30T15:09:04.000Z | 2018-12-15T12:45:14.000Z | from django import template
register = template.Library()
@register.filter(name='subtract')
def subtract(value, arg):
return value - arg
| 23.5 | 33 | 0.751773 |
db65b3be21fa4680000310bd6ddb51617e24adb2 | 303 | py | Python | sql/sql_sql.py | Zuoxiaoxian/Excel_Oracle_conf_log | e4ded91c333af466542ba25dfd162f192347bc82 | [
"MIT"
] | null | null | null | sql/sql_sql.py | Zuoxiaoxian/Excel_Oracle_conf_log | e4ded91c333af466542ba25dfd162f192347bc82 | [
"MIT"
] | null | null | null | sql/sql_sql.py | Zuoxiaoxian/Excel_Oracle_conf_log | e4ded91c333af466542ba25dfd162f192347bc82 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2018/5/25 10:45
# @Author : xiao xian.zuo
# @Email : 1980179070@163.com
# @File : sql_sql.py
# @Software : PyCharm
# select_sql = """select * from ACTION_FLAG_TYPE"""
def select():
return """select * from CST_EXCEL_DETAIL_SAMPLE where INSPECTID=2""" | 25.25 | 72 | 0.627063 |
6ad36266c800e7b4e38302c183644bea968fa162 | 5,613 | py | Python | models/cells/modelDCN2011Luthman.py | HarshKhilawala/cerebmodels | d2a2f2ef947ef9dc23ddce6e55159240cd3233cb | [
"BSD-3-Clause"
] | null | null | null | models/cells/modelDCN2011Luthman.py | HarshKhilawala/cerebmodels | d2a2f2ef947ef9dc23ddce6e55159240cd3233cb | [
"BSD-3-Clause"
] | 9 | 2020-03-24T17:09:03.000Z | 2021-05-17T16:11:17.000Z | models/cells/modelDCN2011Luthman.py | myHBPwork/cerebmodels | 371ea7f1bbe388f1acade17c7128b8ca6ab8fb7a | [
"BSD-3-Clause"
] | 1 | 2021-05-21T03:08:41.000Z | 2021-05-21T03:08:41.000Z | # ~/models/cells/modelDCN2011Luthman.py
import os
pwd = os.getcwd() # record root directory path ~/cerebmodels
path_to_files = pwd + os.sep + "models" + os.sep + "cells" + os.sep + \
"DCN2011Luthman" + os.sep # record path to this model/folder
from models.cells.DCN2011Luthman.ExcitatoryDCNneuron import... | 50.116071 | 268 | 0.554605 |
9323cc3e8650367cb28a40007fd2fcbf37b5a04a | 79,581 | py | Python | controllers/inv.py | ramdesh/eden | 501eab1782ba97417afb8d236b211dbdd6750dfb | [
"MIT"
] | 2 | 2019-11-25T20:34:52.000Z | 2021-06-04T20:05:46.000Z | controllers/inv.py | ramdesh/eden | 501eab1782ba97417afb8d236b211dbdd6750dfb | [
"MIT"
] | 1 | 2020-01-29T15:33:17.000Z | 2020-01-29T15:33:17.000Z | controllers/inv.py | ramdesh/eden | 501eab1782ba97417afb8d236b211dbdd6750dfb | [
"MIT"
] | 3 | 2019-11-30T20:25:55.000Z | 2022-02-03T17:12:16.000Z | # -*- coding: utf-8 -*-
"""
Inventory Management
A module to record inventories of items at a locations (sites),
including Warehouses, Offices, Shelters & Hospitals
"""
module = request.controller
if not settings.has_module(module):
raise HTTP(404, body="Module disabled: %s" % module)
# -----------... | 43.749863 | 142 | 0.464244 |
1ced76791b4e15b5dc10f620fcd5f06c71cd7b7f | 2,852 | py | Python | project/apps/adjudication/tests/factories.py | dbinetti/barberscore | 13c3d8193834bd2bb79922e28d3f5ab1675bdffd | [
"BSD-2-Clause"
] | 13 | 2017-08-07T15:45:49.000Z | 2019-07-03T13:58:50.000Z | project/apps/adjudication/tests/factories.py | barberscore/barberscore-api | 2aa9f8598c18c28ba1d4a294f76fd055619f803e | [
"BSD-2-Clause"
] | 309 | 2017-07-14T02:34:12.000Z | 2022-01-14T21:37:02.000Z | project/apps/adjudication/tests/factories.py | dbinetti/barberscore-django | 16fbd9945becda0a765bbdf52ad459a63655128f | [
"BSD-2-Clause"
] | 5 | 2017-08-07T14:01:07.000Z | 2019-06-24T19:44:55.000Z |
# Standard Library
import datetime
import rest_framework_jwt
# Third-Party
from factory import Faker # post_generation,
from factory import Iterator
from factory import LazyAttribute
from factory import PostGenerationMethodCall
from factory import RelatedFactory
from factory import Sequence
from factory import SubF... | 26.407407 | 82 | 0.761571 |
4faf69786777daab9c3debdefa35f5c67125dca4 | 4,597 | py | Python | tests/test_misc.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | tests/test_misc.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | tests/test_misc.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
import codecs
import os
import sys
import tempfile
import unittest
from conda.core.subdir_data import cache_fn_url
from conda.misc import url_pat, walk_prefix
from conda.utils import Utf8NamedTemporaryFile
class TestMi... | 35.361538 | 104 | 0.621057 |
2e303b9e4b92b8d4727af1d75cc1a9cc053be5c4 | 1,403 | py | Python | atg_project/urls.py | zaryab2000/DJANGO_BLOG_ATG | b09f2624eff3d5a807b1e9242aa29072980e92eb | [
"MIT"
] | null | null | null | atg_project/urls.py | zaryab2000/DJANGO_BLOG_ATG | b09f2624eff3d5a807b1e9242aa29072980e92eb | [
"MIT"
] | null | null | null | atg_project/urls.py | zaryab2000/DJANGO_BLOG_ATG | b09f2624eff3d5a807b1e9242aa29072980e92eb | [
"MIT"
] | null | null | null | """atg_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-b... | 40.085714 | 100 | 0.73129 |
783c97aec79ed0f418674b2b9218d2ffe84a5b9e | 184 | py | Python | python/Exercicios/ex097.py | Robert-Marchinhaki/primeiros-passos-Python | 515c2c418bfb941bd9af14cf598eca7fe2985592 | [
"MIT"
] | null | null | null | python/Exercicios/ex097.py | Robert-Marchinhaki/primeiros-passos-Python | 515c2c418bfb941bd9af14cf598eca7fe2985592 | [
"MIT"
] | null | null | null | python/Exercicios/ex097.py | Robert-Marchinhaki/primeiros-passos-Python | 515c2c418bfb941bd9af14cf598eca7fe2985592 | [
"MIT"
] | null | null | null | def mensagem(num, txt):
print('-' * (num + 2))
print('', txt)
print('-' * (num + 2))
frase = str(input('Digite sua frase: ')).strip()
mensagem(num=len(frase), txt=frase)
| 20.444444 | 48 | 0.554348 |
d1e10e2bd4cb53a9d5ea81b4a80dd4f2ed3ca1b3 | 13,328 | py | Python | mayan/apps/documents/models/document_models.py | bonitobonita24/Mayan-EDMS | 7845fe0e1e83c81f5d227a16116397a3d3883b85 | [
"Apache-2.0"
] | 343 | 2015-01-05T14:19:35.000Z | 2018-12-10T19:07:48.000Z | mayan/apps/documents/models/document_models.py | bonitobonita24/Mayan-EDMS | 7845fe0e1e83c81f5d227a16116397a3d3883b85 | [
"Apache-2.0"
] | 191 | 2015-01-03T00:48:19.000Z | 2018-11-30T09:10:25.000Z | mayan/apps/documents/models/document_models.py | bonitobonita24/Mayan-EDMS | 7845fe0e1e83c81f5d227a16116397a3d3883b85 | [
"Apache-2.0"
] | 114 | 2015-01-08T20:21:05.000Z | 2018-12-10T19:07:53.000Z | import logging
from pathlib import Path
import uuid
from django.apps import apps
from django.core.files import File
from django.db import models, transaction
from django.urls import reverse
from django.utils.timezone import now
from django.utils.translation import ugettext, ugettext_lazy as _
from mayan.apps.converte... | 34.618182 | 124 | 0.617347 |
6c8ebbd9c639c8240b718362149058a4d7e7642a | 2,126 | py | Python | gmail.py | ramrom/haus | 6ad300be0c1dd0818248503ffe70695a878a1ace | [
"MIT"
] | 1 | 2019-11-30T03:45:38.000Z | 2019-11-30T03:45:38.000Z | gmail.py | ramrom/haus | 6ad300be0c1dd0818248503ffe70695a878a1ace | [
"MIT"
] | null | null | null | gmail.py | ramrom/haus | 6ad300be0c1dd0818248503ffe70695a878a1ace | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
import httplib2
import os, pdb
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
try:
import argparse
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
except ImportError:
flags... | 29.527778 | 80 | 0.731421 |
1bb93f7f6281968c55a969271822f25589f2cd04 | 6,178 | py | Python | tests/mutations/test_mediaobject.py | trompamusic/ce-queries-template | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | 1 | 2020-06-18T15:43:18.000Z | 2020-06-18T15:43:18.000Z | tests/mutations/test_mediaobject.py | trompamusic/ce-queries-template | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | 60 | 2019-12-17T11:08:28.000Z | 2021-03-02T16:19:41.000Z | tests/mutations/test_mediaobject.py | trompamusic/trompace-client | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | null | null | null | import os
import pytest
from tests import CeTestCase
from trompace.exceptions import UnsupportedLanguageException, NotAMimeTypeException
from trompace.mutations import mediaobject
class TestMediaObject(CeTestCase):
def setUp(self) -> None:
super()
self.data_dir = os.path.join(self.test_director... | 58.283019 | 216 | 0.67708 |
04f4519ff2edf4745d63b96935346215aa4b19bf | 230 | py | Python | scripts/mic.py | georgsp/mdmTerminal2 | 50255ff72ec35d6a7d567f0c15d02d82a0476670 | [
"Apache-2.0",
"MIT"
] | 24 | 2018-08-28T10:02:56.000Z | 2021-12-27T15:10:16.000Z | scripts/mic.py | georgsp/mdmTerminal2 | 50255ff72ec35d6a7d567f0c15d02d82a0476670 | [
"Apache-2.0",
"MIT"
] | 14 | 2018-11-10T15:28:57.000Z | 2021-01-22T23:17:14.000Z | scripts/mic.py | georgsp/mdmTerminal2 | 50255ff72ec35d6a7d567f0c15d02d82a0476670 | [
"Apache-2.0",
"MIT"
] | 10 | 2018-10-30T14:28:32.000Z | 2021-01-22T05:30:47.000Z | #!/usr/bin/env python3
import speech_recognition as sr
for index, name in enumerate(sr.Microphone.list_microphone_names()):
print("Microphone with name \"{1}\" found for `Microphone(device_index={0})`".format(index, name))
| 28.75 | 102 | 0.73913 |
c5af33b2193203efa7ab1ff071afe9a56d3af6ae | 35,090 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_ospf.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_ospf.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_ospf.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 36.06372 | 140 | 0.552978 |
a8fe6262ad03fc409436f437e392415ab3c346f1 | 6,398 | py | Python | monetio/obs/openaq.py | aring1988/monetio | c14a0d9fbf82a4d4048ebde71add88c7e1c3de08 | [
"MIT"
] | 10 | 2020-03-12T19:01:15.000Z | 2022-03-08T20:19:55.000Z | monetio/obs/openaq.py | aring1988/monetio | c14a0d9fbf82a4d4048ebde71add88c7e1c3de08 | [
"MIT"
] | 42 | 2020-03-13T19:26:17.000Z | 2022-03-30T20:35:31.000Z | monetio/obs/openaq.py | aring1988/monetio | c14a0d9fbf82a4d4048ebde71add88c7e1c3de08 | [
"MIT"
] | 11 | 2020-03-30T20:23:24.000Z | 2022-03-04T18:46:24.000Z | """Short summary.
Attributes
----------
url : type
Description of attribute `url`.
dates : type
Description of attribute `dates`.
df : type
Description of attribute `df`.
daily : type
Description of attribute `daily`.
objtype : type
Description of att... | 34.031915 | 79 | 0.539075 |
ded4d628cf3a808fe2070cdb8fb3e2a3ab3d5e20 | 1,367 | py | Python | pictures/mahuika.py | pletzer/fidibench | d6465445d6fb3ffd20b53419dc7f833650071e93 | [
"MIT"
] | 7 | 2018-02-02T21:12:56.000Z | 2020-09-10T01:07:18.000Z | pictures/mahuika.py | pletzer/fidibench | d6465445d6fb3ffd20b53419dc7f833650071e93 | [
"MIT"
] | 3 | 2020-09-09T23:17:00.000Z | 2020-09-15T02:11:33.000Z | pictures/mahuika.py | pletzer/fidibench | d6465445d6fb3ffd20b53419dc7f833650071e93 | [
"MIT"
] | 2 | 2019-01-31T22:15:40.000Z | 2022-03-30T02:08:30.000Z | import matplotlib
import numpy as np
import matplotlib.pyplot as plt
font = {'family' : 'normal',
'size' : 18}
matplotlib.rc('font', **font)
from matplotlib import pylab
# for nth in 36 24 18 12 4 2 1; do export OMP_NUM_THREADS=$nth; time ./upwind/cxx/upwindCxx -numCells 512 -numSteps 10 ; done
# upwindCxx... | 36.945946 | 125 | 0.697879 |
b6c5d4f1680ef76decd76176686d9563176a1322 | 2,038 | py | Python | python_modules/dagster/dagster_tests/core_tests/test_solid_with_config.py | shahvineet98/dagster | 2471d39c52f660e23e8c0d8e8ded873ddc3df036 | [
"Apache-2.0"
] | 3 | 2020-09-09T04:10:23.000Z | 2021-11-08T02:10:42.000Z | python_modules/dagster/dagster_tests/core_tests/test_solid_with_config.py | shahvineet98/dagster | 2471d39c52f660e23e8c0d8e8ded873ddc3df036 | [
"Apache-2.0"
] | 2 | 2021-05-11T13:36:27.000Z | 2021-09-03T01:53:11.000Z | python_modules/dagster/dagster_tests/core_tests/test_solid_with_config.py | shahvineet98/dagster | 2471d39c52f660e23e8c0d8e8ded873ddc3df036 | [
"Apache-2.0"
] | 1 | 2021-02-21T12:16:47.000Z | 2021-02-21T12:16:47.000Z | import pytest
from dagster import DagsterInvalidConfigError, Field, String, execute_pipeline, pipeline, solid
def test_basic_solid_with_config():
did_get = {}
@solid(
name='solid_with_context',
input_defs=[],
output_defs=[],
config={'some_config': Field(String)},
)
de... | 25.797468 | 97 | 0.636899 |
2d194dfd1d958a6ae83a0cb283b19882b473a40a | 13,280 | py | Python | fs_image/compiler/tests/test_image_layer.py | singhaditya28/fs_image | 3d122da48eab8b26e5add6754cc1f91296139c58 | [
"MIT"
] | null | null | null | fs_image/compiler/tests/test_image_layer.py | singhaditya28/fs_image | 3d122da48eab8b26e5add6754cc1f91296139c58 | [
"MIT"
] | null | null | null | fs_image/compiler/tests/test_image_layer.py | singhaditya28/fs_image | 3d122da48eab8b26e5add6754cc1f91296139c58 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import copy
import json
import os
import unittest
from contextlib import contextmanager
from grp import getgrnam
from ... | 40.736196 | 79 | 0.564684 |
01259b0dbf285619e49513bfdb8365c7a7dca42d | 1,396 | py | Python | aliyun-python-sdk-rdc/aliyunsdkrdc/request/v20180821/JoinCompanyRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-rdc/aliyunsdkrdc/request/v20180821/JoinCompanyRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-rdc/aliyunsdkrdc/request/v20180821/JoinCompanyRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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... | 36.736842 | 74 | 0.760029 |
47b6d115bdd1491145b3b37e4faca1134f5cd754 | 482 | py | Python | tests/extension/thread_/stream_fifo/test_thread_stream_fifo.py | jesseclin/veriloggen | a645f2c53f04e5b88213eef17779d212192ea2b5 | [
"Apache-2.0"
] | 232 | 2015-09-01T16:07:48.000Z | 2022-03-28T14:53:28.000Z | tests/extension/thread_/stream_fifo/test_thread_stream_fifo.py | jesseclin/veriloggen | a645f2c53f04e5b88213eef17779d212192ea2b5 | [
"Apache-2.0"
] | 34 | 2015-08-21T09:13:03.000Z | 2022-03-21T23:52:44.000Z | tests/extension/thread_/stream_fifo/test_thread_stream_fifo.py | jesseclin/veriloggen | a645f2c53f04e5b88213eef17779d212192ea2b5 | [
"Apache-2.0"
] | 46 | 2015-09-24T14:39:57.000Z | 2022-02-23T21:59:56.000Z | from __future__ import absolute_import
from __future__ import print_function
import os
import veriloggen
import thread_stream_fifo
def test(request):
veriloggen.reset()
simtype = request.config.getoption('--sim')
rslt = thread_stream_fifo.run(filename=None, simtype=simtype,
... | 25.368421 | 102 | 0.692946 |
8ca60eedf8faaa4acc60e1a3d4e37ad872c192bf | 1,997 | py | Python | linkedlist/Reference_code/q6.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | 79 | 2018-03-27T12:37:49.000Z | 2022-01-21T10:18:17.000Z | linkedlist/Reference_code/q6.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | null | null | null | linkedlist/Reference_code/q6.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | 27 | 2018-04-08T03:07:06.000Z | 2021-10-30T00:01:50.000Z | """
问题描述:41个人排成一个圈,由第一个人开始报数,报数到3的人就自杀,
然后再由下一个人重新报1,报数到3的人再自杀,这样依次下去,直到剩下
最后一个人时,他可以自由选择自己的命运。这就是著名的约瑟夫问题,现在
请用单向环形链表描述该结构并呈现整个自杀过程
要求:输入一个环形单向链表的头结点head和报数的值m,返回最后生存的节
点,该节点自己组成一个单向环形链表,其他节点都删掉
进阶:
如果链表头结点数为N,想在时间复杂度为O(N)时完成原问题的要求,如何实现
思路:参见https://blog.oldj.net/2010/05/27/joseph-ring/
"""
from linkedlist.toolcls... | 23.494118 | 57 | 0.587882 |
64e503cc24246a8ce05d2cecc4894e56a7f9c57f | 770 | py | Python | ib_trading_calendars/exchange_calendar_bvl.py | alexanu/ib-trading-calendars | 5a92770d106542968e856aa54ae48d48b306d7f3 | [
"Apache-2.0"
] | 9 | 2019-02-04T19:42:12.000Z | 2021-08-04T18:36:43.000Z | ib_trading_calendars/exchange_calendar_bvl.py | alexanu/ib-trading-calendars | 5a92770d106542968e856aa54ae48d48b306d7f3 | [
"Apache-2.0"
] | 1 | 2020-03-12T17:32:38.000Z | 2020-03-12T17:32:38.000Z | ib_trading_calendars/exchange_calendar_bvl.py | alexanu/ib-trading-calendars | 5a92770d106542968e856aa54ae48d48b306d7f3 | [
"Apache-2.0"
] | 8 | 2019-02-04T21:08:38.000Z | 2021-08-04T18:36:45.000Z | # Copyright 2019 QuantRocket 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 required by applicable law... | 36.666667 | 74 | 0.781818 |
36d1de7eff4868d89e95fd1d67526e1ae69ed1b7 | 1,148 | py | Python | cancer-immune/EMEWS-scripts/python/test/py_tests.py | rheiland/PhysiCell-EMEWS-2 | ec6ae7dab314b839f46a152ce9f5905155012d48 | [
"BSD-3-Clause"
] | null | null | null | cancer-immune/EMEWS-scripts/python/test/py_tests.py | rheiland/PhysiCell-EMEWS-2 | ec6ae7dab314b839f46a152ce9f5905155012d48 | [
"BSD-3-Clause"
] | null | null | null | cancer-immune/EMEWS-scripts/python/test/py_tests.py | rheiland/PhysiCell-EMEWS-2 | ec6ae7dab314b839f46a152ce9f5905155012d48 | [
"BSD-3-Clause"
] | 2 | 2019-05-24T02:42:11.000Z | 2021-07-12T12:19:46.000Z | import unittest
import xml.etree.ElementTree as ET
import params2xml
class TestParamsToXML(unittest.TestCase):
def test_params_to_xml(self):
params = {'user_parameters.tumor_radius' : 'foo:bar:100.32',
'user_parameters.number_of_immune_cells' : '10',
'overall.max_time' : '... | 34.787879 | 75 | 0.65331 |
275aa5b5abd42c2c7578ceeca816e0b73d784da0 | 578 | py | Python | drf_api_sample/drfapi/models.py | yuekui/drf-api-tracking | c9264e8c9486288130ea014798d235bc84e94ca2 | [
"ISC"
] | 191 | 2020-02-23T21:51:48.000Z | 2022-03-31T15:23:26.000Z | drf_api_sample/drfapi/models.py | yuekui/drf-api-tracking | c9264e8c9486288130ea014798d235bc84e94ca2 | [
"ISC"
] | 61 | 2020-02-27T17:03:03.000Z | 2022-03-28T10:59:36.000Z | drf_api_sample/drfapi/models.py | yuekui/drf-api-tracking | c9264e8c9486288130ea014798d235bc84e94ca2 | [
"ISC"
] | 45 | 2020-02-27T18:46:09.000Z | 2022-03-11T03:41:11.000Z | from django.db import models
# Create your models here.
from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
from rest_framework_tracking.mixins import LoggingMixin
# Serializers define the API representation.
class UserSerializer(serializers.HyperlinkedModelSerializer):
... | 27.52381 | 61 | 0.769896 |
5f66153e2359b645e9fe5d3ebb197700a314cc93 | 1,410 | py | Python | beakerx/beakerx/beakerx_server.py | altavir/beakerx | 06fb4200d8042fc2a52e3a1ce8be8aa4b72d3743 | [
"Apache-2.0"
] | 1 | 2018-10-16T18:59:59.000Z | 2018-10-16T18:59:59.000Z | beakerx/beakerx/beakerx_server.py | altavir/beakerx | 06fb4200d8042fc2a52e3a1ce8be8aa4b72d3743 | [
"Apache-2.0"
] | 6 | 2020-05-20T17:44:02.000Z | 2020-05-20T17:58:57.000Z | beakerx/beakerx/beakerx_server.py | altavir/beakerx | 06fb4200d8042fc2a52e3a1ce8be8aa4b72d3743 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 TWO SIGMA OPEN SOURCE, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 32.045455 | 77 | 0.678723 |
698b2ac1b92f2be1eb73b13e8f72b45496aa096c | 444 | py | Python | pypipe/lib/__init__.py | AGrigis/pypipe | a77fc2c81cb469535b650c79718f811c5c056238 | [
"CECILL-B"
] | null | null | null | pypipe/lib/__init__.py | AGrigis/pypipe | a77fc2c81cb469535b650c79718f811c5c056238 | [
"CECILL-B"
] | null | null | null | pypipe/lib/__init__.py | AGrigis/pypipe | a77fc2c81cb469535b650c79718f811c5c056238 | [
"CECILL-B"
] | null | null | null | ##########################################################################
# PyPipe - Copyright (C) AGrigis, 2017
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
####... | 34.153846 | 74 | 0.488739 |
c70c144dae1ae89f815263eb79999e4629d33c34 | 2,564 | py | Python | src/container/task.py | eebook/jianshu2e-book | d638fb8c2f47cf8e91e9f74e2e1e5f61f3c98a48 | [
"MIT"
] | 7 | 2019-01-02T14:52:48.000Z | 2021-11-05T06:11:46.000Z | src/container/task.py | knarfeh/jianshu2e-book | d638fb8c2f47cf8e91e9f74e2e1e5f61f3c98a48 | [
"MIT"
] | 2 | 2021-03-22T17:11:32.000Z | 2021-12-13T19:36:17.000Z | src/container/task.py | ee-book/jianshu2e-book | d638fb8c2f47cf8e91e9f74e2e1e5f61f3c98a48 | [
"MIT"
] | 2 | 2019-04-18T05:44:24.000Z | 2021-06-10T09:35:44.000Z | # -*- coding: utf-8 -*-
from src.tools.type import Type
from src.container.initialbook import InitialBook
class Spider(object):
def __init__(self):
self.href = ''
return
class SingleTask(object):
u"""
任务信息以对象属性方式进行存储
"""
def __init__(self):
self.kind = ''
self.sp... | 30.891566 | 104 | 0.620905 |
503936d53eae6b38f64fc9d3cf14cb902ff82a89 | 264 | py | Python | filer/test_utils/custom_image/models.py | PeterW-LWL/django-filer | 472a0419bfa185a8b0a861bd0779ac6d817082c7 | [
"BSD-3-Clause"
] | 134 | 2015-01-01T17:57:03.000Z | 2021-11-01T15:21:47.000Z | filer/test_utils/custom_image/models.py | PeterW-LWL/django-filer | 472a0419bfa185a8b0a861bd0779ac6d817082c7 | [
"BSD-3-Clause"
] | 143 | 2015-01-05T04:53:01.000Z | 2015-11-27T14:44:29.000Z | filer/test_utils/custom_image/models.py | PeterW-LWL/django-filer | 472a0419bfa185a8b0a861bd0779ac6d817082c7 | [
"BSD-3-Clause"
] | 86 | 2015-01-05T13:05:25.000Z | 2021-04-03T01:36:15.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.db import models
from ...models.abstract import BaseImage
class Image(BaseImage):
extra_description = models.TextField()
class Meta(object):
app_label = 'custom_image'
| 18.857143 | 42 | 0.715909 |
72a27ff16b57bad4f9472eb182ecd486526c1596 | 88 | py | Python | danny_project/stats.py | df3960/APW1 | 2a7c4da19c6077cddbe24d172df281b59c2a8fef | [
"CC0-1.0"
] | null | null | null | danny_project/stats.py | df3960/APW1 | 2a7c4da19c6077cddbe24d172df281b59c2a8fef | [
"CC0-1.0"
] | null | null | null | danny_project/stats.py | df3960/APW1 | 2a7c4da19c6077cddbe24d172df281b59c2a8fef | [
"CC0-1.0"
] | null | null | null | import Pandas as pd
import numpy as np
import matplotlib.pyplot as plt
pd.read_csv("")
| 14.666667 | 31 | 0.772727 |
40c72b235206093afcfcf615e0b8c3359ce07edb | 7,405 | py | Python | contrib/runners/windows_command_runner/tests/unit/test_windows_runners.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | contrib/runners/windows_command_runner/tests/unit/test_windows_runners.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | 2 | 2020-03-04T08:33:36.000Z | 2020-03-04T08:34:14.000Z | contrib/runners/windows_command_runner/tests/unit/test_windows_runners.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 33.506787 | 93 | 0.521269 |
7f63dc1b3e40c7be10de47ab50ed56e30efd7a12 | 2,782 | py | Python | frappe-bench/env/lib/python2.7/site-packages/github/tests/Status.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/github/tests/Status.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/github/tests/Status.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2014 Vincent Jacques <vincent@vincent-ja... | 57.958333 | 189 | 0.47376 |
3a4ed027220ffee3285fe614f03f49e14216d1c3 | 2,864 | py | Python | logger_bot.py | mcurasya/dnd-bot | 4a08ec98df1f1e80f0a00b8d95f7242405cdb7d9 | [
"MIT"
] | 1 | 2018-07-07T18:19:07.000Z | 2018-07-07T18:19:07.000Z | logger_bot.py | mcurasya/dnd-bot | 4a08ec98df1f1e80f0a00b8d95f7242405cdb7d9 | [
"MIT"
] | null | null | null | logger_bot.py | mcurasya/dnd-bot | 4a08ec98df1f1e80f0a00b8d95f7242405cdb7d9 | [
"MIT"
] | null | null | null | import logging
import telebot
import constants
import time
import json
log_bot = telebot.TeleBot(constants.log_token)
abilities = {}
def next_step(message):
if message.from_user.id == constants.my_id:
user_markup = telebot.types.ReplyKeyboardMarkup(one_time_keyboard=False, resize_keyboard=True)... | 36.253165 | 103 | 0.678422 |
92266c0ffb99b98fe3349cc13c25bc2724b9f8e2 | 2,796 | py | Python | hydroffice/ssp_manager/refmonitor_ui.py | hydroffice/hyo_sspmanager | 6722cd9ecd5bf7236b65aa394287751302d641e7 | [
"BSD-3-Clause"
] | null | null | null | hydroffice/ssp_manager/refmonitor_ui.py | hydroffice/hyo_sspmanager | 6722cd9ecd5bf7236b65aa394287751302d641e7 | [
"BSD-3-Clause"
] | null | null | null | hydroffice/ssp_manager/refmonitor_ui.py | hydroffice/hyo_sspmanager | 6722cd9ecd5bf7236b65aa394287751302d641e7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import wx
import os
import logging
log = logging.getLogger(__name__)
class RefMonitorBase(wx.Frame):
here = os.path.abspath(os.path.dirname(__file__))
def __init__(self, *args, **kwds):
# begin wxGlade: RefractionMo... | 36.311688 | 110 | 0.650572 |
517798d10e5a519a6b43fada0361d028a989bd95 | 1,412 | py | Python | packages/amuse-mameclot/setup.py | rknop/amuse | 85d5bdcc29cfc87dc69d91c264101fafd6658aec | [
"Apache-2.0"
] | 1 | 2021-02-24T16:47:48.000Z | 2021-02-24T16:47:48.000Z | packages/amuse-mameclot/setup.py | rknop/amuse | 85d5bdcc29cfc87dc69d91c264101fafd6658aec | [
"Apache-2.0"
] | 2 | 2018-06-22T13:02:14.000Z | 2018-09-06T20:08:43.000Z | packages/amuse-mameclot/setup.py | rknop/amuse | 85d5bdcc29cfc87dc69d91c264101fafd6658aec | [
"Apache-2.0"
] | null | null | null | import sys
import os
from support.version import version, main_version
from support.classifiers import classifiers
from setuptools import setup
import support
support.use("system")
from support.setup_codes import setup_commands
name = 'amuse-mameclot'
author = 'The AMUSE team'
author_email = 'info@amusecode.org'
lic... | 25.214286 | 78 | 0.763456 |
5540fec2e4cecc684c96f23c09b974ddee0839c1 | 13 | py | Python | __init__.py | BoWarburton/lambdata-bowarburton | 16ee2cbf11987e73720789246c8350c032403781 | [
"MIT"
] | null | null | null | __init__.py | BoWarburton/lambdata-bowarburton | 16ee2cbf11987e73720789246c8350c032403781 | [
"MIT"
] | null | null | null | __init__.py | BoWarburton/lambdata-bowarburton | 16ee2cbf11987e73720789246c8350c032403781 | [
"MIT"
] | null | null | null |
# Empty init | 6.5 | 12 | 0.692308 |
e9cd30f0e163aa50934d1efcd256e008c31ce2a3 | 89 | py | Python | misc/partsdb/webui/partsdb/apps.py | LagunaCreek-Makers/general_info | fdd26cd3fbbaf2961f35a8bf39ade51bb2ffdeae | [
"Unlicense"
] | null | null | null | misc/partsdb/webui/partsdb/apps.py | LagunaCreek-Makers/general_info | fdd26cd3fbbaf2961f35a8bf39ade51bb2ffdeae | [
"Unlicense"
] | null | null | null | misc/partsdb/webui/partsdb/apps.py | LagunaCreek-Makers/general_info | fdd26cd3fbbaf2961f35a8bf39ade51bb2ffdeae | [
"Unlicense"
] | null | null | null | from django.apps import AppConfig
class PartsdbConfig(AppConfig):
name = 'partsdb'
| 14.833333 | 33 | 0.752809 |
da99dc386a7c69e3a6d88f3053200a75b14cf248 | 408 | py | Python | packages/python/plotly/plotly/validators/layout/xaxis/_uirevision.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/layout/xaxis/_uirevision.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/layout/xaxis/_uirevision.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="uirevision", parent_name="layout.xaxis", **kwargs):
super(UirevisionValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,... | 34 | 87 | 0.678922 |
8b80f0e2016a1e49bd9b7fda71058c3b3b3d40a3 | 69 | py | Python | ex17/ex17-short.py | python-practice/lpthw | ad06dfe6a5d2351ee9216b365ff688db820cc035 | [
"MIT"
] | 1 | 2015-07-18T15:09:40.000Z | 2015-07-18T15:09:40.000Z | ex17/ex17-short.py | python-practice/lpthw | ad06dfe6a5d2351ee9216b365ff688db820cc035 | [
"MIT"
] | null | null | null | ex17/ex17-short.py | python-practice/lpthw | ad06dfe6a5d2351ee9216b365ff688db820cc035 | [
"MIT"
] | null | null | null | from sys import argv; open(argv[2], 'w').write(open(argv[1]).read())
| 34.5 | 68 | 0.652174 |
0ef5af6d2bb27698763da99d536f736aa785f5bb | 3,242 | py | Python | elasticsearch/client/ingest.py | achave11/elasticsearch-py | 5611445203ebabb1a450b17c2c93cd3546a12071 | [
"Apache-2.0"
] | 3 | 2020-12-02T21:25:28.000Z | 2021-12-01T18:21:21.000Z | elasticsearch/client/ingest.py | achave11/elasticsearch-py | 5611445203ebabb1a450b17c2c93cd3546a12071 | [
"Apache-2.0"
] | 1 | 2021-06-02T01:45:42.000Z | 2021-06-02T01:45:42.000Z | env/lib/python2.7/site-packages/elasticsearch/client/ingest.py | Eric-Muthemba/qontroverse | 1f12d0e3bbdee628a88bac77dc53426ded220755 | [
"MIT"
] | 1 | 2021-12-01T18:21:12.000Z | 2021-12-01T18:21:12.000Z | from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
class IngestClient(NamespacedClient):
@query_params("master_timeout")
def get_pipeline(self, id=None, params=None):
"""
Returns a pipeline.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-p... | 36.426966 | 119 | 0.627082 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.