hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1aed6a5ecd5cc7c10210dad7671adfecb294801c | 4,140 | py | Python | experiments/steven/online-vae/reacher/full_grill_online.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven/online-vae/reacher/full_grill_online.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven/online-vae/reacher/full_grill_online.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import init_sawyer_camera_v1
from multiworld.envs.mujoco.sawyer_xyz.sawyer_pick_and_place import \
SawyerPickAndPlaceEnv
from rlkit.envs.mujoco.sawyer_push_and_reach_env import (
SawyerPushAndReachXYEasyEnv
)
from rlkit.images.camera im... | 32.34375 | 79 | 0.577295 |
1aed77d922f6bdcb709b2839722e6c2367126e98 | 6,722 | py | Python | rpi_d3m_primitives/featSelect/JMIplus.py | naiyuyin/rpi_d3m_primitives | f95553bee90916d241885d28fb71c8167116d9fa | [
"MIT"
] | 1 | 2019-05-02T21:05:27.000Z | 2019-05-02T21:05:27.000Z | rpi_d3m_primitives/featSelect/JMIplus.py | naiyuyin/rpi_d3m_primitives | f95553bee90916d241885d28fb71c8167116d9fa | [
"MIT"
] | 1 | 2021-03-18T15:52:27.000Z | 2021-03-26T17:54:04.000Z | rpi_d3m_primitives/featSelect/JMIplus.py | naiyuyin/rpi_d3m_primitives | f95553bee90916d241885d28fb71c8167116d9fa | [
"MIT"
] | null | null | null | # with input in the DataFrame format
# update metadata of the dataset
import os, sys
import typing
import scipy.io
import numpy as np
from sklearn import preprocessing
from common_primitives import utils
from d3m import container
from d3m.metadata import base as metadata_base
from d3m.metadata import hyperp... | 41.239264 | 163 | 0.643261 |
1aed9a5581870a1b752217f355539aa3698d0cd6 | 182 | py | Python | word2vec/word2vec.py | furaoing/tensorflow-tutorial | 72e57b4dba50c579dbc24798d23dc86ceeaa9470 | [
"Apache-2.0"
] | null | null | null | word2vec/word2vec.py | furaoing/tensorflow-tutorial | 72e57b4dba50c579dbc24798d23dc86ceeaa9470 | [
"Apache-2.0"
] | null | null | null | word2vec/word2vec.py | furaoing/tensorflow-tutorial | 72e57b4dba50c579dbc24798d23dc86ceeaa9470 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
vocabulary_size = 600
embedding_size = 10
embeddings = tf.Variable(
tf.random_uniform([vocabulary_size, embedding_size], -1.0, 1.0))
| 20.222222 | 68 | 0.758242 |
1aedaeb2c5660b751e9867a1b7325218a4af2e9a | 60 | py | Python | lib/version.py | JaneliaSciComp/twocof | 8c3d99df29b796705ba9c3316c8ea99704a2d3d5 | [
"BSD-3-Clause"
] | null | null | null | lib/version.py | JaneliaSciComp/twocof | 8c3d99df29b796705ba9c3316c8ea99704a2d3d5 | [
"BSD-3-Clause"
] | null | null | null | lib/version.py | JaneliaSciComp/twocof | 8c3d99df29b796705ba9c3316c8ea99704a2d3d5 | [
"BSD-3-Clause"
] | null | null | null | """
version file
djo, 3/10
"""
__version__ = "2.0"
| 4 | 19 | 0.5 |
1aedcadacefdbe7e80b523f64889aa904fb81619 | 2,958 | py | Python | main/EoR_models_consolidation.py | dannyjacobs/PRISim | 89e544d771cf5c4113a4d5787a57c9586fa98eac | [
"MIT"
] | null | null | null | main/EoR_models_consolidation.py | dannyjacobs/PRISim | 89e544d771cf5c4113a4d5787a57c9586fa98eac | [
"MIT"
] | null | null | null | main/EoR_models_consolidation.py | dannyjacobs/PRISim | 89e544d771cf5c4113a4d5787a57c9586fa98eac | [
"MIT"
] | null | null | null | import numpy as NP
import glob
from astropy.io import fits, ascii
import scipy.constants as FCNST
import constants as CNST
import ipdb as PDB
rootdir = '/data3/t_nithyanandan/EoR_models/'
model = '21cmFAST' # 'Lidz' or '21cmFAST'
modeldir = model + '/'
outfile = rootdir + modeldir + 'PS_model.fits'
if model == 'Lidz'... | 38.921053 | 92 | 0.635565 |
1aedda0e9ffb4a21cf8a3e11123ad97792f71f12 | 13,314 | py | Python | sdks/python/appcenter_sdk/models/ReasonStackFrame.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/ReasonStackFrame.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/ReasonStackFrame.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class ReasonStackFra... | 28.880694 | 260 | 0.602223 |
1aee01f4193f2576551cbd461e3ad6a1835b624e | 5,683 | py | Python | tests/test_network_config.py | UnivaCorporation/tortuga-kit-gceadapter | f4e6748bf75b0f32d8286369bbb5863abb24004d | [
"Apache-2.0"
] | 4 | 2018-03-03T15:43:59.000Z | 2019-08-15T11:37:14.000Z | tests/test_network_config.py | UnivaCorporation/tortuga-kit-gceadapter | f4e6748bf75b0f32d8286369bbb5863abb24004d | [
"Apache-2.0"
] | 25 | 2018-03-05T14:45:41.000Z | 2020-11-23T15:02:44.000Z | tests/test_network_config.py | UnivaCorporation/tortuga-kit-gceadapter | f4e6748bf75b0f32d8286369bbb5863abb24004d | [
"Apache-2.0"
] | 7 | 2018-03-03T14:30:40.000Z | 2020-11-18T19:55:20.000Z | # Copyright 2008-2018 Univa Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 28.847716 | 75 | 0.710892 |
1aee1f83128ef8ed2068f0ba74c22de2e13c0a63 | 1,390 | py | Python | Courses/Udacity/CS101/Lesson_9_Problem_Set/01-Important_Links/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2019-02-13T12:02:26.000Z | 2019-02-13T12:02:26.000Z | Courses/Udacity/CS101/Lesson_9_Problem_Set/01-Important_Links/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2018-08-13T15:58:33.000Z | 2018-08-13T15:58:33.000Z | Courses/Udacity/CS101/Lesson_9_Problem_Set/01-Important_Links/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 2 | 2017-08-10T20:01:29.000Z | 2021-07-01T08:39:13.000Z | # Use the BeautifulSoup module to define a bold_links(page) procedure
# that takes as input a string representing the contents of a web page,
# and returns a set containing all the important links on that page.
# An important link is a link that is inside a bold (<b>...</b>) element
# or that contains a bold element in... | 40.882353 | 90 | 0.707194 |
1aee322a47ef303c1b6ee245f95053fa0848248d | 5,228 | py | Python | pyslip/examples/layer_control.py | DoppleGangster/pySlip | cb351a55ac989e2f681f903db91328ee3ada2535 | [
"MIT"
] | null | null | null | pyslip/examples/layer_control.py | DoppleGangster/pySlip | cb351a55ac989e2f681f903db91328ee3ada2535 | [
"MIT"
] | null | null | null | pyslip/examples/layer_control.py | DoppleGangster/pySlip | cb351a55ac989e2f681f903db91328ee3ada2535 | [
"MIT"
] | null | null | null | """
Custom LayerControl widget.
This is used to control each type of layer, whether map- or view-relative.
The layout is:
+ Title text ------------------------------+
| +--+ |
| | | Add layer |
| +--+ |
... | 33.512821 | 79 | 0.570199 |
1aee5ea2a28a459ac78ee3ef944259f3595ebd3a | 7,814 | py | Python | deepchem/utils/evaluate.py | rbharath/deepchem | 8c3bcdd557abdbb380b64c2d460a73aff76fb303 | [
"MIT"
] | 3 | 2017-10-07T13:48:48.000Z | 2021-06-13T09:09:03.000Z | deepchem/utils/evaluate.py | rbharath/deepchem | 8c3bcdd557abdbb380b64c2d460a73aff76fb303 | [
"MIT"
] | 1 | 2017-08-29T22:08:24.000Z | 2017-08-29T22:08:24.000Z | deepchem/utils/evaluate.py | rbharath/deepchem | 8c3bcdd557abdbb380b64c2d460a73aff76fb303 | [
"MIT"
] | 5 | 2017-03-19T01:48:13.000Z | 2019-02-22T01:12:03.000Z | """
Utility functions to evaluate models on datasets.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import csv
import numpy as np
import warnings
import pandas as pd
import sklearn
from deepchem.utils.save import log
from deepchem.trans import undo_tr... | 31.508065 | 80 | 0.655362 |
1aee76e05efb9c5bbcd1327c74e8156797f0ccdd | 4,056 | py | Python | LitterBug.py | nkelton/Project-Litter-Bug | a19e4c02aec7ad565725f4bf8e754f6c4739928b | [
"MIT"
] | null | null | null | LitterBug.py | nkelton/Project-Litter-Bug | a19e4c02aec7ad565725f4bf8e754f6c4739928b | [
"MIT"
] | null | null | null | LitterBug.py | nkelton/Project-Litter-Bug | a19e4c02aec7ad565725f4bf8e754f6c4739928b | [
"MIT"
] | null | null | null | import random
import time
import subprocess
import ClipEditor
import Downloaders
import config
import utils
from ContentUploader import ContentUploader
logger = config.set_logger('LitterBug.py')
class LitterBug(object):
def __init__(self):
self.id = self.generate_id()
self.name = 'plb-' + str(se... | 34.965517 | 91 | 0.63289 |
1aee7e3665a1b4d826175f7c650b9a12deba0d77 | 2,099 | py | Python | pycoind/coins/dogecoin.py | peerchemist/pycoind | 33a600e617ec89c5a0f680ce7725b777d6176ea8 | [
"MIT"
] | 120 | 2015-01-12T18:58:20.000Z | 2022-03-15T21:26:08.000Z | pycoind/coins/dogecoin.py | fudong1127/pycoind | 33a600e617ec89c5a0f680ce7725b777d6176ea8 | [
"MIT"
] | 7 | 2015-06-09T04:46:46.000Z | 2019-01-26T23:04:16.000Z | pycoind/coins/dogecoin.py | fudong1127/pycoind | 33a600e617ec89c5a0f680ce7725b777d6176ea8 | [
"MIT"
] | 57 | 2015-01-08T07:05:50.000Z | 2022-03-15T21:26:10.000Z | # The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mod... | 32.292308 | 107 | 0.727966 |
1aee82fafc7a15cabea201f77419c92d5761d881 | 233,262 | py | Python | ht/hx.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 118 | 2016-01-04T07:46:23.000Z | 2022-03-29T14:12:59.000Z | ht/hx.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 4 | 2017-06-27T08:01:02.000Z | 2020-10-06T14:18:46.000Z | ht/hx.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 22 | 2016-04-20T06:17:35.000Z | 2022-03-07T01:40:25.000Z | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, 2017, 2018 Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software... | 43.172682 | 280 | 0.626879 |
1aeee1264c4d64a2df88429be74e09bc1b996c69 | 1,838 | py | Python | pkgcore/test/sync/test_base.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | 1 | 2021-07-05T13:10:18.000Z | 2021-07-05T13:10:18.000Z | pkgcore/test/sync/test_base.py | vapier/pkgcore | 35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f | [
"BSD-3-Clause"
] | 8 | 2015-03-24T14:21:44.000Z | 2015-03-24T14:21:44.000Z | pkgcore/test/sync/test_base.py | vapier/pkgcore | 35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f | [
"BSD-3-Clause"
] | null | null | null | # Copyright: 2006 Brian Harring <ferringb@gmail.com>
# License: GPL2/BSD
import pwd
from pkgcore.os_data import root_uid
from pkgcore.sync import base, svn
from pkgcore.test import TestCase, SkipTest
from pkgcore.test.sync import make_bogus_syncer, make_valid_syncer
valid = make_valid_syncer(base.ExternalSyncer)
bog... | 34.037037 | 73 | 0.65506 |
1aeeecb6f2bc20efaeb7f9c01946896ad854e506 | 8,245 | py | Python | leetcode_python/Array/range-sum-query-2d-mutable.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Array/range-sum-query-2d-mutable.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Array/range-sum-query-2d-mutable.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
# https://kennyzhuang.gitbooks.io/leetcode-lock/content/308_range_sum_query_2d_-_mutable.html
308: Range Sum Query 2D - Mutable
Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2).
Range Sum Query 2D
The a... | 29.237589 | 158 | 0.497756 |
1aef0d4a66b2b3d0ca016e94323e4b41fd57ec92 | 427 | py | Python | app.py | davidharting/shift-cipher | 2647e226e26b5deede64f066a299d023f831fca3 | [
"Apache-2.0"
] | null | null | null | app.py | davidharting/shift-cipher | 2647e226e26b5deede64f066a299d023f831fca3 | [
"Apache-2.0"
] | null | null | null | app.py | davidharting/shift-cipher | 2647e226e26b5deede64f066a299d023f831fca3 | [
"Apache-2.0"
] | null | null | null | from shift_cipher import ShiftCipher
def main():
message, key = "This is the clear text message full of secrets.", 15
print(message)
print("... Encrypting ...")
encrypted_message = ShiftCipher.encrypt(message, 5)
print(encrypted_message)
print("... Decrypting ...")
decrypted_message = Shi... | 25.117647 | 72 | 0.688525 |
1aef24251a9bae44c0af5da0ec06ed11be8eb248 | 2,407 | py | Python | botx/testing/botx_mock/wsgi/routes/users.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | botx/testing/botx_mock/wsgi/routes/users.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | botx/testing/botx_mock/wsgi/routes/users.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | """Endpoints for chats resource."""
from molten import Request, Response, Settings
from botx.clients.methods.base import APIResponse
from botx.clients.methods.v3.users.by_email import ByEmail
from botx.clients.methods.v3.users.by_huid import ByHUID
from botx.clients.methods.v3.users.by_login import ByLogin
from botx.... | 33.430556 | 82 | 0.746572 |
1aef3dd51caee74b7ca67a567a53851565f7f515 | 6,346 | py | Python | alipay/aop/api/domain/InvoiceOrderDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/InvoiceOrderDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/InvoiceOrderDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class InvoiceOrderDTO(object):
def __init__(self):
self._article_code = None
self._article_fee = None
self._article_id = None
self._article_name = None
self._buy... | 30.805825 | 79 | 0.582414 |
1aef473c358811df7b4016605ce4c842edbc4291 | 31,107 | py | Python | geosoft/gxpy/grid_utility.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 25 | 2017-07-14T06:39:37.000Z | 2022-03-09T21:39:51.000Z | geosoft/gxpy/grid_utility.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 100 | 2016-12-13T17:30:41.000Z | 2021-08-01T20:21:13.000Z | geosoft/gxpy/grid_utility.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 28 | 2016-12-12T17:34:40.000Z | 2022-03-16T15:39:39.000Z | """
Geosoft grid and image utilities.
.. seealso:: `geosoft.gxpy.grid`, `geosoft.gxapi.GXIMG`, `geosoft.gxapi.GXIMU`
.. note::
Regression tests provide usage examples:
`Tests <https://github.com/GeosoftInc/gxpy/blob/master/geosoft/gxpy/tests/test_grid_utility.py>`_
"""
import os
import numpy as np
... | 37.568841 | 114 | 0.591185 |
1aef4d04f7a0ba04ee8f6f9559d8a1ae3655b063 | 8,063 | py | Python | toontown/coghq/DistributedStageRoom.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/coghq/DistributedStageRoom.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/coghq/DistributedStageRoom.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from pandac.PandaModules import *
from toontown.toonbase.ToontownGlobals import *
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
import random
from otp.level import DistributedLevel
from direct.directnotify import DirectNotifyGlobal
from toontown.coghq import StageRoomBase, Sta... | 34.021097 | 224 | 0.667618 |
1aef5c699b251e5fe0f8dddbc629b830352e0bfe | 4,094 | py | Python | app/celery/process_sms_client_response_tasks.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | null | null | null | app/celery/process_sms_client_response_tasks.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | null | null | null | app/celery/process_sms_client_response_tasks.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | null | null | null | import uuid
from datetime import datetime
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from notifications_utils.template import SMSMessageTemplate
from app import notify_celery, statsd_client
from app.celery.service_callback_tasks import (
create_delivery_status_callback_... | 38.990476 | 119 | 0.742062 |
1aef6c40fa86d5f18c900217843b40352633cf61 | 2,282 | py | Python | nicos_mlz/delab/setups/qmesydaq.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/labs/del/setups/qmesydaq.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/delab/setups/qmesydaq.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'testing qmesydaq'
group = 'optional'
excludes = []
sysconfig = dict(
datasinks = ['LiveViewSink'],
)
tango_base = 'tango://localhost:10000/test/qmesydaq/'
devices = dict(
# RAWFileSaver = device('nicos.devices.datasinks.RawImageSink',
# description = 'Saves image data in RAW format',... | 29.636364 | 67 | 0.58589 |
1aef96c96d14a2fdfd1954df714cb43aa77c270e | 19,562 | py | Python | Tests/run_tests.py | espritfollet/biopython | 6000bab160b220ede643f496b1acfcf11ab3a238 | [
"BSD-3-Clause"
] | null | null | null | Tests/run_tests.py | espritfollet/biopython | 6000bab160b220ede643f496b1acfcf11ab3a238 | [
"BSD-3-Clause"
] | null | null | null | Tests/run_tests.py | espritfollet/biopython | 6000bab160b220ede643f496b1acfcf11ab3a238 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# 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.
"""Run a set of PyUnit-based regression tests.
This will find all modules whose name is "test_*.py" in the test
directory, and ru... | 35.374322 | 79 | 0.578213 |
1aef9cd39d6f2c9d3b98af621c7a7027d8c088b0 | 1,416 | py | Python | toontown/effects/Ripples.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/effects/Ripples.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/effects/Ripples.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from toontown.battle.BattleProps import globalPropPool
class Ripples(NodePath):
rippleCount = 0
def __init__(self, parent = hidden):
NodePath.__init__(self)
self.assign(globalPropPool.getProp('ripples'))
sel... | 32.930233 | 258 | 0.627825 |
1aefd36c3f79100b8a8108c094ea2ec5c7a4ed14 | 1,513 | py | Python | alipay/aop/api/domain/AntMerchantExpandMembercardConfigConsultModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AntMerchantExpandMembercardConfigConsultModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AntMerchantExpandMembercardConfigConsultModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MemberCardSetModifyRequest import MemberCardSetModifyRequest
class AntMerchantExpandMembercardConfigConsultModel(object):
def __init__(self):
self._member_card_set_mo... | 33.622222 | 111 | 0.723067 |
1aefee2f6c7549b3d3c2ebe4de5677a78acb4995 | 15,338 | py | Python | google/cloud/documentai_v1beta2/services/document_understanding_service/client.py | oflaeschen/python-documentai | ea83083c315d4a97c29df35955f9547e2f869114 | [
"Apache-2.0"
] | 1 | 2020-06-24T19:28:16.000Z | 2020-06-24T19:28:16.000Z | google/cloud/documentai_v1beta2/services/document_understanding_service/client.py | oflaeschen/python-documentai | ea83083c315d4a97c29df35955f9547e2f869114 | [
"Apache-2.0"
] | null | null | null | google/cloud/documentai_v1beta2/services/document_understanding_service/client.py | oflaeschen/python-documentai | ea83083c315d4a97c29df35955f9547e2f869114 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 40.792553 | 106 | 0.650215 |
1af015983aaf8e7d56108957f4ae4b752bda7e06 | 3,683 | py | Python | examples/address_to_district.py | jamesturk/polipoly | fb0aecfc7b9be1803f7d344a438db8769c4c9471 | [
"BSD-3-Clause"
] | 1 | 2016-05-08T19:27:39.000Z | 2016-05-08T19:27:39.000Z | examples/address_to_district.py | jamesturk/polipoly | fb0aecfc7b9be1803f7d344a438db8769c4c9471 | [
"BSD-3-Clause"
] | null | null | null | examples/address_to_district.py | jamesturk/polipoly | fb0aecfc7b9be1803f7d344a438db8769c4c9471 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
''' Implementation of a webservice for an address to district webservice.
This is the code that http://api.sunlightlabs.com/places.getDistrictFromAddress
uses.
Be sure to set GMAPS_API_KEY and PATH_TO_CDFILES appropriately:
GMAPS_API_KEY: Google Maps key (http://www.google.com/apis/maps/sig... | 33.788991 | 85 | 0.651643 |
1af0274eb8dab9283e61898f06aa8fefa06ab1ff | 17,766 | py | Python | python/eggroll/roll_site/roll_site.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | python/eggroll/roll_site/roll_site.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | python/eggroll/roll_site/roll_site.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 - now, Eggroll 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 ... | 47.886792 | 200 | 0.580266 |
1af0283346349cf79c5449d8302bedac7d45518a | 1,154 | py | Python | wienerschnitzelgemeinschaft/src/Christof/save_rgb_9crop_ur.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/save_rgb_9crop_ur.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/save_rgb_9crop_ur.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os
from PIL import Image
import numpy as np
import pandas as pd
import cv2
from tqdm import tqdm
input_path = 'Christof/assets/train_rgb_512/'
data = pd.read_csv('Christof/assets/train.csv')
target_size = 256
target_path = 'Christof/assets/train_rgb_512_9crop/ur/'
ids = data['Id']
for id in tqdm(ids):
i... | 25.644444 | 69 | 0.717504 |
1af031ce036b680be5a8ec8aa1d1dfab3c08a127 | 1,436 | py | Python | pocean/dsg/timeseries/cr.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | pocean/dsg/timeseries/cr.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | pocean/dsg/timeseries/cr.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | #!python
# coding=utf-8
from pocean.cf import CFDataset
from pocean import logger # noqa
class ContiguousRaggedTimeseries(CFDataset):
@classmethod
def is_mine(cls, dsg):
try:
rvars = dsg.filter_by_attrs(cf_role='timeseries_id')
assert len(rvars) == 1
assert dsg.f... | 30.553191 | 94 | 0.600279 |
1af035221abe3589c31476a9a590573b9c86fbcb | 7,494 | py | Python | mypy/parsetype.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | mypy/parsetype.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | mypy/parsetype.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | 1 | 2020-03-24T05:28:58.000Z | 2020-03-24T05:28:58.000Z | """Type parser"""
from typing import List, Tuple, Union, Optional
from mypy.types import (
Type, UnboundType, TupleType, TypeList, CallableType, StarType,
EllipsisType
)
from mypy.lex import Token, Name, StrLit, lex
from mypy import nodes
none = Token('') # Empty token
class TypeParseError(Exception):
... | 29.976 | 88 | 0.542834 |
1af037d820517b5fd9f3dcc88567c3785876e81c | 2,425 | py | Python | Filters/Python/Testing/Python/TestPythonAlgorithm.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | Filters/Python/Testing/Python/TestPythonAlgorithm.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | Filters/Python/Testing/Python/TestPythonAlgorithm.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | import vtk
from vtk.util import vtkAlgorithm as vta
from vtk.test import Testing
class TestPythonAlgorithm(Testing.vtkTest):
def testSource(self):
class MyAlgorithm(vta.VTKAlgorithm):
def __init__(self):
vta.VTKAlgorithm.__init__(self, nInputPorts=0, outputType='vtkImageData')
... | 37.307692 | 116 | 0.630928 |
1af039db6564bb240ba84038b79d5857404e638e | 324 | py | Python | api/config.py | Jabors/financial-data-damodaran | 0b3e94429faed352a6ee3c7524e7fbde79668703 | [
"Unlicense",
"MIT"
] | 8 | 2018-01-06T08:33:08.000Z | 2021-11-08T12:19:18.000Z | api/config.py | Jabors/financial-data-damodaran | 0b3e94429faed352a6ee3c7524e7fbde79668703 | [
"Unlicense",
"MIT"
] | null | null | null | api/config.py | Jabors/financial-data-damodaran | 0b3e94429faed352a6ee3c7524e7fbde79668703 | [
"Unlicense",
"MIT"
] | 3 | 2020-05-28T19:02:31.000Z | 2022-02-22T20:08:33.000Z | #MongoDB
mongo_client='127.0.0.1'
mongo_port=27017
mongo_dbname='macro'
#Files
country_to_geo_file='data/country_to_geo.json'
country_to_econ_file='data/country_to_econ.json'
#API host and port
api_host='localhost'
api_port=8080
#SSL
use_ssl=False
ssl_certificate=''
private_key=''
certificate_chai... | 17.052632 | 49 | 0.762346 |
1af055fd73654630c7e89bc2acd43c0088e899e4 | 1,048 | py | Python | hs_dictionary/views.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_dictionary/views.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_dictionary/views.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | from django.db.models import Q
from rest_framework.views import APIView
from rest_framework.response import Response
from .models import University
from drf_yasg.utils import swagger_auto_schema
from functools import reduce
class ListUniversities(APIView):
"""
View to list all known universities in the syst... | 28.324324 | 91 | 0.635496 |
1af058ec0758e8aaa16366d8bfd4bc3ed9808b34 | 1,370 | py | Python | exercises/python/encryption-context-complete/src/document_bucket/__init__.py | josecorella/busy-engineers-document-bucket | 91f46ba7e6f49833fa3037ed78e0cdd15e88d2b7 | [
"Apache-2.0"
] | 13 | 2019-11-05T21:24:24.000Z | 2021-11-24T03:01:28.000Z | exercises/python/encryption-context-complete/src/document_bucket/__init__.py | josecorella/busy-engineers-document-bucket | 91f46ba7e6f49833fa3037ed78e0cdd15e88d2b7 | [
"Apache-2.0"
] | 107 | 2019-11-07T23:19:45.000Z | 2022-02-18T05:57:51.000Z | exercises/python/encryption-context-complete/src/document_bucket/__init__.py | josecorella/busy-engineers-document-bucket | 91f46ba7e6f49833fa3037ed78e0cdd15e88d2b7 | [
"Apache-2.0"
] | 16 | 2019-11-04T21:51:59.000Z | 2021-02-04T17:05:40.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import os
import aws_encryption_sdk # type: ignore
import boto3 # type: ignore
import toml
from .api import DocumentBucketOperations
from .config import config
def initialize() -> DocumentBucketOperati... | 36.052632 | 83 | 0.741606 |
1af06d793c8883571b5f8e0b3358c34a98f4eb95 | 3,349 | py | Python | Field.py | Ilphrin/TuxleTriad | 6d1c819374bbb13dd65311cb739e286cec7c04c7 | [
"MIT"
] | 1 | 2015-06-15T15:29:26.000Z | 2015-06-15T15:29:26.000Z | Field.py | Ilphrin/TuxleTriad | 6d1c819374bbb13dd65311cb739e286cec7c04c7 | [
"MIT"
] | null | null | null | Field.py | Ilphrin/TuxleTriad | 6d1c819374bbb13dd65311cb739e286cec7c04c7 | [
"MIT"
] | null | null | null | # coding: utf-8
import pygame
import sys
from pygame.locals import *
from Rules import *
from functions import *
class Field():
"""Create a 3x3 field"""
def __init__(self, width, height, (cardWidth, cardHeight), boss):
self.boss = boss
self.x = width / 7
self.y = height / 7
se... | 32.514563 | 75 | 0.474769 |
1af08ce9c9db3f8d75a7d86bdf39592dbeeacce6 | 2,394 | py | Python | Seeder/qa/models.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 8 | 2017-08-16T19:18:57.000Z | 2022-01-24T10:08:19.000Z | Seeder/qa/models.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 242 | 2017-02-03T19:15:52.000Z | 2022-03-25T08:02:52.000Z | Seeder/qa/models.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 2 | 2019-03-06T12:36:29.000Z | 2019-07-08T12:52:20.000Z | from django.contrib.auth.models import User
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_save
from core.models import BaseModel
from source.models import Source
from source import constants as source_const... | 26.898876 | 66 | 0.662907 |
1af0d4851f651d425845d8e5f84365e2f47d0e17 | 21,689 | py | Python | tasks/R2R/speaker.py | shuheikurita/glgp | dcd2f261887829fa9a4b96ca56049afd21434674 | [
"BSD-2-Clause",
"MIT"
] | 1 | 2021-11-30T03:49:23.000Z | 2021-11-30T03:49:23.000Z | tasks/R2R/speaker.py | shuheikurita/glgp | dcd2f261887829fa9a4b96ca56049afd21434674 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | tasks/R2R/speaker.py | shuheikurita/glgp | dcd2f261887829fa9a4b96ca56049afd21434674 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | import json
import sys
import numpy as np
import random
import tqdm
from collections import namedtuple
import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.nn.functional as F
import torch.distributions as D
from utils import vocab_pad_idx, vocab_bos_idx, vocab_eos_idx, flatten, try_cuda... | 45.374477 | 145 | 0.585781 |
1af0d980751b482854f6c18ef4dd7f2f3a463f9e | 723 | py | Python | webapp/chat/__init__.py | Muugii-bs/hommie | d654e9d172a0491557b0d9a974113a70ca0880b0 | [
"MIT"
] | null | null | null | webapp/chat/__init__.py | Muugii-bs/hommie | d654e9d172a0491557b0d9a974113a70ca0880b0 | [
"MIT"
] | null | null | null | webapp/chat/__init__.py | Muugii-bs/hommie | d654e9d172a0491557b0d9a974113a70ca0880b0 | [
"MIT"
] | null | null | null | from gevent import monkey
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
import flask.ext.login as flask_login
monkey.patch_all()
app = Flask(__name__)
app.debug = True
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/chat.db'
app.secret_key = 'Xji8NKizj7ZZYFRE5vpnKw/3BN/Nw0qwVjqAqHK6VjY=... | 19.026316 | 64 | 0.764869 |
1af0e549645fbcb3079207198c12f1fb2d81dad3 | 28,854 | py | Python | tests/test_heroku.py | jcpeterson/Dallinger | 55bf00efddb19ab8b7201b65c461996793edf6f4 | [
"MIT"
] | 1 | 2020-01-29T04:13:26.000Z | 2020-01-29T04:13:26.000Z | tests/test_heroku.py | jcpeterson/Dallinger | 55bf00efddb19ab8b7201b65c461996793edf6f4 | [
"MIT"
] | null | null | null | tests/test_heroku.py | jcpeterson/Dallinger | 55bf00efddb19ab8b7201b65c461996793edf6f4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import mock
import pytest
import dallinger.db
import datetime
import signal
from dallinger.config import get_config
from dallinger.heroku import app_name
from dallinger.heroku.messages import EmailingHITMessenger
from dallinger.heroku.messages import EmailConfig
@py... | 37.521456 | 100 | 0.637381 |
1af1133036b5bdfb9b79eee4eaaf52019a96e11d | 4,867 | py | Python | hook/repossolr.py | rburgoyne/repos-search | d7fe66d6a0e34fb78f332052a5417c5c3949064d | [
"Apache-2.0"
] | 2 | 2015-06-04T15:38:06.000Z | 2015-11-03T22:25:48.000Z | hook/repossolr.py | rburgoyne/repos-search | d7fe66d6a0e34fb78f332052a5417c5c3949064d | [
"Apache-2.0"
] | null | null | null | hook/repossolr.py | rburgoyne/repos-search | d7fe66d6a0e34fb78f332052a5417c5c3949064d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from urlparse import urlparse
from xml.sax.saxutils import escape
import httplib
class ReposSolr(object):
'''
Utility methods for common solr core operations in Repos Search handlers.
'''
def __init__(self, svnhookOptions):
self.options = svnhookO... | 33.798611 | 113 | 0.651531 |
1af11843ee79d8712e32295e41851e5eeeb3f495 | 7,379 | py | Python | cirq/contrib/paulistring/pauli_string_phasor.py | ajesse11x/Cirq | ef7b260b9fcdf27f79ab6f0f15ffd27fab7ccd20 | [
"Apache-2.0"
] | null | null | null | cirq/contrib/paulistring/pauli_string_phasor.py | ajesse11x/Cirq | ef7b260b9fcdf27f79ab6f0f15ffd27fab7ccd20 | [
"Apache-2.0"
] | null | null | null | cirq/contrib/paulistring/pauli_string_phasor.py | ajesse11x/Cirq | ef7b260b9fcdf27f79ab6f0f15ffd27fab7ccd20 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 40.767956 | 80 | 0.621087 |
1af13e96a33f1e9e49e50cb741586e7a30da3ae5 | 718 | py | Python | badge_earning/users/forms.py | andela-Taiwo/Badge-Earning | 8d9073b552410391b2b54b6c7b4a2e71ae0632eb | [
"MIT"
] | null | null | null | badge_earning/users/forms.py | andela-Taiwo/Badge-Earning | 8d9073b552410391b2b54b6c7b4a2e71ae0632eb | [
"MIT"
] | null | null | null | badge_earning/users/forms.py | andela-Taiwo/Badge-Earning | 8d9073b552410391b2b54b6c7b4a2e71ae0632eb | [
"MIT"
] | null | null | null | from django.contrib.auth import forms, get_user_model
from django.core.exceptions import ValidationError
from django.utils.translation import gettext_lazy as _
User = get_user_model()
class UserChangeForm(forms.UserChangeForm):
class Meta(forms.UserChangeForm.Meta):
model = User
class MyUsernameField(f... | 26.592593 | 54 | 0.683844 |
1af1511a5030ef69cc9a192001075cc1b6adf0b4 | 1,899 | py | Python | test/generate/autotest/B6_B7_CJNE_Ri_i_o.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | null | null | null | test/generate/autotest/B6_B7_CJNE_Ri_i_o.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | 20 | 2020-01-13T04:19:37.000Z | 2020-02-12T14:25:44.000Z | test/generate/autotest/B6_B7_CJNE_Ri_i_o.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | null | null | null | #########################################################
# 2020-01-29 08:48:31
# AI
# ins: CJNE @Ri, #immed, offset
#########################################################
import random
from .. import testutil as u
from ..sim51util import SIMRAM
from ..asmconst import *
p = u.create_test()
ram = SIMRAM()
def ... | 24.037975 | 57 | 0.47762 |
1af1814a919003c39e4953c5a816529891cc2bf1 | 2,338 | py | Python | data/dataset.py | gzn00417/RandomResidualGCN | 0e5c1df07657cfc02451b20fe5293aefbed655c3 | [
"Apache-2.0"
] | null | null | null | data/dataset.py | gzn00417/RandomResidualGCN | 0e5c1df07657cfc02451b20fe5293aefbed655c3 | [
"Apache-2.0"
] | null | null | null | data/dataset.py | gzn00417/RandomResidualGCN | 0e5c1df07657cfc02451b20fe5293aefbed655c3 | [
"Apache-2.0"
] | null | null | null | import os
from collections import defaultdict
import random
import torch
from torch.utils.data import Dataset
class KGDataset(Dataset):
def __init__(self, data_path: str, dataset_name: str in ['train', 'valid', 'test'], entity2id: dict, relation2id: dict, has_negative_data: bool):
super().__ini... | 38.966667 | 150 | 0.544055 |
1af18b346fe3bdd405c2d4945afb6df9b26061b5 | 41,857 | py | Python | graphinvent/GraphGeneratorRL.py | gooaah/GraphINVENT | 12f56c0c7b97619f9aa4cd0a718b80abe77f482b | [
"MIT"
] | 211 | 2020-08-24T23:52:49.000Z | 2022-03-25T02:05:23.000Z | graphinvent/GraphGeneratorRL.py | gooaah/GraphINVENT | 12f56c0c7b97619f9aa4cd0a718b80abe77f482b | [
"MIT"
] | 9 | 2021-03-11T07:18:49.000Z | 2022-03-22T11:52:34.000Z | graphinvent/GraphGeneratorRL.py | gooaah/GraphINVENT | 12f56c0c7b97619f9aa4cd0a718b80abe77f482b | [
"MIT"
] | 44 | 2020-08-25T01:32:23.000Z | 2022-03-23T15:50:37.000Z | """
The `GraphGeneratorRL` class defines how to build molecular graphs during the
reinforcement learning process using the following actions:
* "add" a node to graph
* "connect" existing nodes in graph
* "terminate" graph
"""
# load general packages and functions
import time
from typing import Tuple
import numpy as ... | 47.891304 | 99 | 0.539623 |
1af1a1aed9a9ff0ac9450f21fd1136c310214d43 | 5,698 | py | Python | detection/RetinaFace/rcnn/cython/setup.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 12,377 | 2017-12-04T02:46:57.000Z | 2022-03-31T16:48:31.000Z | detection/RetinaFace/rcnn/cython/setup.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 1,851 | 2017-12-05T05:41:23.000Z | 2022-03-30T13:06:22.000Z | detection/RetinaFace/rcnn/cython/setup.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 4,198 | 2017-12-05T02:57:19.000Z | 2022-03-30T10:29:37.000Z | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import os
from os.path import join as pjoin
from setuptools import setu... | 34.325301 | 85 | 0.616006 |
1af1c41e1e10721f8d3ab517b0914cf973258ac8 | 2,603 | py | Python | cogs/utils/dataIO.py | MagnificPhil/MagnificBot | d9a834ea6047cd16b81fbfe6e9de20effdfaf5b1 | [
"MIT"
] | null | null | null | cogs/utils/dataIO.py | MagnificPhil/MagnificBot | d9a834ea6047cd16b81fbfe6e9de20effdfaf5b1 | [
"MIT"
] | null | null | null | cogs/utils/dataIO.py | MagnificPhil/MagnificBot | d9a834ea6047cd16b81fbfe6e9de20effdfaf5b1 | [
"MIT"
] | null | null | null | import json
import os
import logging
from random import randint
class InvalidFileIO(Exception):
pass
class DataIO():
def __init__(self):
self.logger = logging.getLogger("red")
def save_json(self, filename, data):
"""Sauvegarde atomiquement le fichier json"""
rnd = randint(1000, 99... | 32.5375 | 94 | 0.588167 |
1af1edda02f77b280b2c0408e605e47551a9395c | 309 | py | Python | load.py | pwerken/EDMC_SystemScan | 0e2af4a02532c1d2764024939bb9f80cd8fcebc9 | [
"0BSD"
] | 1 | 2020-12-27T03:08:50.000Z | 2020-12-27T03:08:50.000Z | load.py | pwerken/EDMC_SystemScan | 0e2af4a02532c1d2764024939bb9f80cd8fcebc9 | [
"0BSD"
] | null | null | null | load.py | pwerken/EDMC_SystemScan | 0e2af4a02532c1d2764024939bb9f80cd8fcebc9 | [
"0BSD"
] | null | null | null | from systemscan import SystemScan
s = SystemScan()
def plugin_start3(plugin_dir):
return s.load()
def plugin_stop():
return s.unload()
def plugin_app(parent):
return s.create_ui(parent)
def journal_entry(cmdr, is_beta, system, station, entry, state):
return s.on_journal_entry(entry)
| 15.45 | 64 | 0.724919 |
1af20b168d9ab55d0a158ea6b23695b730bf6070 | 3,359 | py | Python | src/recombinant_client_binding/4_native_normalisation.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | src/recombinant_client_binding/4_native_normalisation.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | src/recombinant_client_binding/4_native_normalisation.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | """ Test out pval correction and alternate normalisation methods"""
import os
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from GEN_Utils import FileHandling
from scipy.stats import ttest_1samp
from loguru import logger
logger.info('Import OK')
if not os.path.exists(o... | 38.170455 | 127 | 0.677583 |
1af212f521c7bd8b62957ebeb7acca6c3648ceef | 674 | py | Python | pymath/xbonacci/fibonacci_even/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | pymath/xbonacci/fibonacci_even/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | pymath/xbonacci/fibonacci_even/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | from pymath.xbonacci.fibonacci import fib
def even_fibonacci(a, b, limit):
"""
Find the all the even numbers in a fibonacci sequence up to the given limit
:param a Starting point of fibonacci sequence
:param b second number of the sequence
:param limit Limit of fibonacci sequence
:return: list... | 33.7 | 94 | 0.688427 |
1af239504cf5c9e7012cb6a440d242f5403668b2 | 3,781 | py | Python | standard_rule/app/AI/dnn8/construct_dnn.py | yudongqiu/GomokuWeb | c7d887733250f4b69efd04edf72a22bbd8257206 | [
"MIT"
] | 5 | 2017-05-23T10:48:14.000Z | 2019-03-24T09:53:45.000Z | standard_rule/app/AI/dnn8/construct_dnn.py | yudongqiu/GomokuWeb | c7d887733250f4b69efd04edf72a22bbd8257206 | [
"MIT"
] | null | null | null | standard_rule/app/AI/dnn8/construct_dnn.py | yudongqiu/GomokuWeb | c7d887733250f4b69efd04edf72a22bbd8257206 | [
"MIT"
] | 4 | 2017-08-04T09:01:17.000Z | 2018-07-18T10:30:04.000Z | import tensorflow as tf
import tflearn
def construct_dnn():
tf.reset_default_graph()
tflearn.init_graph(num_cores=4, gpu_memory_fraction=0.5)
tflearn.config.init_training_mode()
img_aug = tflearn.ImageAugmentation()
img_aug.add_random_90degrees_rotation()
img_aug.add_random_flip_leftright()
... | 45.011905 | 91 | 0.701666 |
1af2424cb1404e602f9358e65f122cbacf3193e8 | 40,291 | py | Python | electrum/address_synchronizer.py | akshaynexus/qtum-electrum | 9fdda51bbc7e541b6f5743f16313d0b8b6123b48 | [
"MIT"
] | null | null | null | electrum/address_synchronizer.py | akshaynexus/qtum-electrum | 9fdda51bbc7e541b6f5743f16313d0b8b6123b48 | [
"MIT"
] | null | null | null | electrum/address_synchronizer.py | akshaynexus/qtum-electrum | 9fdda51bbc7e541b6f5743f16313d0b8b6123b48 | [
"MIT"
] | null | null | null | # Electrum - lightweight Bitcoin client
# Copyright (C) 2018 The Electrum Developers
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the ... | 43.699566 | 119 | 0.602492 |
1af26f0362bce56c9da5a86d2bf045fca9397909 | 2,449 | py | Python | Plug-and-play module/attention/Non-local/demo_MNIST_train.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 1,512 | 2017-12-07T07:54:10.000Z | 2022-03-31T12:20:25.000Z | Plug-and-play module/attention/Non-local/demo_MNIST_train.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 45 | 2018-04-12T12:31:34.000Z | 2021-11-10T07:17:38.000Z | Plug-and-play module/attention/Non-local/demo_MNIST_train.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 314 | 2018-01-07T03:31:08.000Z | 2022-03-11T13:31:49.000Z | import torch
import torch.utils.data as Data
import torchvision
from lib.network import Network
from torch import nn
import time
train_data = torchvision.datasets.MNIST(root='./mnist', train=True,
transform=torchvision.transforms.ToTensor(),
... | 29.865854 | 88 | 0.629645 |
1af271e9fdcb79b082ec13a9de4dd87f75dae75a | 14,470 | py | Python | redhawk/c/c_tree_converter.py | spranesh/Redhawk | e2be5a6553df8449acecee2239b60c7bca0f22bc | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-10-04T11:46:32.000Z | 2017-07-09T15:23:55.000Z | redhawk/c/c_tree_converter.py | spranesh/Redhawk | e2be5a6553df8449acecee2239b60c7bca0f22bc | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2016-03-07T13:16:48.000Z | 2018-03-21T00:25:04.000Z | redhawk/c/c_tree_converter.py | spranesh/Redhawk | e2be5a6553df8449acecee2239b60c7bca0f22bc | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2016-04-06T08:04:34.000Z | 2020-03-17T20:59:47.000Z | #!/usr/bin/env python
""" Convert C-Tree to ast. """
from __future__ import absolute_import
import redhawk.common.node as N
import redhawk.common.node_position as NP
import redhawk.common.traverse as traverse
import redhawk.common.tree_converter as tree_converter
import redhawk.common.type as T
import redhawk.utils.ut... | 33.341014 | 78 | 0.643331 |
1af27e602d7a4f391b486601511ca37edf55a9e6 | 694 | py | Python | wsgi/scripts/utils.py | AlexeyProskuryakov/rr | dcf598405159a48826f4214fa33abcf57418b680 | [
"MIT"
] | null | null | null | wsgi/scripts/utils.py | AlexeyProskuryakov/rr | dcf598405159a48826f4214fa33abcf57418b680 | [
"MIT"
] | null | null | null | wsgi/scripts/utils.py | AlexeyProskuryakov/rr | dcf598405159a48826f4214fa33abcf57418b680 | [
"MIT"
] | null | null | null | from praw.objects import MoreComments
def comments_sequence(comments):
sequence = list(comments)
position = 0
while 1:
to_add = []
for i in xrange(position, len(sequence)):
position = i
comment = sequence[i]
if isinstance(comment, MoreComments):
... | 26.692308 | 49 | 0.504323 |
1af287bf30c938f7044d211bb1ea1e9c8e8807c7 | 1,546 | py | Python | tests/test_execute.py | zebr0/zebr0-script | b07f3d5690936698da458b918eb4052159bc5d36 | [
"MIT"
] | null | null | null | tests/test_execute.py | zebr0/zebr0-script | b07f3d5690936698da458b918eb4052159bc5d36 | [
"MIT"
] | 18 | 2018-08-12T18:12:58.000Z | 2021-01-09T07:27:57.000Z | tests/test_execute.py | zebr0/zebr0-script | b07f3d5690936698da458b918eb4052159bc5d36 | [
"MIT"
] | null | null | null | import threading
import time
import zebr0_script
def test_ok(capsys):
command = "echo one && echo two"
assert zebr0_script.execute(command) == {"command": command, "status": zebr0_script.Status.SUCCESS, "output": ["one", "two"]}
assert capsys.readouterr().out == "..\n"
def test_ko(capsys):
command ... | 37.707317 | 169 | 0.673997 |
1af2f28a90af17535fb249239998a91c4f064b30 | 25,434 | py | Python | luna/gateware/usb/usb2/reset.py | asaioe99/luna_JP | 276c9d86d2c964c7c4be149d721156d869c9489b | [
"BSD-3-Clause"
] | 1 | 2021-02-25T01:43:12.000Z | 2021-02-25T01:43:12.000Z | luna/gateware/usb/usb2/reset.py | kbeckmann/luna | befb33620d1c4267607a45f331b84bc196c7a8bf | [
"BSD-3-Clause"
] | null | null | null | luna/gateware/usb/usb2/reset.py | kbeckmann/luna | befb33620d1c4267607a45f331b84bc196c7a8bf | [
"BSD-3-Clause"
] | null | null | null | #
# This file is part of LUNA.
#
""" Gateware that handles USB bus resets & speed detection. """
import unittest
from nmigen import Signal, Module, Elaboratable, Instance
from . import USBSpeed
from ...interface.utmi import UTMITransmitInterface, UTMIOperatingMode, UTMITerminat... | 43.626072 | 116 | 0.577102 |
1af34636f92c5a24d311bf6a2df2991a56ae69a4 | 697 | py | Python | phr/common/api/serializers.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/common/api/serializers.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/common/api/serializers.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | from rest_framework import serializers
from phr.common.models import ConfiguracionConexionInternet
from phr.utils.functions import ping_ws_ciudadano
class ConnectionStatusSerializer(serializers.ModelSerializer):
ping_response = serializers.SerializerMethodField()
class Meta:
model = ConfiguracionCon... | 30.304348 | 69 | 0.715925 |
1af365a64b0a8592750bb21f90da4404cddc71b7 | 2,677 | py | Python | sdk/fluidrelay/azure-mgmt-fluidrelay/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/fluidrelay/azure-mgmt-fluidrelay/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/fluidrelay/azure-mgmt-fluidrelay/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 35.693333 | 103 | 0.610011 |
1af373d3ac4b73de612817987549019cdae2b2d5 | 725 | py | Python | MEETING_PLANNER/meeting_planner/meetings/models.py | udhayprakash/Django_Projects | 5c5257944d36a552428f8b8a926110d64055fc12 | [
"Apache-2.0"
] | null | null | null | MEETING_PLANNER/meeting_planner/meetings/models.py | udhayprakash/Django_Projects | 5c5257944d36a552428f8b8a926110d64055fc12 | [
"Apache-2.0"
] | 27 | 2020-06-05T23:26:44.000Z | 2022-02-10T11:21:31.000Z | MEETING_PLANNER/meeting_planner/meetings/models.py | udhayprakash/Django_Projects | 5c5257944d36a552428f8b8a926110d64055fc12 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from datetime import time
class Room(models.Model):
name = models.CharField(max_length=50)
floor = models.IntegerField()
room_number = models.IntegerField()
def __str__(self):
return f"{self.name}: room {self.room_number} on floor {self.floor}"
def get_room():
... | 29 | 78 | 0.703448 |
1af380216c25f3826d2cffb2ca00c4adaa9c4d27 | 4,017 | py | Python | main.py | UdonDa/Reference-Based-Sketch-Image-Colorization | 4b5ff190d2fe9b08f41da9abed428891c3e4da9b | [
"MIT"
] | 14 | 2020-08-03T00:03:54.000Z | 2021-08-22T07:25:58.000Z | main.py | UdonDa/Reference-Based-Sketch-Image-Colorization | 4b5ff190d2fe9b08f41da9abed428891c3e4da9b | [
"MIT"
] | 1 | 2020-08-24T13:56:39.000Z | 2021-06-28T03:20:52.000Z | main.py | UdonDa/Reference-Based-Sketch-Image-Colorization | 4b5ff190d2fe9b08f41da9abed428891c3e4da9b | [
"MIT"
] | 2 | 2020-08-21T08:51:08.000Z | 2020-08-25T09:40:06.000Z | import os
import argparse
import warnings
warnings.simplefilter('ignore')
from solver import Solver
from data_loader import get_loader
from torch.backends import cudnn
def str2bool(v):
return v.lower() in ('true')
def main(config):
# For fast training.
cudnn.benchmark = True
# Create directories if ... | 47.821429 | 134 | 0.706497 |
1af39965908b1bbcd961ddd1e1eb2a1fb01f1482 | 9,300 | py | Python | tests/test_share.py | dplorimer/osf | 9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6 | [
"Apache-2.0"
] | null | null | null | tests/test_share.py | dplorimer/osf | 9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6 | [
"Apache-2.0"
] | null | null | null | tests/test_share.py | dplorimer/osf | 9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6 | [
"Apache-2.0"
] | null | null | null | import xml
from mock import patch
from nose.tools import * # flake8: noqa (PEP8 asserts)
from tests.base import OsfTestCase
from website.search import util
from website.search import share_search
STANDARD_RETURN_VALUE = {
'hits': {
'hits': [{
"_score": 1,
"_type": "squaredcircle"... | 34.444444 | 93 | 0.49172 |
1af39b4b729646688e5afabcde21d2eb491bc002 | 3,056 | py | Python | prepro.py | LanJosh/QuestionAnswer | 38066e3268ba1a95640ae87f4066bf7223c1ad4f | [
"MIT"
] | null | null | null | prepro.py | LanJosh/QuestionAnswer | 38066e3268ba1a95640ae87f4066bf7223c1ad4f | [
"MIT"
] | null | null | null | prepro.py | LanJosh/QuestionAnswer | 38066e3268ba1a95640ae87f4066bf7223c1ad4f | [
"MIT"
] | null | null | null | """
Preprocessing script
Forked some functions from github.com/allenai/bi-att-flow
"""
import os
import json
import nltk
import re
from tqdm import tqdm
def word_tokenize(tokens):
return [token.replace("''", '"').replace("``",'"') for token in nltk.word_tokenize(tokens)]
def get_word2vec(words):
"""
dim is th... | 29.104762 | 113 | 0.625982 |
1af39db8a1fab8f52de5fe180e901e7ccc99fc7d | 8,041 | py | Python | b2sdk/sync/scan_policies.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | b2sdk/sync/scan_policies.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | b2sdk/sync/scan_policies.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | ######################################################################
#
# File: b2sdk/sync/scan_policies.py
#
# Copyright 2019 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
import logging
import re
... | 36.885321 | 100 | 0.651536 |
1af39f4147aff74c0f22fb7ddf0ce93da74f013d | 3,860 | py | Python | sdk/resources/azure-mgmt-resource/tests/test_mgmt_resource_links.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/resources/azure-mgmt-resource/tests/test_mgmt_resource_links.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/tests/test_mgmt_resource_links.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding: utf-8
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#---------------------------------------------------------------------... | 39.387755 | 121 | 0.600259 |
1af3a862b332d57913ac3749353a0789a66d4eb9 | 1,788 | py | Python | tests/samples/example.py | frenzymadness/stack_data | b702148c1cb5095e49df5d3d5c122adb59ceef49 | [
"MIT"
] | 22 | 2020-02-10T20:33:44.000Z | 2022-03-03T17:45:48.000Z | tests/samples/example.py | frenzymadness/stack_data | b702148c1cb5095e49df5d3d5c122adb59ceef49 | [
"MIT"
] | 16 | 2019-12-02T21:04:34.000Z | 2022-03-30T11:22:32.000Z | tests/samples/example.py | frenzymadness/stack_data | b702148c1cb5095e49df5d3d5c122adb59ceef49 | [
"MIT"
] | 9 | 2019-12-01T20:38:32.000Z | 2022-02-14T20:19:53.000Z | import inspect
from stack_data import FrameInfo, Options, Line, LINE_GAP, markers_from_ranges
def foo():
x = 1
lst = [1]
lst.insert(0, x)
lst.append(
[
1,
2,
3,
4,
5,
6
][0])
result = print_stack()
return... | 24.162162 | 88 | 0.537472 |
1af3acc9925c830e48d42026e0e4b6f56eb53bd0 | 860 | py | Python | Test23_raspi/001.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | 3 | 2018-07-29T17:31:58.000Z | 2019-06-27T10:36:34.000Z | Test23_raspi/001.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | null | null | null | Test23_raspi/001.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | 1 | 2019-02-18T02:27:39.000Z | 2019-02-18T02:27:39.000Z | import cv2
import os
import sys
#这种抓图方式一定要多样的
OUTPUT_DIR = '../../my_faces'
if not os.path.exists(OUTPUT_DIR):
os.makedirs(OUTPUT_DIR)
face_haar = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
cam = cv2.VideoCapture(0)
count = 0
while True:
print(count)
if count < 10000:
_, img = c... | 26.875 | 76 | 0.606977 |
1af3c03a2e92caec7e0489e716bcb59fdbc48208 | 24,195 | py | Python | sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_host_pools_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_host_pools_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_host_pools_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.977733 | 229 | 0.667741 |
1af3cfea85a7bcb110d5ae556bc71bdc133cd7df | 8,436 | py | Python | task_openpose_reimplement/model_backbone_resnet.py | liruilong940607/image-processing-pytorch | 535ff7160b680af727e95c74f22d402a1741e9de | [
"MIT"
] | null | null | null | task_openpose_reimplement/model_backbone_resnet.py | liruilong940607/image-processing-pytorch | 535ff7160b680af727e95c74f22d402a1741e9de | [
"MIT"
] | null | null | null | task_openpose_reimplement/model_backbone_resnet.py | liruilong940607/image-processing-pytorch | 535ff7160b680af727e95c74f22d402a1741e9de | [
"MIT"
] | null | null | null | '''
Borrow Codes From :
https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py
'''
import torch
import torch.nn as nn
import torch.nn as nn
import math
import torch.utils.model_zoo as model_zoo
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152']
model_... | 32.824903 | 85 | 0.619369 |
1af3e9d379650c960d608718326286ebf944edf5 | 2,026 | py | Python | f5_cccl/resource/ltm/monitor/http_monitor.py | michaeldayreads/f5-cccl | 5aaa584f9fc77742eb9d976954e6dad805e6f4ff | [
"Apache-2.0"
] | null | null | null | f5_cccl/resource/ltm/monitor/http_monitor.py | michaeldayreads/f5-cccl | 5aaa584f9fc77742eb9d976954e6dad805e6f4ff | [
"Apache-2.0"
] | null | null | null | f5_cccl/resource/ltm/monitor/http_monitor.py | michaeldayreads/f5-cccl | 5aaa584f9fc77742eb9d976954e6dad805e6f4ff | [
"Apache-2.0"
] | 1 | 2019-11-02T05:22:48.000Z | 2019-11-02T05:22:48.000Z | """Hosts an interface for the BIG-IP Monitor Resource.
This module references and holds items relevant to the orchestration of the F5
BIG-IP for purposes of abstracting the F5-SDK library.
"""
#
# Copyright 2017 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this... | 31.65625 | 78 | 0.689536 |
1af40620266e2b46f1227bd8ac6485a01053b7f0 | 987 | py | Python | setup.py | pskopnik/htc-cache-simulator | ee502db3f1c2b99ffe05ee609a18069b583798da | [
"MIT"
] | 1 | 2020-12-15T16:09:31.000Z | 2020-12-15T16:09:31.000Z | setup.py | pskopnik/htc-cache-system-simulator | ee502db3f1c2b99ffe05ee609a18069b583798da | [
"MIT"
] | null | null | null | setup.py | pskopnik/htc-cache-system-simulator | ee502db3f1c2b99ffe05ee609a18069b583798da | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open('README.md') as file:
long_description = file.read()
setup(
name = "simulator",
version = "1.0.1",
description = "Simulates a cache system in a high-throughput computing environment",
author = "Paul Skopnik",
author_email = "paul@skopnik.me... | 29.029412 | 88 | 0.582573 |
1af415a39690fea2250c96fb8f112674b580979f | 3,190 | py | Python | setup.py | ds2268/large_image | edab179aabdca31e0852866e66b34adbab410f5b | [
"Apache-2.0"
] | null | null | null | setup.py | ds2268/large_image | edab179aabdca31e0852866e66b34adbab410f5b | [
"Apache-2.0"
] | null | null | null | setup.py | ds2268/large_image | edab179aabdca31e0852866e66b34adbab410f5b | [
"Apache-2.0"
] | null | null | null | import itertools
import os
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
description = 'Python modules to work with large, multiresolution images.'
long_description = readme
extraReqs = {
'memcached': ['pylibmc>=1.5.1 ; platform_system != "Windows"'],
'c... | 34.673913 | 81 | 0.652038 |
1af419897cae9c8bf008f81c033a4e43d4a41517 | 19,237 | py | Python | main/guess_a_number.py | techrabbit58/guess_a_number | f57b421e8c175d11958f710181d8cd74cb947e15 | [
"Unlicense"
] | null | null | null | main/guess_a_number.py | techrabbit58/guess_a_number | f57b421e8c175d11958f710181d8cd74cb947e15 | [
"Unlicense"
] | null | null | null | main/guess_a_number.py | techrabbit58/guess_a_number | f57b421e8c175d11958f710181d8cd74cb947e15 | [
"Unlicense"
] | null | null | null | """
An interactive set of helpers for a more successful operation of the board game "Mastermind" (Hasbro).
Reference:
- https://en.wikipedia.org/wiki/Mastermind_(board_game)
"""
import sys
from cmd import Cmd
from collections import Counter
from itertools import product, permutations
from random import choice
from typ... | 38.017787 | 115 | 0.575713 |
1af421fef352341171e9ec4ed34c1a8beb40b5b4 | 15,399 | py | Python | metalibm_functions/unit_bench.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | 2 | 2019-02-18T13:42:04.000Z | 2021-03-12T18:54:53.000Z | metalibm_functions/unit_bench.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | null | null | null | metalibm_functions/unit_bench.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################################
# This file is part of metalibm (https://github.com/kalray/metalibm)
###############################################################################
# MIT License
#
# Copyright (c) 2018 Kalray
#
# Permission is here... | 34.997727 | 83 | 0.592636 |
1af425b600abe06264bfa3c03444282af7d0ff36 | 1,119 | py | Python | alipay/aop/api/response/AlipayOverseasTransferPaymentPrecreateResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayOverseasTransferPaymentPrecreateResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayOverseasTransferPaymentPrecreateResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayOverseasTransferPaymentPrecreateResponse(AlipayResponse):
def __init__(self):
super(AlipayOverseasTransferPaymentPrecreateResponse, self).__init__()
self._pass_... | 31.083333 | 119 | 0.722073 |
1af43a1b6aaa0ab50c9a7acc7941f626d6cafb42 | 14,442 | py | Python | pip/commands/install.py | di/pip | 491294f61e37d766720aead97b4fb008cfc2e51d | [
"MIT"
] | 1 | 2022-01-24T12:05:27.000Z | 2022-01-24T12:05:27.000Z | pip/commands/install.py | di/pip | 491294f61e37d766720aead97b4fb008cfc2e51d | [
"MIT"
] | null | null | null | pip/commands/install.py | di/pip | 491294f61e37d766720aead97b4fb008cfc2e51d | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import logging
import operator
import os
import tempfile
import shutil
try:
import wheel
except ImportError:
wheel = None
from pip.req import RequirementSet
from pip.basecommand import RequirementCommand
from pip.locations import virtualenv_no_global, distutils_scheme
fr... | 39.567123 | 79 | 0.531713 |
1af4404970dcf76bcf04beba2dd7e5138960ac9d | 6,227 | py | Python | readthedocs/audit/models.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 2,092 | 2019-06-29T07:47:30.000Z | 2022-03-31T14:54:59.000Z | readthedocs/audit/models.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 2,389 | 2019-06-29T04:22:55.000Z | 2022-03-31T22:57:49.000Z | readthedocs/audit/models.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 1,185 | 2019-06-29T21:49:31.000Z | 2022-03-30T09:57:15.000Z | """Audit models."""
from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django_extensions.db.models import TimeStampedModel
from readthedocs.acl.utils import get_auth_backend
from readthedocs.analytics.utils import get_client_ip
from re... | 28.304545 | 91 | 0.596595 |
1af449d10ef05c320d7df9a22986fd9d659f8d59 | 783 | py | Python | m2-modified/ims/common/csv_to_json2.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | m2-modified/ims/common/csv_to_json2.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | m2-modified/ims/common/csv_to_json2.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | import csv, json,sys, io
def csv2json(fileName):
file = open(fileName, "r")
reader = csv.reader(file, delimiter="\n")
list_d = []
i = 0
jsonData = None
counter = 0
for row in reader:
j = 1
counter+=1
dic = {}
row[i] = row[i].replace('"', '')
dic... | 22.371429 | 60 | 0.427842 |
1af4823d7f3a5a1e17146545cb749059662d7cf1 | 839 | py | Python | atom/nucleus/python/test/test_page_card.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_page_card.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_page_card.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import nucleus_api
from nu... | 20.463415 | 79 | 0.686532 |
1af4d6603c36ae2eeb2b17089e1485f372c4d940 | 2,756 | py | Python | rollingpin/hostsources/hippo.py | pi4alina/rollingpin | 85c9b5bcef98df46eee00732bd7550f1bf881339 | [
"BSD-3-Clause"
] | 157 | 2015-01-23T04:28:35.000Z | 2021-11-25T08:34:19.000Z | rollingpin/hostsources/hippo.py | pi4alina/rollingpin | 85c9b5bcef98df46eee00732bd7550f1bf881339 | [
"BSD-3-Clause"
] | 45 | 2015-01-08T20:10:30.000Z | 2021-02-03T19:22:17.000Z | rollingpin/hostsources/hippo.py | pi4alina/rollingpin | 85c9b5bcef98df46eee00732bd7550f1bf881339 | [
"BSD-3-Clause"
] | 37 | 2015-02-25T01:47:17.000Z | 2021-06-23T10:40:19.000Z | import json
import logging
import posixpath
import zookeeper
from twisted.internet.defer import (
gatherResults,
inlineCallbacks,
returnValue,
)
from txzookeeper.client import ZookeeperClient
from ..config import Option
from ..hostsources import Host, HostSource, HostSourceError
from ..utils import parall... | 30.966292 | 78 | 0.613208 |
1af4f9e596508d83b814c139eeaa88e5c886287c | 904 | py | Python | alipay/aop/api/domain/AlipayCommerceEducateStudentIdentityQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayCommerceEducateStudentIdentityQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayCommerceEducateStudentIdentityQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayCommerceEducateStudentIdentityQueryModel(object):
def __init__(self):
self._user_id = None
@property
def user_id(self):
return self._user_id
@user_id.setter
... | 22.04878 | 65 | 0.599558 |
1af5332070cd5e3fc3dadcdc3b50bc45bde96fad | 186 | py | Python | geoapps/simpegPF/EM/__init__.py | RichardScottOZ/geoapps | 5b3c1d4fd11add45992e8b2497312ac014272b69 | [
"MIT"
] | 1 | 2022-02-18T16:24:53.000Z | 2022-02-18T16:24:53.000Z | geoapps/simpegPF/EM/__init__.py | sebhmg/geoapps | 1463ba4ec3c914abdc7403e54eca0ee2bbc3f4f4 | [
"MIT"
] | null | null | null | geoapps/simpegPF/EM/__init__.py | sebhmg/geoapps | 1463ba4ec3c914abdc7403e54eca0ee2bbc3f4f4 | [
"MIT"
] | null | null | null | from scipy.constants import mu_0, epsilon_0
from . import TDEM
from . import FDEM
from . import NSEM
from . import Static
from . import Base
from . import Analytics
from . import Utils
| 18.6 | 43 | 0.768817 |
1af53b9ab898bbb23a919bf1d411ac1a1c2b912b | 2,287 | py | Python | tools/tests/tests_overviews.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-09-02T12:45:31.000Z | 2018-02-10T10:18:11.000Z | tools/tests/tests_overviews.py | Socialsquare/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 17 | 2020-03-24T15:58:05.000Z | 2022-02-10T08:08:57.000Z | tools/tests/tests_overviews.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2018-01-05T08:02:18.000Z | 2018-01-05T08:02:18.000Z | from django.test import TestCase
from django.contrib.auth.models import User, Group
class OverviewTestCase(TestCase):
def setUp(self):
self.test_admin = User.objects.create(username='testadmin')
self.test_admin.set_password('testpass')
self.admins_group = Group.objects.get(name='admins')... | 38.762712 | 68 | 0.646699 |
1af548c1a9e38218b2949b10e37897e39102ba35 | 3,571 | py | Python | plot_roc_cats.py | johannesjung/uncertainty-adversarial-paper | 8435dade6ba7067f61f77cd0e9d14facf69ec5f2 | [
"MIT"
] | 48 | 2018-03-21T14:54:00.000Z | 2021-11-20T12:56:10.000Z | plot_roc_cats.py | johannesjung/uncertainty-adversarial-paper | 8435dade6ba7067f61f77cd0e9d14facf69ec5f2 | [
"MIT"
] | 2 | 2018-05-12T16:37:43.000Z | 2018-05-14T21:33:03.000Z | plot_roc_cats.py | johannesjung/uncertainty-adversarial-paper | 8435dade6ba7067f61f77cd0e9d14facf69ec5f2 | [
"MIT"
] | 15 | 2018-03-22T06:13:04.000Z | 2020-10-25T03:27:42.000Z | import h5py
from matplotlib import pyplot as plt
import numpy as np
import argparse
import src.utilities as U
import os
import json
plt.rcParams['figure.figsize'] = 5, 5
#use true type fonts only
plt.rcParams['pdf.fonttype'] = 42
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argumen... | 33.064815 | 170 | 0.58051 |
1af54e2eee14cf348f05682fed9c84ab56092c05 | 6,825 | py | Python | mtp_bank_admin/apps/bank_admin/tests/test_disbursements.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-bank-admin | b210cfd947ecdc7f50fd77f5023076ad400446b6 | [
"MIT"
] | 3 | 2016-01-05T12:21:44.000Z | 2016-12-22T15:57:49.000Z | mtp_bank_admin/apps/bank_admin/tests/test_disbursements.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-bank-admin | b210cfd947ecdc7f50fd77f5023076ad400446b6 | [
"MIT"
] | 60 | 2015-08-13T12:44:38.000Z | 2022-02-01T17:36:05.000Z | mtp_bank_admin/apps/bank_admin/tests/test_disbursements.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-bank-admin | b210cfd947ecdc7f50fd77f5023076ad400446b6 | [
"MIT"
] | 2 | 2018-12-17T03:17:41.000Z | 2021-04-11T06:23:54.000Z | from datetime import date
import logging
import os
from unittest import mock, skipUnless
from django.test.client import RequestFactory
from django.urls import reverse
from mtp_common.auth.api_client import get_api_session
from mtp_common.auth.models import MojUser
from mtp_common.test_utils import silence_logger
from ... | 35.921053 | 108 | 0.595458 |
1af580b98a45d4bb443c9ff448e93b129c71ed95 | 436 | py | Python | starcraft/selection_plugin.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | starcraft/selection_plugin.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | starcraft/selection_plugin.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | class ActiveSelection():
name = "ActiveSelection"
def handleCommandEvent(self, event, replay):
event.active_selection = event.player.selection[10]
def handleControlGroupEvent(self, event, replay):
event.active_selection = event.player.selection[10]
def han... | 36.333333 | 76 | 0.68578 |
1af59a312ecc1cf1669e59c8dcfef5b2375a0b43 | 2,868 | py | Python | python/examples/bin_info.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | 1 | 2021-04-05T15:01:23.000Z | 2021-04-05T15:01:23.000Z | python/examples/bin_info.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | null | null | null | python/examples/bin_info.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | 1 | 2021-06-10T04:27:19.000Z | 2021-06-10T04:27:19.000Z | #!/usr/bin/env python
# Copyright (c) 2015-2021 Vector 35 Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, mo... | 34.554217 | 94 | 0.711297 |
1af59d8d25510c9335522a4f2d8650e789be7201 | 708 | py | Python | antarest/core/roles.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2021-11-15T09:26:33.000Z | 2022-02-24T09:53:54.000Z | antarest/core/roles.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | antarest/core/roles.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | import enum
__all__ = ["RoleType"]
class RoleType(enum.Enum):
"""
Role type privilege
"""
ADMIN = 40
RUNNER = 30
WRITER = 20
READER = 10
@staticmethod
def from_dict(value: int) -> "RoleType":
mapping = {
40: RoleType.ADMIN,
30: RoleType.RUNNER,
... | 20.228571 | 61 | 0.54661 |
1af5cd8354fc1052f38e215bdac624b991318bd2 | 7,904 | py | Python | nurbspy/nurbs_surface_coons.py | dragonbook/nurbspy | 08640cdb243f4cf72ae66f37e715afa14e70f455 | [
"MIT"
] | 25 | 2020-03-11T19:21:40.000Z | 2022-03-24T02:21:11.000Z | nurbspy/nurbs_surface_coons.py | dragonbook/nurbspy | 08640cdb243f4cf72ae66f37e715afa14e70f455 | [
"MIT"
] | 2 | 2021-08-12T10:56:16.000Z | 2022-03-22T17:26:57.000Z | nurbspy/nurbs_surface_coons.py | dragonbook/nurbspy | 08640cdb243f4cf72ae66f37e715afa14e70f455 | [
"MIT"
] | 8 | 2021-03-27T07:01:20.000Z | 2022-03-29T01:19:01.000Z | # -------------------------------------------------------------------------------------------------------------------- #
# Import packages
# -------------------------------------------------------------------------------------------------------------------- #
import numpy as np
from .nurbs_surface import NurbsSurface
... | 43.668508 | 132 | 0.577935 |
1af5e8f866bc839b0fd361f05dc4c718293c9a10 | 3,412 | py | Python | squid/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | squid/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | squid/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | # Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import json
import re
here = path.abspath(path.dirname(__file__))
def parse_req_line(line):
line = line.strip()
if not line or line.startswith('--hash') or line[0]... | 28.198347 | 92 | 0.630715 |
1af607c7936d10f7c85e7c382b65e5908dc2a6bb | 2,088 | py | Python | src/models/rnnsurv/utils.py | data-modeler/rnn-surv | 83efaa319db7feaa40655033cb9cd423698a716f | [
"MIT"
] | 7 | 2020-01-25T15:22:05.000Z | 2021-12-31T06:11:49.000Z | src/models/rnnsurv/utils.py | texchi2/rnn-surv | 132097bae8da677ffb532d0bfebad6fcb511d2cb | [
"MIT"
] | 6 | 2020-02-05T22:35:39.000Z | 2022-02-10T01:33:58.000Z | src/models/rnnsurv/utils.py | texchi2/rnn-surv | 132097bae8da677ffb532d0bfebad6fcb511d2cb | [
"MIT"
] | 4 | 2019-12-26T20:16:02.000Z | 2020-12-10T15:10:38.000Z | '''
Utils
-----
Utility functions to aid in data processing, training, etc.
'''
import os
import numpy as np
import pandas as pd
def split_at_idx(a: np.ndarray, idx: int):
'''Splits an array into two at the index given.
Example:
x = np.arange(20.0)
while len(x) > 0:
x_new, x ... | 32.123077 | 82 | 0.613027 |
1af60f30b86b3952c0972de1b29089fe73fcfe4b | 10,594 | py | Python | pollination_sdk/models/function_string_input.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | pollination_sdk/models/function_string_input.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | pollination_sdk/models/function_string_input.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
pollination-server
Pollination Server OpenAPI Definition # noqa: E501
The version of the OpenAPI document: 0.16.0
Contact: info@pollination.cloud
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from pollination_sdk.configu... | 32.900621 | 243 | 0.628563 |
1af6122f8726511ee6f975b537ef013f902efbad | 907 | py | Python | setup.py | bellhops/bellhops-data | 69d10bcc0c3dbd02e84140192926fcd650793498 | [
"Apache-2.0"
] | null | null | null | setup.py | bellhops/bellhops-data | 69d10bcc0c3dbd02e84140192926fcd650793498 | [
"Apache-2.0"
] | null | null | null | setup.py | bellhops/bellhops-data | 69d10bcc0c3dbd02e84140192926fcd650793498 | [
"Apache-2.0"
] | 1 | 2018-09-06T17:45:51.000Z | 2018-09-06T17:45:51.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="bellhops_data",
version="0.0.1",
author=["Abraar Ahmed", "Naveen Lekkalapudi"],
author_email=["abraar@getbellhops.com", "naveen.lekkalapudi@getbellhops.com"],
description="Shared python li... | 31.275862 | 82 | 0.624035 |
1af66ba0961ad6d1bf2b0119879fb56f3db031a8 | 2,155 | py | Python | sugaroid/brain/waitwhat.py | vardaan-raj/sugaroid | d0476fb9c44a73fee2e0de45162f2b1ac86452aa | [
"MIT"
] | 4 | 2020-09-28T13:52:40.000Z | 2020-10-30T15:24:50.000Z | sugaroid/brain/waitwhat.py | sreyasaju/sugaroid | d58e06fb664daa16fda1bf23cc73068efcd5634c | [
"MIT"
] | null | null | null | sugaroid/brain/waitwhat.py | sreyasaju/sugaroid | d58e06fb664daa16fda1bf23cc73068efcd5634c | [
"MIT"
] | null | null | null | """
MIT License
Sugaroid Artificial Intelligence
Chatbot Core
Copyright (c) 2020-2021 Srevin Saju
Copyright (c) 2021 The Sugaroid Project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without r... | 37.807018 | 83 | 0.748956 |
1af68821d1077cabb3bdfec131053d580b1abd57 | 4,160 | py | Python | tests/layers/interaction_test.py | whksmo/deep-intent | 2617373cf94fccbe9fc37d50ee010a5c2b8418b0 | [
"MIT"
] | 1 | 2019-07-29T13:33:12.000Z | 2019-07-29T13:33:12.000Z | tests/layers/interaction_test.py | ocelot43/DeepCTR | 8182ea386e6529a1a2294d8e2d33fc040d0cbfb2 | [
"MIT"
] | 7 | 2019-12-16T22:03:26.000Z | 2022-02-10T00:17:03.000Z | tests/layers/interaction_test.py | whksmo/deep-intent | 2617373cf94fccbe9fc37d50ee010a5c2b8418b0 | [
"MIT"
] | null | null | null | import pytest
from tensorflow.python.keras.layers import PReLU
from tensorflow.python.keras.utils import CustomObjectScope
from deepctr import layers
from tests.utils import layer_test
BATCH_SIZE = 5
FIELD_SIZE = 4
EMBEDDING_SIZE = 3
SEQ_LENGTH = 10
@pytest.mark.parametrize(
'layer_num',
[0,1]
)
def tes... | 31.278195 | 105 | 0.674279 |
1af69b9fb95c438544befea09168e8f5d0885e3f | 2,003 | py | Python | setup.py | skillplot/pyboozo | 8013704b0d50bbb5a578fbf3a19d3d478d8b6816 | [
"Apache-2.0"
] | null | null | null | setup.py | skillplot/pyboozo | 8013704b0d50bbb5a578fbf3a19d3d478d8b6816 | [
"Apache-2.0"
] | null | null | null | setup.py | skillplot/pyboozo | 8013704b0d50bbb5a578fbf3a19d3d478d8b6816 | [
"Apache-2.0"
] | null | null | null | ## Copyright (c) 2020 mangalbhaskar.
"""setup script."""
__author__ = 'skillplot'
__version__ = '1.0.9'
_name_ = 'pyboozo'
import setuptools
from os import path
## read the contents of your README file
## https://packaging.python.org/guides/making-a-pypi-friendly-readme/
this_directory = path.abspath(path.dirname(... | 31.793651 | 157 | 0.672991 |
1af6c73c4393c2fe75719524db1ca5b86014c72d | 2,367 | py | Python | TerminalStory/Jack.py | TomlinsonJ03/4006CEM-Mini-Project | ac2ebcfa5793475d7bfb074034b5aa23cfd1858e | [
"CC0-1.0"
] | null | null | null | TerminalStory/Jack.py | TomlinsonJ03/4006CEM-Mini-Project | ac2ebcfa5793475d7bfb074034b5aa23cfd1858e | [
"CC0-1.0"
] | null | null | null | TerminalStory/Jack.py | TomlinsonJ03/4006CEM-Mini-Project | ac2ebcfa5793475d7bfb074034b5aa23cfd1858e | [
"CC0-1.0"
] | null | null | null | # Entering the Basement
def basement():
print("""
I will walk into the basement, there seems to be a robot there, working hard it seems. They don’t see the things the way I do, it exclaimed.
I wander what it means, see what? Maybe I will approach it and find out. It seems to be working on some kind o... | 62.289474 | 167 | 0.709759 |
1af6ee0077b3e56437bbe0eada8d17fb09533008 | 15,923 | py | Python | two1/crypto/ecdsa_openssl.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 415 | 2016-06-10T00:46:55.000Z | 2021-10-16T00:56:06.000Z | two1/crypto/ecdsa_openssl.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2016-06-11T13:48:59.000Z | 2021-01-05T11:19:30.000Z | two1/crypto/ecdsa_openssl.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 109 | 2016-06-11T05:17:05.000Z | 2021-12-22T11:02:22.000Z | import hashlib
import math
import random
from ctypes import c_char_p
from ctypes import c_void_p
from ctypes import create_string_buffer
from two1.crypto.ecdsa_base import EllipticCurveBase
from two1.crypto.ecdsa_base import Point
from two1.crypto import openssl as ossl
class ECPointAffine(object):
""" An affin... | 35.384444 | 94 | 0.551466 |
1af6fe6727af0af81603aba16bbd272e6b03d6fe | 5,216 | py | Python | tests/integration/cloud/providers/msazure.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | 2 | 2015-08-04T21:54:38.000Z | 2019-04-25T21:47:08.000Z | tests/integration/cloud/providers/msazure.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | 1 | 2015-09-02T12:49:48.000Z | 2015-09-02T19:22:58.000Z | tests/integration/cloud/providers/msazure.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Nicole Thomas <nicole@saltstack.com>`
'''
# Import Python Libs
from __future__ import absolute_import
import os
import random
import string
from distutils.version import LooseVersion
# Import Salt Testing Libs
from salttesting import skipIf
from salttesting.helpers... | 32.397516 | 96 | 0.601227 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.