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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0311f5fe2cb0da223265747581f5726eea2c3c7a | 3,706 | py | Python | core/util.py | longfeili1997/DQN | 2e02220f554cccc116163db6223814c0dae87e85 | [
"Apache-2.0"
] | 21 | 2019-09-20T15:33:49.000Z | 2022-02-28T08:49:33.000Z | core/util.py | longfeili1997/DQN | 2e02220f554cccc116163db6223814c0dae87e85 | [
"Apache-2.0"
] | 1 | 2020-09-17T19:37:53.000Z | 2020-09-17T19:37:53.000Z | core/util.py | longfeili1997/DQN | 2e02220f554cccc116163db6223814c0dae87e85 | [
"Apache-2.0"
] | 14 | 2020-01-08T06:40:26.000Z | 2021-09-24T03:09:07.000Z | import os
import pickle
import time
import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 13})
plt.rcParams['figure.figsize'] = 10, 8
def prRed(prt): print("\033[91m {}\033[00m" .format(prt))
def prGreen(prt): print("\033[92m {}\033[00m" .format(prt))
def prYellow(prt): print("\033[93m {}\033[00m" .format... | 28.290076 | 77 | 0.633297 |
031209f01d372b6a6431abfc7185f4679d5edb8a | 21,585 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/aio/operations/_builds_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/aio/operations/_builds_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/aio/operations/_builds_operations.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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.505155 | 213 | 0.665369 |
0312481660a6789fe5ed9878beaf889bbac5bdca | 4,948 | py | Python | python/setup.py | AEW2015/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 16 | 2017-03-14T20:28:40.000Z | 2021-11-02T12:45:15.000Z | python/setup.py | xupsh/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 2 | 2017-12-04T05:46:35.000Z | 2018-11-30T21:40:45.000Z | python/setup.py | xupsh/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 8 | 2017-03-30T22:00:43.000Z | 2020-09-08T12:49:39.000Z | # Copyright (c) 2016, Xilinx, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of ... | 43.403509 | 79 | 0.690178 |
03128c1640612b42b7b678e933bc292742cbb842 | 1,898 | py | Python | alipay/aop/api/response/AlipayOpenMiniServiceBundleQueryResponse.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/AlipayOpenMiniServiceBundleQueryResponse.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/AlipayOpenMiniServiceBundleQueryResponse.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
from alipay.aop.api.domain.MultiBundleAppServiceResult import MultiBundleAppServiceResult
class AlipayOpenMiniServiceBundleQueryResponse(AlipayResponse):
def __init__(self):
super(... | 30.126984 | 113 | 0.649631 |
0312aa80a6ee718a347b6cfa7082dc2a4a1467be | 3,112 | py | Python | ratio.py | Chaowu88/nmrratios | 3c713d45af4078e9873d40b58b4602cca68d3c26 | [
"MIT"
] | null | null | null | ratio.py | Chaowu88/nmrratios | 3c713d45af4078e9873d40b58b4602cca68d3c26 | [
"MIT"
] | null | null | null | ratio.py | Chaowu88/nmrratios | 3c713d45af4078e9873d40b58b4602cca68d3c26 | [
"MIT"
] | null | null | null | #!/usr/bin/env pyhton
# -*- coding: UTF-8 -*-
__author__ = 'Chao Wu'
__date__ = '08/29/2021'
__version__ = '1.0'
from sympy import Symbol, lambdify
from sympy.parsing.sympy_parser import parse_expr
class Ratio:
def __init__(self, name, formula, variables):
'''
Parameters
name: str
ratio name
for... | 24.896 | 115 | 0.677378 |
0312ab16eb1bc8e7daec9bc1547f34c75493a967 | 1,335 | bzl | Python | dependency_support/net_invisible_island_ncurses/net_invisible_island_ncurses.bzl | kammoh/bazel_rules_hdl | 17dfb5cea5ab58460f5ca55244f3afd0724a8a3a | [
"Apache-2.0"
] | 41 | 2020-12-05T21:46:35.000Z | 2022-03-24T22:22:48.000Z | dependency_support/net_invisible_island_ncurses/net_invisible_island_ncurses.bzl | kammoh/bazel_rules_hdl | 17dfb5cea5ab58460f5ca55244f3afd0724a8a3a | [
"Apache-2.0"
] | 63 | 2020-12-05T22:23:36.000Z | 2022-03-28T04:56:10.000Z | dependency_support/net_invisible_island_ncurses/net_invisible_island_ncurses.bzl | kammoh/bazel_rules_hdl | 17dfb5cea5ab58460f5ca55244f3afd0724a8a3a | [
"Apache-2.0"
] | 13 | 2020-12-15T10:11:39.000Z | 2022-03-27T20:17:10.000Z | # 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 or agreed to in writing, ... | 40.454545 | 100 | 0.706367 |
0312b8eb3e34483a26192143179061b77b8c599f | 2,498 | py | Python | Leetcode/hard/regular-expression-matching.py | jen-sjen/data-structures-basics-leetcode | addac32974b16e0a37aa60c210ab7820b349b279 | [
"MIT"
] | 6 | 2021-07-29T03:26:20.000Z | 2022-01-28T15:11:45.000Z | Leetcode/hard/regular-expression-matching.py | jen-sjen/data-structures-basics-leetcode | addac32974b16e0a37aa60c210ab7820b349b279 | [
"MIT"
] | 2 | 2021-09-30T09:47:23.000Z | 2022-01-31T03:08:24.000Z | Leetcode/hard/regular-expression-matching.py | jen-sjen/data-structures-basics-leetcode | addac32974b16e0a37aa60c210ab7820b349b279 | [
"MIT"
] | 5 | 2021-08-10T06:41:11.000Z | 2022-01-29T17:50:20.000Z | """
# REGULAR EXPRESSION MATCHING
Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*' where:
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
Exampl... | 32.025641 | 142 | 0.522418 |
0312c58393307e6a328856196b1cc35e38b5ee90 | 5,051 | py | Python | sdk/core/azure-core/examples/examples_sync.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/core/azure-core/examples/examples_sync.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/core/azure-core/examples/examples_sync.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), ... | 36.601449 | 93 | 0.706989 |
0313276000cfe51eaf4783b3b29f2cac85d243d1 | 1,819 | py | Python | 01-Lesson-Plans/02-Python/2/Activities/05-Ins_Dictionaries/Solved/dicts.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-04-13T07:14:34.000Z | 2021-04-13T07:14:34.000Z | 01-Lesson-Plans/02-Python/2/Activities/05-Ins_Dictionaries/Solved/dicts.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 2 | 2021-06-02T03:14:19.000Z | 2022-02-11T23:21:24.000Z | 01-Lesson-Plans/02-Python/2/Activities/05-Ins_Dictionaries/Solved/dicts.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-05-07T13:26:50.000Z | 2021-05-07T13:26:50.000Z | # -*- coding: utf-8 -*-
"""
Instructor Demo: Dicts.
This script showcases basic operations of Python Dicts.
"""
# Initialize a dictionary containing top traders for each month in 2019
top_traders_2019 = {
"january" : "Karen",
"february" : "Harold",
"march" : "Sam"
}
print()
print(f"Dictionary: {top_trad... | 21.151163 | 86 | 0.634964 |
03135883caeef58fb2de11987c13a4c0e071bc9d | 365 | py | Python | apps/about.py | ForestMars/Coda.to | 55e99a8fb1867738e0bb2292461fa2bf3a7770f7 | [
"DOC",
"MIT"
] | null | null | null | apps/about.py | ForestMars/Coda.to | 55e99a8fb1867738e0bb2292461fa2bf3a7770f7 | [
"DOC",
"MIT"
] | null | null | null | apps/about.py | ForestMars/Coda.to | 55e99a8fb1867738e0bb2292461fa2bf3a7770f7 | [
"DOC",
"MIT"
] | null | null | null | # home.py - app module for Codato home page.
__version__ = '0.1'
__all__ = ['layout', 'callback']
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
layout = html.Div([
html.Br(),
html.H3('Covid Data Tools'),
],
style={'padding':'10vw', 'text-ali... | 20.277778 | 47 | 0.69589 |
03136b89d8943d0b7a263c7afd0f1ff2a5db8550 | 4,152 | py | Python | 02.Algorithms/SVM.py | rmatam/Deep-Learning | 665492254d36d3991e4b58abf6dd62d7fdac8769 | [
"Apache-2.0"
] | null | null | null | 02.Algorithms/SVM.py | rmatam/Deep-Learning | 665492254d36d3991e4b58abf6dd62d7fdac8769 | [
"Apache-2.0"
] | null | null | null | 02.Algorithms/SVM.py | rmatam/Deep-Learning | 665492254d36d3991e4b58abf6dd62d7fdac8769 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 19 13:23:12 2017
@author: rmatam
"""
# -*- coding: utf-8 -*-
# 2015/01/11
# Script passed in py2 & py3 with Ubuntu 14.04 env.
# Prerequirement: pip install numpy scipy scikit-learn
# furthermore info http://scikit-learn.org/stable/modules/generated/sklearn.feature_extra... | 37.745455 | 132 | 0.611272 |
0313a7eec58ef5c17ce2bdfcb24ecca3033514da | 824 | py | Python | test/test3.py | wutong8023/Continual-MM | 0e39b1f4791f0444ed3ee4e8c6fc55bfcc2d001c | [
"MIT"
] | 1 | 2021-06-30T04:27:57.000Z | 2021-06-30T04:27:57.000Z | test/test3.py | wutong8023/Continual-MM | 0e39b1f4791f0444ed3ee4e8c6fc55bfcc2d001c | [
"MIT"
] | null | null | null | test/test3.py | wutong8023/Continual-MM | 0e39b1f4791f0444ed3ee4e8c6fc55bfcc2d001c | [
"MIT"
] | null | null | null | """
Author: Tong
Time: --2021
"""
import json
import numpy as np
with open("data/webred/webred_21.json", "r") as file_in:
original_data = json.load(file_in)
# process data into <x, y>
_pair_data = []
for item in original_data:
_pair_data.append([item['sentence'], item['relation_name']])
pass
len_ = []
for... | 22.888889 | 64 | 0.651699 |
0313f73a9d1f0d55ab0a5afadadeb0d5598d4cf6 | 15 | py | Python | btd6_memory_info/generated/RSG/rsg.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/RSG/rsg.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/RSG/rsg.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class RSG: pass | 15 | 15 | 0.8 |
031405d871926c496a08858b692c1b7d23a6603d | 149 | py | Python | instructors/lessons/practical_utils/examples/1-prob_convert-and-print.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/lessons/practical_utils/examples/1-prob_convert-and-print.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/lessons/practical_utils/examples/1-prob_convert-and-print.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | '''
given the string in the variable blah, program the necessary steps to print out the
day of the week in our given date
'''
blah = '21/03/2012'
| 18.625 | 84 | 0.711409 |
031444e21e340010b5c91a24c1c6a1839b1c20c6 | 5,260 | py | Python | act/discovery/get_armfiles.py | cgodine/ACT | af9f0edb76e6f16e2764d5441a4bf4d7fb3a9f39 | [
"BSD-3-Clause"
] | 1 | 2019-09-13T16:10:37.000Z | 2019-09-13T16:10:37.000Z | act/discovery/get_armfiles.py | cgodine/ACT | af9f0edb76e6f16e2764d5441a4bf4d7fb3a9f39 | [
"BSD-3-Clause"
] | null | null | null | act/discovery/get_armfiles.py | cgodine/ACT | af9f0edb76e6f16e2764d5441a4bf4d7fb3a9f39 | [
"BSD-3-Clause"
] | null | null | null | """ Module for downloading ARM data. """
import argparse
import json
import sys
import os
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
def download_data(username, token, datastream,
startdate, enddate, time=None, output=None):
"""
This tool ... | 40.152672 | 82 | 0.653992 |
0314790c604f5e119dfffb8b328edbb23c56c96d | 1,127 | py | Python | cadnano/controllers/partitemcontroller.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2022-03-27T14:37:32.000Z | 2022-03-27T14:37:32.000Z | cadnano/controllers/partitemcontroller.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | null | null | null | cadnano/controllers/partitemcontroller.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2021-01-22T02:29:38.000Z | 2021-01-22T02:29:38.000Z | class PartItemController():
def __init__(self, part_item, model_part):
self._part_item = part_item
self._model_part = model_part
# end def
connections = [
('partZDimensionsChangedSignal', 'partZDimensionsChangedSlot'), # noqa
('partParentChangedSignal', 'partParen... | 38.862069 | 84 | 0.619343 |
0314b735a8d9046db05d671ca75ce7fc6de18191 | 1,250 | py | Python | tensorflow_compression/python/ops/namespace_helper.py | Sue128/RNN-based-hyper | ee777b8df0b25618a7f99384d6393876ebbaae60 | [
"Apache-2.0"
] | 3 | 2019-12-19T04:00:41.000Z | 2021-01-10T17:41:34.000Z | tensorflow_compression/python/ops/namespace_helper.py | Sue128/RNN-based-hyper | ee777b8df0b25618a7f99384d6393876ebbaae60 | [
"Apache-2.0"
] | null | null | null | tensorflow_compression/python/ops/namespace_helper.py | Sue128/RNN-based-hyper | ee777b8df0b25618a7f99384d6393876ebbaae60 | [
"Apache-2.0"
] | 1 | 2019-11-01T03:07:00.000Z | 2019-11-01T03:07:00.000Z | # -*- coding: utf-8 -*-
# Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 35.714286 | 80 | 0.6824 |
0314c1d3a831ecf1948a568321be705f3999ae07 | 4,243 | py | Python | example/restful/getttsi.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | null | null | null | example/restful/getttsi.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | null | null | null | example/restful/getttsi.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | null | null | null | from huobi import RequestClient
from datetime import datetime
from huobi.model import *
import talib
import numpy as np
import matplotlib.pyplot as plt
from huobi.model.bararray import BarArray
from huobi.model.tradeinfoarray import TradeInfoArray
from huobi.impl.utils.emailsender import MyEmailContent
request_client ... | 36.264957 | 94 | 0.737921 |
0314da7c9241ff211ed4e20dbc095ea48c98a33b | 22,716 | py | Python | openbb_terminal/stocks/stocks_controller.py | JerBouma/OpenBBTerminal | 0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27 | [
"MIT"
] | null | null | null | openbb_terminal/stocks/stocks_controller.py | JerBouma/OpenBBTerminal | 0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27 | [
"MIT"
] | null | null | null | openbb_terminal/stocks/stocks_controller.py | JerBouma/OpenBBTerminal | 0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27 | [
"MIT"
] | null | null | null | """Stock Context Controller"""
__docformat__ = "numpy"
import argparse
import logging
import os
from datetime import datetime, timedelta
from typing import List
import financedatabase
import yfinance as yf
from prompt_toolkit.completion import NestedCompleter
from openbb_terminal import feature_flags as obbff
from o... | 32.82659 | 99 | 0.526853 |
031508f27827cf102b7274fb6a7dd353a070ba85 | 275 | py | Python | predictionserver/serverhabits/performancehabits.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | 1 | 2020-12-04T17:59:19.000Z | 2020-12-04T17:59:19.000Z | predictionserver/serverhabits/performancehabits.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | null | null | null | predictionserver/serverhabits/performancehabits.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | 1 | 2021-03-05T05:03:36.000Z | 2021-03-05T05:03:36.000Z | from predictionserver.futureconventions.performanceconventions import (
PerformanceConventions
)
class PerformanceHabits(PerformanceConventions):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self._PERFORMANCE_BACKWARD_COMPATIBLE = True
| 25 | 71 | 0.767273 |
03156ca0759407fb7c500e6311fcab58d4c85f27 | 60 | py | Python | src/__main__.py | pyansys/create-python-project | e289b5042fd95ca99c6d29e107e2114a5b9a7b15 | [
"MIT"
] | 4 | 2022-02-08T12:37:49.000Z | 2022-03-29T04:45:10.000Z | src/__main__.py | pyansys/create-python-project | e289b5042fd95ca99c6d29e107e2114a5b9a7b15 | [
"MIT"
] | 26 | 2022-02-08T12:48:52.000Z | 2022-03-28T08:58:47.000Z | src/__main__.py | pyansys/create-python-project | e289b5042fd95ca99c6d29e107e2114a5b9a7b15 | [
"MIT"
] | 1 | 2022-03-16T12:57:24.000Z | 2022-03-16T12:57:24.000Z | from .main import cli
if __name__ == '__main__':
cli()
| 12 | 26 | 0.633333 |
03157af6b592c294efbb41cfe90e2b55d071b8d5 | 16,986 | py | Python | pbc/df/test/test_aft.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | pbc/df/test/test_aft.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | pbc/df/test/test_aft.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | import unittest
import numpy
import numpy as np
from pyscf.pbc import gto as pgto
import pyscf.pbc.dft as pdft
from pyscf.pbc.df import fft, aft, mdf
##################################################
#
# port from ao2mo/eris.py
#
##################################################
from pyscf import lib
from pyscf.... | 37.006536 | 107 | 0.590251 |
0315c4bdb682a155fba878332c33fd2df0d5fbb0 | 4,196 | py | Python | electrum/constants.py | traysi/electrum-raven | b2a64a459da32afd2987149460253cfadec03384 | [
"MIT"
] | 5 | 2018-10-31T18:47:54.000Z | 2021-09-20T02:04:42.000Z | electrum/constants.py | project-mynt/electrum-mynt | ca1548e008854f2a3eff900a69365307cc20bd57 | [
"MIT"
] | null | null | null | electrum/constants.py | project-mynt/electrum-mynt | ca1548e008854f2a3eff900a69365307cc20bd57 | [
"MIT"
] | 11 | 2018-10-31T19:46:05.000Z | 2019-09-25T20:18:37.000Z | # -*- coding: utf-8 -*-
#
# 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,
# includi... | 29.342657 | 81 | 0.667541 |
0315ca4eb1a02ae39ed5e2b780fa3dc8150436cf | 2,934 | py | Python | S15lib/instruments/stepper_motor_driver.py | s-fifteen-instruments/pyS15 | 026a0733f48f9cf85ca3a28173c9adcc0631f15b | [
"MIT"
] | null | null | null | S15lib/instruments/stepper_motor_driver.py | s-fifteen-instruments/pyS15 | 026a0733f48f9cf85ca3a28173c9adcc0631f15b | [
"MIT"
] | null | null | null | S15lib/instruments/stepper_motor_driver.py | s-fifteen-instruments/pyS15 | 026a0733f48f9cf85ca3a28173c9adcc0631f15b | [
"MIT"
] | 1 | 2021-07-05T05:52:32.000Z | 2021-07-05T05:52:32.000Z | import time
from . import serial_connection
class StepperMotorDriver(object):
"""
Controls stepper motors.
"""
DEVICE_IDENTIFIER = "SMD"
def __init__(self, device_path: str = ""):
if device_path == "":
device_path = (
serial_connection.search_for_serial_devic... | 32.966292 | 88 | 0.570552 |
031622973ea5b65e6e1cbbff2d764dc2288ca13c | 2,352 | py | Python | holdmypics/api/base.py | mvwicky/holdmypics | 443975dbe1f4258969cc63de83fed20c2bd0342b | [
"MIT"
] | null | null | null | holdmypics/api/base.py | mvwicky/holdmypics | 443975dbe1f4258969cc63de83fed20c2bd0342b | [
"MIT"
] | 8 | 2020-08-09T22:34:35.000Z | 2022-01-16T01:32:53.000Z | holdmypics/api/base.py | mvwicky/holdmypics | 443975dbe1f4258969cc63de83fed20c2bd0342b | [
"MIT"
] | null | null | null | from __future__ import annotations
import os
from collections.abc import Callable
from typing import Any, ClassVar, Generic, TypeVar
import attr
from flask import current_app
from loguru import logger
from PIL import Image
from .. import redisw
from ..constants import COUNT_KEY
from ..utils import get_size, natsize
... | 29.037037 | 71 | 0.670918 |
031633c317f010c14bb1e891836ea1bc86ec0f08 | 2,839 | py | Python | language-modeling/fast_transformers/recurrent/attention/cross_attention/.ipynb_checkpoints/linear_attention-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 5 | 2021-11-06T16:10:31.000Z | 2021-12-25T19:47:42.000Z | language-modeling/fast_transformers/recurrent/attention/cross_attention/.ipynb_checkpoints/linear_attention-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | null | null | null | language-modeling/fast_transformers/recurrent/attention/cross_attention/.ipynb_checkpoints/linear_attention-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 2 | 2021-11-30T03:36:54.000Z | 2021-12-25T19:49:58.000Z | """Implement unmasked linear attention as a recurrent cross attention module to
speed up autoregressive decoding."""
import torch
from torch.nn import Module
from ....attention_registry import RecurrentCrossAttentionRegistry, Optional, Int, \
Callable, EventDispatcherInstance
from ....events import EventDispatche... | 37.853333 | 84 | 0.659035 |
03165fe7a486958ff0af5ed5194c6f6e0ef578fb | 5,916 | py | Python | cinder/volume/drivers/kaminario/kaminario_iscsi.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/kaminario/kaminario_iscsi.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/kaminario/kaminario_iscsi.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 by Kaminario Technologies, Ltd.
# 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
#
#... | 41.370629 | 78 | 0.62762 |
03166fc59d02d1136b3cee6cf94b1dea38c63793 | 3,276 | py | Python | deep_t2i/data_anime_heads.py | cwza/deep_t2i | 22877fdd28ad407984ddc3bc4d57109c54c22fc0 | [
"Apache-2.0"
] | null | null | null | deep_t2i/data_anime_heads.py | cwza/deep_t2i | 22877fdd28ad407984ddc3bc4d57109c54c22fc0 | [
"Apache-2.0"
] | null | null | null | deep_t2i/data_anime_heads.py | cwza/deep_t2i | 22877fdd28ad407984ddc3bc4d57109c54c22fc0 | [
"Apache-2.0"
] | 1 | 2020-11-30T06:11:02.000Z | 2020-11-30T06:11:02.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/02a_data_anime_heads.ipynb (unless otherwise specified).
__all__ = ['Tokenizer', 'Datasets', 'DataLoaders']
# Cell
import pandas as pd
import numpy as np
from PIL import Image
from sklearn.model_selection import train_test_split
import torch
from torch.utils.data import... | 40.444444 | 123 | 0.630952 |
03168aa7627577b05d9767f476f897feeff847fc | 2,705 | py | Python | app/main/views.py | kepha-okari/blog_post | 1ace320990e9c7a2cbc26ccbea3a4fd0b9ae6b38 | [
"MIT"
] | null | null | null | app/main/views.py | kepha-okari/blog_post | 1ace320990e9c7a2cbc26ccbea3a4fd0b9ae6b38 | [
"MIT"
] | null | null | null | app/main/views.py | kepha-okari/blog_post | 1ace320990e9c7a2cbc26ccbea3a4fd0b9ae6b38 | [
"MIT"
] | null | null | null | from flask import render_template,request,redirect,url_for,abort,flash
from . import main
from ..models import User, Blog, Comment
from flask_login import login_required,current_user
from datetime import datetime, timezone
from .. import db
from .forms import BlogForm,CommentForm
# Views index
@main.route('/')
def in... | 28.177083 | 104 | 0.673937 |
0316d58c70b41f0fce79ad5a28ed81e43107ab3f | 4,562 | py | Python | tests/integration/bellman/agents/mbpo/test_mbpo_agent.py | RL-Gym/bellman | 210c9ff877b38705d1cf1b3ccd0f9f2644ad8d0d | [
"Apache-2.0"
] | 40 | 2021-03-24T10:41:56.000Z | 2022-03-15T09:50:47.000Z | tests/integration/bellman/agents/mbpo/test_mbpo_agent.py | RL-Gym/bellman | 210c9ff877b38705d1cf1b3ccd0f9f2644ad8d0d | [
"Apache-2.0"
] | 12 | 2021-03-25T18:36:27.000Z | 2021-07-27T11:09:34.000Z | tests/integration/bellman/agents/mbpo/test_mbpo_agent.py | RL-Gym/bellman | 210c9ff877b38705d1cf1b3ccd0f9f2644ad8d0d | [
"Apache-2.0"
] | 3 | 2021-04-25T03:18:44.000Z | 2021-11-14T15:54:34.000Z | # Copyright 2021 The Bellman Contributors
#
# 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... | 36.496 | 93 | 0.751644 |
03171d21d1552c043bb701596218239525cf883a | 3,936 | py | Python | app/notify_client/__init__.py | cds-snc/notification-admin | d4056798bf889ad29893667bbb67ead2f8e466e4 | [
"MIT"
] | 16 | 2019-11-05T21:35:49.000Z | 2022-01-12T15:00:32.000Z | app/notify_client/__init__.py | cds-snc/notification-admin | d4056798bf889ad29893667bbb67ead2f8e466e4 | [
"MIT"
] | 509 | 2019-07-11T22:03:19.000Z | 2022-03-30T15:19:26.000Z | app/notify_client/__init__.py | cds-snc/notification-admin | d4056798bf889ad29893667bbb67ead2f8e466e4 | [
"MIT"
] | 8 | 2020-02-21T20:19:29.000Z | 2022-03-31T14:17:02.000Z | import logging
import re
from flask import abort, has_request_context, request
from flask_login import current_user
from notifications_python_client import __version__
from notifications_python_client.base import BaseAPIClient
from notifications_python_client.errors import HTTP503Error
logger = logging.getLogger(__na... | 36.110092 | 118 | 0.620173 |
03174471e820f57a119bfa2dcb2400434fc4ef77 | 1,323 | py | Python | notary/utils.py | sxn/notary | 72f00196c276165ac67eb73aae152684da626711 | [
"MIT"
] | 7 | 2017-03-04T20:34:06.000Z | 2019-04-17T19:37:08.000Z | notary/utils.py | sxn/notary | 72f00196c276165ac67eb73aae152684da626711 | [
"MIT"
] | 24 | 2017-03-04T20:06:12.000Z | 2017-12-26T20:50:37.000Z | notary/utils.py | sxn/notary | 72f00196c276165ac67eb73aae152684da626711 | [
"MIT"
] | 1 | 2019-08-01T08:41:10.000Z | 2019-08-01T08:41:10.000Z | import re
from pathlib import Path
from notary.models import LICENSES as SUPPORTED_LICENSES
def guess_license(name):
"""Returns a list of classes that extend the :class:`License` abstract base class.
:param name: If a string is sent, it checks if it's a substring of any of the supported
licenses. If it i... | 28.76087 | 91 | 0.655329 |
03175ecb6bbdb3e1fd465e44c90148b8a094556a | 18,847 | py | Python | pytorch/test/test_jit_py3.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/test/test_jit_py3.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/test/test_jit_py3.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | from collections import namedtuple
from torch.testing._internal.common_utils import run_tests
from torch.testing._internal.jit_utils import JitTestCase
from torch.testing import FileCheck
from torch import jit
from typing import NamedTuple, List, Optional, Dict, Tuple, Any
from jit.test_module_interface import TestModu... | 30.998355 | 121 | 0.5412 |
03176438c0269b76f184cd4c6965879786d2cc1a | 4,848 | py | Python | movshon_lab_to_nwb/expodatainterface.py | catalystneuro/movshon-lab-to-nwb | b359eb14df7ef5a9fecb5a12f81568d3edeb4029 | [
"MIT"
] | null | null | null | movshon_lab_to_nwb/expodatainterface.py | catalystneuro/movshon-lab-to-nwb | b359eb14df7ef5a9fecb5a12f81568d3edeb4029 | [
"MIT"
] | 1 | 2021-02-25T16:45:00.000Z | 2021-03-01T14:43:07.000Z | movshon_lab_to_nwb/expodatainterface.py | catalystneuro/movshon-lab-to-nwb | b359eb14df7ef5a9fecb5a12f81568d3edeb4029 | [
"MIT"
] | null | null | null | from nwb_conversion_tools.basedatainterface import BaseDataInterface
from spikeextractors import SpikeGLXRecordingExtractor
from pynwb import NWBFile
from pathlib import Path
import pyopenephys
from .utils_expo import process_blocksV2, process_passesV2
class ExpoDataInterface(BaseDataInterface):
"""Conversion cl... | 35.647059 | 110 | 0.586634 |
03178068150c170029460b3d66e7e495c6c8c01a | 140 | py | Python | ThirdParty/Twisted/twisted/conch/_version.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 1 | 2021-10-13T01:57:14.000Z | 2021-10-13T01:57:14.000Z | ThirdParty/Twisted/twisted/conch/_version.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | ThirdParty/Twisted/twisted/conch/_version.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 5 | 2015-10-09T04:12:29.000Z | 2021-12-15T16:57:11.000Z | # This is an auto-generated file. Do not edit it.
from twisted.python import versions
version = versions.Version('twisted.conch', 12, 3, 0)
| 35 | 53 | 0.75 |
031795c1a0734bebe98fa67f8ec39b9ae921ee31 | 1,644 | py | Python | autogoal/experimental/sparseml/main.py | Liset97/autogoal | 1232f38af7462b6efb2d2820697c81626abf5c0c | [
"MIT"
] | null | null | null | autogoal/experimental/sparseml/main.py | Liset97/autogoal | 1232f38af7462b6efb2d2820697c81626abf5c0c | [
"MIT"
] | null | null | null | autogoal/experimental/sparseml/main.py | Liset97/autogoal | 1232f38af7462b6efb2d2820697c81626abf5c0c | [
"MIT"
] | null | null | null | from sparseml.keras.optim import ScheduledModifierManager
from tensorflow.keras.utils import to_categorical
from autogoal.contrib.keras import KerasClassifier
from autogoal.grammar import CategoricalValue
def build_sparseml_keras_classifier(path_to_recipe: str):
"""Build custom KerasClassifier algorithm applaying... | 35.73913 | 122 | 0.613139 |
0317987d605ab06ad626480735e53c4e1bd04c76 | 2,875 | py | Python | bp_pas/vocab.py | cambridgeltl/jp-pred-arg | bef8ed686b336e07506139cfddf7eb351d2ba3c0 | [
"MIT"
] | null | null | null | bp_pas/vocab.py | cambridgeltl/jp-pred-arg | bef8ed686b336e07506139cfddf7eb351d2ba3c0 | [
"MIT"
] | 1 | 2020-07-30T12:19:34.000Z | 2020-07-30T12:19:34.000Z | bp_pas/vocab.py | cambridgeltl/jp-pred-arg | bef8ed686b336e07506139cfddf7eb351d2ba3c0 | [
"MIT"
] | null | null | null | from collections import defaultdict
PAD = u'PAD'
UNK = u'UNKNOWN'
MARK = u'MARK'
NMARK = u'NMARK'
NA = u'NA'
GA = u'Ga'
O = u'O'
NI = u'Ni'
PRD = u'V'
GA_INDEX = 0
O_INDEX = 1
NI_INDEX = 2
class Vocab(object):
def __init__(self):
self.i2w = []
self.w2i = {}
def add_word(self, word):
... | 25.442478 | 78 | 0.54087 |
0317a0a5266f0862790b96be3c853230bb882085 | 13,091 | py | Python | src/python/pants/init/engine_initializer.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/init/engine_initializer.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/init/engine_initializer.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
from pants.backend.docgen.targets.doc import Page
from pants.backend.jvm.... | 44.077441 | 100 | 0.744175 |
0317aaf1c163081da46721e69b63d33737f73c20 | 12,532 | py | Python | quantumgrid/potential.py | zstreeter/scatterGrid | 0827b7be5fce0b91e516bdecf1c297069497ae5e | [
"MIT"
] | 4 | 2020-10-27T01:37:34.000Z | 2021-05-08T02:44:59.000Z | quantumgrid/potential.py | zstreeter/scatterGrid | 0827b7be5fce0b91e516bdecf1c297069497ae5e | [
"MIT"
] | 73 | 2021-07-11T22:37:12.000Z | 2022-03-30T22:39:16.000Z | quantumgrid/potential.py | zstreeter/scatterGrid | 0827b7be5fce0b91e516bdecf1c297069497ae5e | [
"MIT"
] | 3 | 2021-03-16T11:02:22.000Z | 2021-05-08T02:45:47.000Z | """
Class for a more OOP interface to several potentials.
"""
# Import NumPy which is used to define pi, sqrt, array, .transpose etc. as
import numpy as np
from scipy.interpolate import CubicSpline
class Potential(object):
def __init__(self, file=None):
"""Constructor method, added vectorized version of... | 35.40113 | 174 | 0.55059 |
0317ad6400bc82c35269547b4035ad29d990e8fb | 15,515 | py | Python | tempest/tests/test_auth.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/tests/test_auth.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/tests/test_auth.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 IBM Corp.
# 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 app... | 37.933985 | 79 | 0.635901 |
0317ad757cae521a2c68ef9a92dc32afa144ce51 | 449 | py | Python | test/dataset/test_speech_synthesis_dataset.py | freewym/lhotse | 66e9bbaf25b75011388ab00189baa162c3c1d435 | [
"Apache-2.0"
] | 1 | 2021-01-05T07:33:35.000Z | 2021-01-05T07:33:35.000Z | test/dataset/test_speech_synthesis_dataset.py | freewym/lhotse | 66e9bbaf25b75011388ab00189baa162c3c1d435 | [
"Apache-2.0"
] | null | null | null | test/dataset/test_speech_synthesis_dataset.py | freewym/lhotse | 66e9bbaf25b75011388ab00189baa162c3c1d435 | [
"Apache-2.0"
] | null | null | null | import pytest
from lhotse.cut import CutSet
from lhotse.dataset.speech_synthesis import SpeechSynthesisDataset
@pytest.fixture
def cut_set():
return CutSet.from_json('test/fixtures/ljspeech/cuts.json')
def test_speech_synthesis_dataset(cut_set):
dataset = SpeechSynthesisDataset(cut_set)
example = datas... | 24.944444 | 66 | 0.74833 |
0317d739e1c0fae6e8031e9524da9a931a3a642a | 941 | py | Python | setup.py | shoyip/PyBingTiles | ee9b69132b6d8eeeee452a21fc511c237abc8fcd | [
"MIT"
] | 1 | 2021-12-08T23:39:27.000Z | 2021-12-08T23:39:27.000Z | setup.py | shoyip/PyBingTiles | ee9b69132b6d8eeeee452a21fc511c237abc8fcd | [
"MIT"
] | null | null | null | setup.py | shoyip/PyBingTiles | ee9b69132b6d8eeeee452a21fc511c237abc8fcd | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="PyBingTiles",
version="0.0.1",
install_requires=[
"pandas",
"geopandas",
"numpy",
"shapely",
"contextily"
],
author="Shoichi Yip",... | 28.515152 | 102 | 0.633369 |
0317e637b99dcb8b29a125bc47dee156a94b886c | 7,059 | py | Python | scripts/check_3d_2d_conversions.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | scripts/check_3d_2d_conversions.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | scripts/check_3d_2d_conversions.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | # Checks methods for getting 3d world locations from depth map and from point cloud.
import copy
import numpy as np
import pptk
import time
import carla
import pylot.utils
from pylot.simulation.carla_utils import get_world
import pylot.simulation.messages
import pylot.simulation.utils
from pylot.simulation.utils imp... | 35.651515 | 84 | 0.724607 |
0317f901ed46ea48091ecd577f74e22ce4702542 | 119 | py | Python | posts/doors/post_config.py | isabella232/lookatthis | fe9ccc896f50ede13f9c469d38d90c8a732f9a71 | [
"FSFAP"
] | 15 | 2015-02-21T13:56:25.000Z | 2019-08-14T21:19:09.000Z | posts/doors/post_config.py | nprapps/lookatthis | fe9ccc896f50ede13f9c469d38d90c8a732f9a71 | [
"FSFAP"
] | 444 | 2015-01-06T16:54:13.000Z | 2021-09-22T11:46:33.000Z | posts/doors/post_config.py | isabella232/lookatthis | fe9ccc896f50ede13f9c469d38d90c8a732f9a71 | [
"FSFAP"
] | 13 | 2015-01-05T14:33:15.000Z | 2021-02-23T10:45:32.000Z | COPY_GOOGLE_DOC_KEY = '0AiIfOsKv5mKldGF3Um1jekxRMUNra01MVldsU193QUE'
DEPLOY_SLUG = 'doors'
NUM_SLIDES_AFTER_CONTENT = 2 | 39.666667 | 68 | 0.87395 |
03180d11347e9cdc9b0e8f93400e69d4435e4db2 | 5,300 | py | Python | pyEpiabm/pyEpiabm/tests/test_unit/test_utility/test_state_transition_matrix.py | SABS-R3-Epidemiology/epiabm | 8eb83fd2de84104f6f77929e3771095f7b033ddc | [
"BSD-3-Clause"
] | 11 | 2021-12-02T15:24:02.000Z | 2022-03-10T14:02:13.000Z | pyEpiabm/pyEpiabm/tests/test_unit/test_utility/test_state_transition_matrix.py | SABS-R3-Epidemiology/epiabm | 8eb83fd2de84104f6f77929e3771095f7b033ddc | [
"BSD-3-Clause"
] | 119 | 2021-11-24T13:56:48.000Z | 2022-03-30T11:52:07.000Z | pyEpiabm/pyEpiabm/tests/test_unit/test_utility/test_state_transition_matrix.py | SABS-R3-Epidemiology/epiabm | 8eb83fd2de84104f6f77929e3771095f7b033ddc | [
"BSD-3-Clause"
] | 3 | 2022-01-13T03:05:19.000Z | 2022-03-11T22:00:17.000Z | from collections import defaultdict
from enum import Enum
import numpy as np
import pandas as pd
from pandas.testing import assert_frame_equal
import unittest
from unittest import mock
from pyEpiabm.property import InfectionStatus
from pyEpiabm.utility import StateTransitionMatrix
from pyEpiabm.tests.test_unit.paramet... | 42.063492 | 82 | 0.62566 |
03181b28e53ffc1ef12523d6c06ed675aca06354 | 11,697 | py | Python | st2common/st2common/constants/triggers.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | st2common/st2common/constants/triggers.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | 2 | 2020-03-04T08:33:36.000Z | 2020-03-04T08:34:14.000Z | st2common/st2common/constants/triggers.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... | 27.139211 | 99 | 0.547576 |
0318203a0981940821ee378372d13dcf0318eede | 13,168 | py | Python | metalibm_functions/ml_log1p.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | 2 | 2019-02-18T13:42:04.000Z | 2021-03-12T18:54:53.000Z | metalibm_functions/ml_log1p.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | null | null | null | metalibm_functions/ml_log1p.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... | 47.710145 | 225 | 0.698132 |
031824c17f9b3528f644e85e78ca4e5d02a22af2 | 893 | py | Python | setup.py | SexualHealthInnovations/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 16 | 2016-06-21T04:05:24.000Z | 2017-09-26T15:40:24.000Z | setup.py | SexualHealthInnovations/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 141 | 2016-06-21T20:46:46.000Z | 2017-09-28T00:20:49.000Z | setup.py | project-callisto/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 7 | 2017-10-04T22:52:18.000Z | 2018-05-31T17:14:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from wizard_builder import __version__ as version
from setuptools import setup, find_packages
try:
import pypandoc
long_description = pypandoc.convert_file('README.md', 'rst') + \
pypandoc.convert_file('HISTORY.md', 'rst')
except BaseException:
long_d... | 26.264706 | 75 | 0.690929 |
03183743882bd54f19657917ecd257a346913490 | 511 | py | Python | fourthPower.py | ahmedkareem999/MITx-6.00.1x | a383fe33c29959b65c56c6a054e4830243862ca8 | [
"MIT"
] | 28 | 2018-10-02T09:15:03.000Z | 2022-02-07T17:26:17.000Z | fourthPower.py | ahmedkareem999/MITx-6.00.1x | a383fe33c29959b65c56c6a054e4830243862ca8 | [
"MIT"
] | null | null | null | fourthPower.py | ahmedkareem999/MITx-6.00.1x | a383fe33c29959b65c56c6a054e4830243862ca8 | [
"MIT"
] | 27 | 2018-05-25T14:04:40.000Z | 2022-03-29T17:17:30.000Z | '''
Week-2:Exercise-Fourth Power
Write a Python function, fourthPower, that takes in one number and returns that value raised to the fourth power.
You should use the square procedure that you defined in an earlier exercise (you don't need to redefine square in this box; when you call square, the grader will use our de... | 31.9375 | 182 | 0.72407 |
0318767cf4745a170240444400f02c9f0a872eda | 259 | py | Python | util/data/gen/winrnr.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/winrnr.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/winrnr.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | symbols = []
exports = [{'type': 'function', 'name': 'InstallNTDSProvider', 'address': '0x7ffb19f04b90'}, {'type': 'function', 'name': 'NSPStartup', 'address': '0x7ffb19f05200'}, {'type': 'function', 'name': 'RemoveNTDSProvider', 'address': '0x7ffb19f06860'}] | 129.5 | 246 | 0.664093 |
031885a04d4264a84160ae07650b207b2bd42f9b | 212 | py | Python | backend/volontulo_org/settings/dev_volontulo_pl.py | ponycalypsenow/volontulo | 8f7886aa3c8ea5ec0ca84711a089bea60fb69598 | [
"MIT"
] | null | null | null | backend/volontulo_org/settings/dev_volontulo_pl.py | ponycalypsenow/volontulo | 8f7886aa3c8ea5ec0ca84711a089bea60fb69598 | [
"MIT"
] | null | null | null | backend/volontulo_org/settings/dev_volontulo_pl.py | ponycalypsenow/volontulo | 8f7886aa3c8ea5ec0ca84711a089bea60fb69598 | [
"MIT"
] | null | null | null | """
Settings specific to environment behind dev.volontulo.pl.
"""
# pylint: skip=file
from .base import *
# Extra settings go here:
ANGULAR_ROOT = 'https://dev.volontulo.pl'
SYSTEM_DOMAIN = 'dev.volontulo.pl'
| 17.666667 | 57 | 0.726415 |
0318abb6d9a18c880edf08ebb79f1a6ece47561c | 271 | py | Python | History/20211230-011142_76_best/example_rollout.py | oldpaws/AI3601_RL_Final_Project_MAGAIL | 6e53d5c4ad21c9e3907e6d14b20c04b3287800cf | [
"MIT"
] | null | null | null | History/20211230-011142_76_best/example_rollout.py | oldpaws/AI3601_RL_Final_Project_MAGAIL | 6e53d5c4ad21c9e3907e6d14b20c04b3287800cf | [
"MIT"
] | null | null | null | History/20211230-011142_76_best/example_rollout.py | oldpaws/AI3601_RL_Final_Project_MAGAIL | 6e53d5c4ad21c9e3907e6d14b20c04b3287800cf | [
"MIT"
] | null | null | null | import numpy as np
from traffic_simulator import TrafficSim
if __name__ == "__main__":
env = TrafficSim(["./ngsim"])
obs = env.reset()
act = np.random.normal(0, 1, size=(2,))
obs, rew, done, info = env.step(act)
print("finished")
env.close()
| 18.066667 | 43 | 0.619926 |
0318b1096a0bc10bcc5d99a778daa68a43309cd4 | 1,530 | py | Python | eth/vm/forks/spurious_dragon/utils.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 5 | 2018-09-28T20:01:42.000Z | 2022-02-22T19:54:46.000Z | eth/vm/forks/spurious_dragon/utils.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | eth/vm/forks/spurious_dragon/utils.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 1 | 2019-01-29T21:09:31.000Z | 2019-01-29T21:09:31.000Z | from eth_utils import to_set
from eth import constants
from eth.utils.address import (
force_bytes_to_address,
)
THREE = force_bytes_to_address(b'\x03')
@to_set
def collect_touched_accounts(computation):
"""
Collect all of the accounts that *may* need to be deleted based on EIP161:
https://github... | 32.553191 | 92 | 0.68366 |
0318c35633f00d3354d4cc68d0848819a8773e35 | 3,373 | py | Python | src/main/python/mqtt_manager.py | SmartDogHouse/SmartDogHouse-SurveillanceSystem | 06bc08e69f3fad7e4a31e3c1ea1daa3f577197d7 | [
"MIT"
] | null | null | null | src/main/python/mqtt_manager.py | SmartDogHouse/SmartDogHouse-SurveillanceSystem | 06bc08e69f3fad7e4a31e3c1ea1daa3f577197d7 | [
"MIT"
] | 1 | 2021-07-27T18:27:42.000Z | 2021-07-27T18:27:42.000Z | src/main/python/mqtt_manager.py | SmartDogHouse/SmartDogHouse-SurveillanceSystem | 06bc08e69f3fad7e4a31e3c1ea1daa3f577197d7 | [
"MIT"
] | null | null | null | from awscrt import io, mqtt, auth, http
from awsiot import mqtt_connection_builder
import json
class MQTTManager:
"""Keeps the connections to MQTT, used for sending and receiving messages."""
mqtt_connection = None
def __init__(self, cert_path: str, key_path: str, root_path: str, port: int, client_id: st... | 42.696203 | 125 | 0.650756 |
0318dbf48bf8dc7bc2a71a06e6d8687004d8e938 | 42,360 | py | Python | main.py | ZhangHanbo/Visual-Manipulation-Relationship-Network-Pytorch | 9dd24947db318f6e404918d4758f1d824eea3748 | [
"MIT"
] | 26 | 2019-10-31T08:21:46.000Z | 2022-03-11T13:58:43.000Z | main.py | ZhangHanbo/Visual-Manipulation-Relationship-Network-Pytorch | 9dd24947db318f6e404918d4758f1d824eea3748 | [
"MIT"
] | 12 | 2019-11-07T09:12:50.000Z | 2022-03-12T02:58:18.000Z | main.py | ZhangHanbo/Visual-Manipulation-Relationship-Network-Pytorch | 9dd24947db318f6e404918d4758f1d824eea3748 | [
"MIT"
] | 11 | 2019-10-30T08:44:47.000Z | 2022-03-11T13:58:48.000Z | # --------------------------------------------------------
# Visual Detection: State-of-the-Art
# Copyright: Hanbo Zhang
# Licensed under The MIT License [see LICENSE for details]
# Written by Hanbo
# based on code from Jiasen Lu, Jianwei Yang, Ross Girshick
# --------------------------------------------------------
f... | 50.609319 | 143 | 0.580076 |
0318e35fec8640082a951d4ca0be2f7db5dbb761 | 1,979 | py | Python | app_ifoundadog/migrations/0003_auto_20180325_1823.py | jeturcotte/ifoundadog | e7b9867ada1890af10cc4bbe6328af97723e87ee | [
"Apache-2.0"
] | null | null | null | app_ifoundadog/migrations/0003_auto_20180325_1823.py | jeturcotte/ifoundadog | e7b9867ada1890af10cc4bbe6328af97723e87ee | [
"Apache-2.0"
] | null | null | null | app_ifoundadog/migrations/0003_auto_20180325_1823.py | jeturcotte/ifoundadog | e7b9867ada1890af10cc4bbe6328af97723e87ee | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.3 on 2018-03-25 18:23
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('app_ifou... | 44.977273 | 160 | 0.615968 |
0318e77eea692feab00595969aafd5f1f5158b15 | 1,694 | py | Python | openzwavemqtt/manager.py | cgarwood/python-openzwave-mq | 8f3d62954e0c5c9eaea67ff9cc229906e3673bee | [
"Apache-2.0"
] | 63 | 2019-11-06T19:30:45.000Z | 2022-02-04T22:19:07.000Z | openzwavemqtt/manager.py | cgarwood/python-openzwave-mq | 8f3d62954e0c5c9eaea67ff9cc229906e3673bee | [
"Apache-2.0"
] | 66 | 2021-01-18T06:52:17.000Z | 2022-03-28T08:04:22.000Z | openzwavemqtt/manager.py | raman325/python-openzwave-mqtt | c5736d832176233e62599908e42a1b28ec9ac589 | [
"Apache-2.0"
] | 12 | 2020-01-03T13:35:06.000Z | 2020-10-10T20:50:20.000Z | """Root Manager object."""
import json
from collections import deque
from typing import TYPE_CHECKING, Dict, Optional, Type, Union
from .base import ItemCollection, ZWaveBase
from .const import EMPTY_PAYLOAD
from .models.instance import OZWInstance
from .options import OZWOptions
if TYPE_CHECKING:
from .base impo... | 30.8 | 85 | 0.669421 |
0319528c70b5c2c1d471be292f02f798346552c0 | 3,789 | py | Python | savu/plugins/filters/paganin_filter.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/filters/paganin_filter.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/filters/paganin_filter.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | 37.147059 | 79 | 0.653207 |
031966a2993d6885c6d5cd857809e6be6a7cdaa1 | 28,432 | py | Python | wobble/model.py | lilyling27/wobble | 56cabbfc5574509bcaff484509177b4f3f6d10cc | [
"MIT"
] | null | null | null | wobble/model.py | lilyling27/wobble | 56cabbfc5574509bcaff484509177b4f3f6d10cc | [
"MIT"
] | null | null | null | wobble/model.py | lilyling27/wobble | 56cabbfc5574509bcaff484509177b4f3f6d10cc | [
"MIT"
] | null | null | null | import numpy as np
from tqdm import tqdm
import sys
import tensorflow.compat.v1 as tf
import h5py
T = tf.float64
tf.disable_v2_behavior()
from .utils import bin_data, doppler, get_session
from .interp import interp
from .history import History
import os
pwd = os.path.dirname(os.path.realpath(__file__))+'/'
class Mod... | 51.694545 | 121 | 0.603264 |
0319689c741d01f5eeea907aa3b284ead338bd19 | 1,869 | py | Python | pylot/planning/messages.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | pylot/planning/messages.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | pylot/planning/messages.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | from erdos.message import Message
class WaypointsMessage(Message):
""" This class represents a message to be used to send waypoints."""
def __init__(self, timestamp, waypoints=None, target_speed=0, wp_angle=0,
wp_vector=0, wp_angle_speed=0, wp_vector_speed=0,
stream_name='de... | 40.630435 | 78 | 0.644195 |
03198696669606a01571bf36f3b2115b5f600ad7 | 521 | py | Python | AIClient_Python/src/event/ThrowMissileEvent.py | CSGames-Archive/AI-2015 | dcb49b93de4d2bdfb5600ae6be47ce513cc65c47 | [
"MIT"
] | 1 | 2015-12-18T01:56:34.000Z | 2015-12-18T01:56:34.000Z | AIClient_Python/src/event/ThrowMissileEvent.py | CSGames-Archive/AI-2015 | dcb49b93de4d2bdfb5600ae6be47ce513cc65c47 | [
"MIT"
] | null | null | null | AIClient_Python/src/event/ThrowMissileEvent.py | CSGames-Archive/AI-2015 | dcb49b93de4d2bdfb5600ae6be47ce513cc65c47 | [
"MIT"
] | 1 | 2019-04-16T00:28:02.000Z | 2019-04-16T00:28:02.000Z | '''
Created on Jan 2, 2015
@author: scarriere
'''
from event.OutgoingEvent import OutgoingEvent
from mathUtils.Direction import Direction
class ThrowMissileEvent(OutgoingEvent):
def __init__(self, characterId, direction):
self.characterId = characterId
self.direction = Direction(direction)
... | 24.809524 | 57 | 0.679463 |
0319919650bb32793fe7a34f63cad9992dfa87d9 | 2,646 | py | Python | src/test/test_info.py | EmonCodingBackEndf/alshapton8 | 28baa090d88e51d1a84598f232c933ff68920d2e | [
"MIT"
] | 7 | 2019-09-02T11:15:16.000Z | 2020-10-30T21:28:04.000Z | src/test/test_info.py | EmonCodingBackEndf/alshapton8 | 28baa090d88e51d1a84598f232c933ff68920d2e | [
"MIT"
] | 195 | 2019-08-18T23:03:17.000Z | 2022-03-31T20:56:31.000Z | src/test/test_info.py | alshapton/SpacePY-X4 | c3279e1b13f6f72bf1f43c55b0d130ba5da35481 | [
"MIT"
] | 4 | 2019-08-18T23:36:10.000Z | 2021-09-12T19:52:05.000Z |
import sys
sys.path.append('../')
import pytest
import spacexpython
from .tutils import *
def test_api():
api_data = ''
api_result = alphaOrder(readJSONFile('info/api.json'))
try:
api_data = alphaOrder(spacexpython.info.api())
except spacexpython.utils.SpaceXReadTimeOut:
pytest.xfail(... | 31.129412 | 66 | 0.649282 |
031998bc3eb0334e679c95a1c2fb61c2a7a56d98 | 3,038 | py | Python | prep-text.py | Richie94/dynamic-nmf | 3777031e6c1b00870849419586c2b5289a3ff46d | [
"Apache-2.0"
] | null | null | null | prep-text.py | Richie94/dynamic-nmf | 3777031e6c1b00870849419586c2b5289a3ff46d | [
"Apache-2.0"
] | null | null | null | prep-text.py | Richie94/dynamic-nmf | 3777031e6c1b00870849419586c2b5289a3ff46d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Tool to pre-process documents contained one or more directories, and export a document-term matrix for each directory.
"""
import os, os.path, sys, codecs
import logging as log
from optparse import OptionParser
import text.util
# --------------------------------------------------------------
... | 47.46875 | 204 | 0.694865 |
0319e67d97c9f022f1d9bbe0a70456637942ec0e | 4,347 | py | Python | gopatch/patchman/settings.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | 1 | 2020-01-15T11:04:16.000Z | 2020-01-15T11:04:16.000Z | gopatch/patchman/settings.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | 2 | 2021-03-31T19:36:19.000Z | 2021-06-10T22:29:26.000Z | gopatch/patchman/settings.py | porala/python | 41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4 | [
"DOC"
] | null | null | null | # Django settings for patchman project.
from __future__ import unicode_literals, absolute_import
import os
import sys
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEBUG = True
ALLOWED_HOSTS = ['127.0.0.1']
ADMINS = []... | 28.598684 | 91 | 0.687141 |
031a28d4be6bd8731ecfbcab0e674ad07f06cc4d | 1,492 | py | Python | locallibrary/catalog/tests/test_forms.py | PFdevelopment/locallibrary | 7e061a72d67d1bc89fa792850c7a699fec48dea9 | [
"MIT"
] | null | null | null | locallibrary/catalog/tests/test_forms.py | PFdevelopment/locallibrary | 7e061a72d67d1bc89fa792850c7a699fec48dea9 | [
"MIT"
] | null | null | null | locallibrary/catalog/tests/test_forms.py | PFdevelopment/locallibrary | 7e061a72d67d1bc89fa792850c7a699fec48dea9 | [
"MIT"
] | null | null | null | from django.test import TestCase
import datetime
from django.utils import timezone
from locallibrary.catalog.forms import RenewBookForm
class RenewBookFormTest(TestCase):
def test_renew_form_date_field_label(self):
form = RenewBookForm()
self.assertTrue(form.fields['renewal_date'].label == None or... | 38.25641 | 122 | 0.6937 |
031a5a31989b83891587dbd076fd5cd88490b47f | 3,127 | py | Python | test/web/wrapper.py | ermiry-com/py-cerver | b2db27a7e41a2dd2511882290a2d0de4b7ee82db | [
"MIT"
] | 5 | 2021-03-25T20:33:55.000Z | 2021-12-21T05:03:23.000Z | test/web/wrapper.py | ermiry-com/py-cerver | b2db27a7e41a2dd2511882290a2d0de4b7ee82db | [
"MIT"
] | 5 | 2021-03-31T05:54:07.000Z | 2021-07-01T01:21:39.000Z | test/web/wrapper.py | ermiry-com/py-cerver | b2db27a7e41a2dd2511882290a2d0de4b7ee82db | [
"MIT"
] | 7 | 2021-03-25T20:33:58.000Z | 2021-12-29T05:28:56.000Z | import os, sys
import json
import ctypes
from cerver import *
from cerver.http import *
web_service = None
# end
def end (signum, frame):
http_cerver_all_stats_print (http_cerver_get (web_service))
cerver_teardown (web_service)
cerver_end ()
sys.exit ("Done!")
# GET /
@ctypes.CFUNCTYPE (None, ctypes.c_void_p, ... | 24.24031 | 72 | 0.760793 |
031a77fe6252ee47e7e47d7db0f301be8318ef92 | 17,121 | py | Python | Source/WebKit/Scripts/webkit/messages_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Source/WebKit/Scripts/webkit/messages_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Source/WebKit/Scripts/webkit/messages_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2010-2018 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and ... | 37.628571 | 118 | 0.583552 |
031a95a9392b083caa37748e7be14674415e1ca5 | 1,691 | py | Python | models/dcase2020_fuss_baseline/train/inference_graph.py | JustKowalski/sound_separation | 001d5d0be0b15f534cad6a5a8d31f45702505ba5 | [
"Apache-2.0"
] | 8 | 2020-06-21T06:45:28.000Z | 2021-07-21T03:24:33.000Z | models/dcase2020_fuss_baseline/train/inference_graph.py | JustKowalski/sound_separation | 001d5d0be0b15f534cad6a5a8d31f45702505ba5 | [
"Apache-2.0"
] | null | null | null | models/dcase2020_fuss_baseline/train/inference_graph.py | JustKowalski/sound_separation | 001d5d0be0b15f534cad6a5a8d31f45702505ba5 | [
"Apache-2.0"
] | null | null | null | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.314815 | 74 | 0.740982 |
031acce83823d6b397ac1defdba5b35c972b2d75 | 50,170 | py | Python | openff/fragmenter/fragment.py | openforcefield/fragmenter | 20a821896a506d19be4430d141589a62d10a388e | [
"MIT"
] | 22 | 2018-05-16T03:34:18.000Z | 2021-05-02T01:34:14.000Z | openff/fragmenter/fragment.py | openforcefield/fragmenter | 20a821896a506d19be4430d141589a62d10a388e | [
"MIT"
] | 79 | 2018-04-09T21:58:52.000Z | 2021-05-19T10:56:33.000Z | openff/fragmenter/fragment.py | openforcefield/fragmenter | 20a821896a506d19be4430d141589a62d10a388e | [
"MIT"
] | 9 | 2018-11-14T21:15:31.000Z | 2021-04-30T00:00:27.000Z | import abc
import logging
from collections import defaultdict
from typing import Any, Dict, List, Optional, Set, Tuple, Union
import networkx
import openff.fragmenter
from openff.fragmenter.chemi import (
assign_elf10_am1_bond_orders,
extract_fragment,
find_ring_systems,
find_stereocenters,
)
from open... | 33.648558 | 113 | 0.602272 |
031aecd46b98c1bcd01601e32f10beb9ce62cc6b | 6,114 | py | Python | next/dashboard/dashboard.py | sumeetsk/NEXT-1 | c42badbcaeb0ab79ab1f74b6303ecc3864b1c7ee | [
"Apache-2.0"
] | null | null | null | next/dashboard/dashboard.py | sumeetsk/NEXT-1 | c42badbcaeb0ab79ab1f74b6303ecc3864b1c7ee | [
"Apache-2.0"
] | null | null | null | next/dashboard/dashboard.py | sumeetsk/NEXT-1 | c42badbcaeb0ab79ab1f74b6303ecc3864b1c7ee | [
"Apache-2.0"
] | null | null | null | """
next dashboard.py
author: Lalit Jain, lalitkumarj@gmail.com
last updated: 9/16/15
Flask controller for dashboards.
"""
import os
import json
import yaml
from flask import Blueprint, render_template, url_for, request, jsonify
from jinja2 import Environment, PackageLoader, ChoiceLoader
import requests
import next.b... | 39.192308 | 133 | 0.614164 |
031b2c89bc167a2a70c8c5867467f74381522a8f | 8,746 | py | Python | mmselfsup/core/crunner/kd_based_runner_readiter.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | mmselfsup/core/crunner/kd_based_runner_readiter.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | mmselfsup/core/crunner/kd_based_runner_readiter.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | 1 | 2022-03-15T11:31:48.000Z | 2022-03-15T11:31:48.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import os
import os.path as osp
import platform
import shutil
import time
import warnings
import torch
import mmcv
from mmcv.runner.base_runner import BaseRunner
from mmcv.runner.epoch_based_runner import EpochBasedRunner
from mmcv.runner.builder import RUNNERS
from mmc... | 41.254717 | 98 | 0.561285 |
031b3c45a1baad633e3d59041906ea8c1bc82c69 | 1,852 | py | Python | dudley/test/python/run_splitworldOnDudley.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | dudley/test/python/run_splitworldOnDudley.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | dudley/test/python/run_splitworldOnDudley.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null |
##############################################################################
#
# Copyright (c) 2015-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unt... | 29.396825 | 78 | 0.665767 |
031b44f406a80aa22b0f27037650b90dac2e6f61 | 36,175 | py | Python | mysql_config/WebMonitoring/generators/resource/tests/resource_expected_time.py | raresraf/rafMetrics | 21eb5e8210364bf70eee746d71c45f3e353dcb10 | [
"MIT"
] | 15 | 2019-11-03T18:01:27.000Z | 2021-05-05T20:54:57.000Z | mysql_config/WebMonitoring/generators/resource/tests/resource_expected_time.py | raresraf/rafMetrics | 21eb5e8210364bf70eee746d71c45f3e353dcb10 | [
"MIT"
] | 392 | 2019-11-09T21:28:01.000Z | 2022-03-31T13:04:45.000Z | mysql_config/WebMonitoring/generators/resource/tests/resource_expected_time.py | raresraf/rafMetrics | 21eb5e8210364bf70eee746d71c45f3e353dcb10 | [
"MIT"
] | 1 | 2021-03-11T18:35:16.000Z | 2021-03-11T18:35:16.000Z | EXPECTED_DAILY_RESOURCE_GENERATE_SAMPLES_QUERIES = """delimiter //
DROP PROCEDURE IF EXISTS get_daily_samples;
CREATE PROCEDURE get_daily_samples (
IN id INT,
OUT entry0 FLOAT,
OUT entry1 FLOAT,
OUT entry2 FLOAT,
OUT entry3 FLOAT,
OUT entry4 FLOAT,
OUT entry5 FLOAT,
OUT entry6 ... | 80.567929 | 191 | 0.693296 |
031b4bc5c547ba31ec45a137ba345219a92b14a4 | 3,699 | py | Python | tests/test_templatetags.py | stephrdev/django-tapeforms | ce256716d2eae12402c47ec4e69d3b3710f0dbf0 | [
"MIT"
] | 1 | 2019-01-28T10:59:55.000Z | 2019-01-28T10:59:55.000Z | tests/test_templatetags.py | stephrdev/django-tapeforms | ce256716d2eae12402c47ec4e69d3b3710f0dbf0 | [
"MIT"
] | 23 | 2018-08-26T09:30:57.000Z | 2022-02-10T10:43:14.000Z | tests/test_templatetags.py | stephrdev/django-tapeforms | ce256716d2eae12402c47ec4e69d3b3710f0dbf0 | [
"MIT"
] | 4 | 2018-08-26T09:00:46.000Z | 2021-03-13T13:24:26.000Z | from unittest import mock
import pytest
from django import forms
from django.template import Context, Template, TemplateSyntaxError
from tapeforms.mixins import TapeformMixin
class DummyForm(TapeformMixin, forms.Form):
my_field1 = forms.CharField()
class TestFormTag:
@mock.patch('tapeforms.templatetags.ta... | 34.570093 | 85 | 0.623682 |
031b8883f89e2c3bee3e15ce0fad1e202b9cea19 | 4,459 | py | Python | lang/lisp/lis.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 8 | 2015-06-07T13:25:48.000Z | 2022-03-22T23:14:50.000Z | lang/lisp/lis.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 30 | 2016-01-29T01:36:41.000Z | 2018-09-19T07:01:22.000Z | lang/lisp/lis.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# *-* encoding: utf-8
# ------------------------------------------------------------
# liuyang,mtime: 2012-11-29 15:01:39
# 这是一个python版本的简易lisp解释其的实现.
# 参考代码:http://www.googies.info/articles/lispy.html
# 利用python的特性,可以很方便的写出这个解释器,代码量相当之小
# 但是麻雀虽小,五脏俱全.
# 这个解释器完整的实现了,从输入,解析,环境,计算的过程.对理解编译过程,与语言... | 30.128378 | 78 | 0.493608 |
031b918dbe44e42db6ffc962c33d89118c007786 | 1,352 | py | Python | build/caster_teleop/catkin_generated/generate_cached_setup.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | build/caster_teleop/catkin_generated/generate_cached_setup.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | build/caster_teleop/catkin_generated/generate_cached_setup.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/melodic/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.... | 43.612903 | 102 | 0.740385 |
031b99fa0ce0273c43a6989e85bc661dcce03d05 | 815 | py | Python | typhoon/contrib/functions/flow_control.py | biellls/typhoon-orchestrator | f8e40c905fda8143562fc286359233f29d30c6bb | [
"Apache-2.0"
] | 1 | 2021-03-26T07:14:25.000Z | 2021-03-26T07:14:25.000Z | typhoon/contrib/functions/flow_control.py | biellls/typhoon-orchestrator | f8e40c905fda8143562fc286359233f29d30c6bb | [
"Apache-2.0"
] | null | null | null | typhoon/contrib/functions/flow_control.py | biellls/typhoon-orchestrator | f8e40c905fda8143562fc286359233f29d30c6bb | [
"Apache-2.0"
] | null | null | null | from time import sleep
from typing import Sequence, Iterator, Callable, TypeVar, Iterable
from typhoon.core import SKIP_BATCH
T = TypeVar('T')
def branch(branches: Sequence[T], delay: int = 0) -> Iterable[T]:
"""
Yields each item in the sequence with an optional delay
:param branches:
:param delay:
... | 26.290323 | 82 | 0.668712 |
031bb78af990468bb64e42ff2a946dba9be0dd7b | 1,050 | py | Python | goatscraper/proxy/ProxyManager.py | thevillagers/goatscraper | 5468877eb6482aa5a5a903a72e6acffe327a8a9b | [
"MIT"
] | 1 | 2021-01-09T11:33:30.000Z | 2021-01-09T11:33:30.000Z | goatscraper/proxy/ProxyManager.py | thevillagers/goatscraper | 5468877eb6482aa5a5a903a72e6acffe327a8a9b | [
"MIT"
] | 2 | 2021-01-10T05:58:50.000Z | 2021-01-14T05:08:50.000Z | goatscraper/proxy/ProxyManager.py | thevillagers/goatscraper | 5468877eb6482aa5a5a903a72e6acffe327a8a9b | [
"MIT"
] | null | null | null | '''
Implements base class for proxy managers. Inherit this to quickly create classes using different proxy APIs
'''
from pytimeparse.timeparse import timeparse
import datetime
from collections import deque
class ProxyManager():
def __init__(
self,
blacklist_cooldown='8hr',
reuse_cool... | 23.333333 | 107 | 0.65619 |
031bdcf8c1779c0ba0f2c0d60f832342fbf5f3fd | 4,111 | py | Python | pxr/usdImaging/lib/usdviewq/scalarTypes.py | unity3d-jp/USD | 0f146383613e1efe872ea7c85aa3536f170fcda2 | [
"BSD-3-Clause"
] | 7 | 2016-12-13T00:53:38.000Z | 2020-04-02T13:25:50.000Z | pxr/usdImaging/lib/usdviewq/scalarTypes.py | unity3d-jp/USD | 0f146383613e1efe872ea7c85aa3536f170fcda2 | [
"BSD-3-Clause"
] | null | null | null | pxr/usdImaging/lib/usdviewq/scalarTypes.py | unity3d-jp/USD | 0f146383613e1efe872ea7c85aa3536f170fcda2 | [
"BSD-3-Clause"
] | 2 | 2016-12-13T00:53:40.000Z | 2020-05-04T07:32:53.000Z | #
# Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. T... | 33.696721 | 79 | 0.647045 |
031bf2f1eb04b209d837b4d6fb36b0c663dcb3e7 | 104 | py | Python | tests/test_collection/test_flatstr.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | 1 | 2020-10-23T17:11:42.000Z | 2020-10-23T17:11:42.000Z | tests/test_collection/test_flatstr.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | 4 | 2019-05-09T12:53:33.000Z | 2020-12-03T13:49:26.000Z | tests/test_collection/test_flatstr.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | null | null | null | import olutils.collection as lib
def test_FlatStr():
assert repr(lib.FlatStr("Hello")) == "Hello"
| 17.333333 | 48 | 0.701923 |
031c1c1542f0b512b6e72c8ead04527c1016f949 | 215 | py | Python | itemslist/admin.py | tinystacks/aws-docker-templates-django | b0d7d3b499c746721258c255a82f091c2a6fff60 | [
"BSD-3-Clause"
] | 1 | 2021-10-01T00:21:58.000Z | 2021-10-01T00:21:58.000Z | itemslist/admin.py | tinystacks/aws-docker-templates-django | b0d7d3b499c746721258c255a82f091c2a6fff60 | [
"BSD-3-Clause"
] | null | null | null | itemslist/admin.py | tinystacks/aws-docker-templates-django | b0d7d3b499c746721258c255a82f091c2a6fff60 | [
"BSD-3-Clause"
] | 2 | 2021-07-27T17:33:27.000Z | 2021-09-18T10:51:04.000Z | from django.contrib import admin
# Register your models here.
from . import models
class ItemListAdmin(admin.ModelAdmin):
list_display = ("title", "content")
admin.site.register(models.ItemList, ItemListAdmin)
| 26.875 | 51 | 0.776744 |
031c20a26ebf9211f4e2f2797776a1b8f2755d70 | 117 | py | Python | docx2txt/__init__.py | UiL-OTS-labs/python-docx2txt-bad | 66ccf720a913c1541be0cdf2b4bcd96d2967f024 | [
"MIT"
] | null | null | null | docx2txt/__init__.py | UiL-OTS-labs/python-docx2txt-bad | 66ccf720a913c1541be0cdf2b4bcd96d2967f024 | [
"MIT"
] | null | null | null | docx2txt/__init__.py | UiL-OTS-labs/python-docx2txt-bad | 66ccf720a913c1541be0cdf2b4bcd96d2967f024 | [
"MIT"
] | null | null | null | from .docx2txt import get_output, process # noqa
from .docx_file import DocxFile # noqa
VERSION = '0.8'
| 23.4 | 49 | 0.675214 |
031c29b3fbdba78f531ada25e78a91792f750b23 | 16,184 | py | Python | autotest/ogr/ogr_index_test.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | 1 | 2015-02-16T16:51:38.000Z | 2015-02-16T16:51:38.000Z | autotest/ogr/ogr_index_test.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | autotest/ogr/ogr_index_test.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test OGR INDEX support.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
###############################################################################
# Copyri... | 29.859779 | 89 | 0.5891 |
031c2bd20747df4de08dfa0e760e15cb27208f9f | 3,794 | py | Python | src/gluonts/model/seq2seq/_transform.py | lovvge/gluon-ts | 284376138f41968bec0a4cb05b274c8ee259493a | [
"Apache-2.0"
] | 2 | 2019-09-05T05:39:03.000Z | 2020-11-08T17:07:04.000Z | src/gluonts/model/seq2seq/_transform.py | lovvge/gluon-ts | 284376138f41968bec0a4cb05b274c8ee259493a | [
"Apache-2.0"
] | null | null | null | src/gluonts/model/seq2seq/_transform.py | lovvge/gluon-ts | 284376138f41968bec0a4cb05b274c8ee259493a | [
"Apache-2.0"
] | null | null | null | # Standard library imports
from typing import Iterator, List
# Third-party imports
import numpy as np
# First-party imports
from gluonts.core.component import validated
from gluonts.transform import DataEntry, FlatMapTransformation, shift_timestamp
class ForkingSequenceSplitter(FlatMapTransformation):
"""Forkin... | 34.490909 | 82 | 0.534001 |
031c53df8c36769d491d5444075987418419fc4e | 6,070 | py | Python | mistygrind/cli.py | rerobots/mistygrind | be0f4dc602bbbb004c99b520f8f69ce5643c8d61 | [
"Apache-2.0"
] | 2 | 2019-03-17T22:23:43.000Z | 2019-10-02T23:33:59.000Z | mistygrind/cli.py | rerobots/mistygrind | be0f4dc602bbbb004c99b520f8f69ce5643c8d61 | [
"Apache-2.0"
] | 1 | 2020-02-08T23:21:56.000Z | 2020-03-02T18:49:57.000Z | mistygrind/cli.py | rerobots/mistygrind | be0f4dc602bbbb004c99b520f8f69ce5643c8d61 | [
"Apache-2.0"
] | null | null | null | #!/bin/env python
"""Command-line interface (CLI)
SCL <scott@rerobots.net>
Copyright (c) 2019 rerobots, Inc.
"""
from __future__ import absolute_import
from __future__ import print_function
import argparse
import glob
import json
import os.path
import subprocess
import sys
import tempfile
import uuid
import zipfile
... | 36.787879 | 133 | 0.569193 |
031c5ff5c88f6c033683513ad73083d7fd385735 | 19,716 | py | Python | rllib/models/tf/tf_action_dist.py | hahaxun/ray | 754d7b1f0d6a147315a96dfc9f410504472b28d5 | [
"Apache-2.0"
] | null | null | null | rllib/models/tf/tf_action_dist.py | hahaxun/ray | 754d7b1f0d6a147315a96dfc9f410504472b28d5 | [
"Apache-2.0"
] | null | null | null | rllib/models/tf/tf_action_dist.py | hahaxun/ray | 754d7b1f0d6a147315a96dfc9f410504472b28d5 | [
"Apache-2.0"
] | null | null | null | from math import log
import numpy as np
import functools
from ray.rllib.models.action_dist import ActionDistribution
from ray.rllib.utils import MIN_LOG_NN_OUTPUT, MAX_LOG_NN_OUTPUT, \
SMALL_NUMBER, try_import_tree
from ray.rllib.utils.annotations import override, DeveloperAPI
from ray.rllib.utils.framework import... | 36.376384 | 79 | 0.651552 |
031cc7bb75acaf061d21abbf497b1639859d150d | 801 | py | Python | tests/mock_plugins/cloudify_agent/consumer.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 1 | 2015-11-03T14:27:11.000Z | 2015-11-03T14:27:11.000Z | tests/mock_plugins/cloudify_agent/consumer.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 2 | 2021-03-20T05:33:19.000Z | 2021-03-26T00:38:21.000Z | tests/mock_plugins/cloudify_agent/consumer.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | null | null | null | ########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... | 34.826087 | 79 | 0.74407 |
031ccce2d8d4295b58146d1688a6b51f5988d2cc | 222 | py | Python | api_app/models/schemas/migrations.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/models/schemas/migrations.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/models/schemas/migrations.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | from typing import List
from pydantic import BaseModel
class Migration(BaseModel):
"""
Migration
"""
issueNumber: str
status: str
class MigrationOutList(BaseModel):
migrations: List[Migration]
| 13.875 | 34 | 0.698198 |
031cd21d9730f2e57ae1888c9e93daf13ec6bc26 | 3,135 | py | Python | example/test_full/tests/test_commands.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | example/test_full/tests/test_commands.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | example/test_full/tests/test_commands.py | olivierdalang/django-computedfields | 13a5c107904e7596eeafe948ffc66c9702d95589 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .base import GenericModelTestBase
from computedfields.models import ComputedFieldsModelType
from computedfields.graph import CycleNodeException
from django.core.management import call_command
from django.utils.six.moves import cStringIO
from django.ut... | 36.453488 | 90 | 0.607656 |
031d00c7a496b3c84affc3babe502398f9526a64 | 443 | py | Python | phr/ubigeo/migrations/0008_auto_20170411_1444.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/ubigeo/migrations/0008_auto_20170411_1444.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/ubigeo/migrations/0008_auto_20170411_1444.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-11 14:44
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ubigeo', '0007_ubigeocontinente_continente_id'),
]
operations = [
migrations.RenameF... | 22.15 | 58 | 0.620767 |
031d056895c67e7d8bca56e7587f659c9ab147c1 | 4,284 | py | Python | dl/test_load.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | 3 | 2018-10-16T09:36:12.000Z | 2019-04-15T03:12:49.000Z | dl/test_load.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | dl/test_load.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | import os
import tensorflow as tf
from nets import nets_factory
import time
from dl.step1_cnn import Step1CNN
from dl.step2_cnn import Step2CNN
from dl.util import get_labels_to_names
import GPUtil as GPU
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "main.settings")
django.setup()
from goods.models im... | 39.302752 | 125 | 0.700514 |
031d0cd78a8bd295f6359dfc88326c536bf66c42 | 486 | py | Python | AnnotateScrambler/AnoScrambler.py | Knox-AAU/KL_NJ_TrainingToolbox | 5daa206d11d225ee07ce5462bc8a271ac0f7acf2 | [
"MIT"
] | 1 | 2021-12-01T15:27:32.000Z | 2021-12-01T15:27:32.000Z | AnnotateScrambler/AnoScrambler.py | Knox-AAU/KL_NJ_TrainingToolbox | 5daa206d11d225ee07ce5462bc8a271ac0f7acf2 | [
"MIT"
] | null | null | null | AnnotateScrambler/AnoScrambler.py | Knox-AAU/KL_NJ_TrainingToolbox | 5daa206d11d225ee07ce5462bc8a271ac0f7acf2 | [
"MIT"
] | 1 | 2021-12-01T15:27:34.000Z | 2021-12-01T15:27:34.000Z | import random
def scramble(input_file="autoAnnotated.jsonl"):
"""
This function scrambles the lines in a text document
(Can be removed since doccano already has a scrambler,
if doccano is run from a common server)
"""
with open(input_file, encoding='utf-8') as file:
lines = file.readli... | 28.588235 | 75 | 0.654321 |
031d4c5b73e56f5b26cec4b576668da31c0bd84b | 541 | py | Python | model/generator.py | aiwizzard/transformer | 26d5173c533ab98fa431fcfd926d4c9833f3ef80 | [
"Apache-2.0"
] | null | null | null | model/generator.py | aiwizzard/transformer | 26d5173c533ab98fa431fcfd926d4c9833f3ef80 | [
"Apache-2.0"
] | null | null | null | model/generator.py | aiwizzard/transformer | 26d5173c533ab98fa431fcfd926d4c9833f3ef80 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class Generator(nn.Module):
r"""Generator class
Args:
model_dim(int): dimension of the model
vocab(int): vocab size
"""
def __init__(self, model_dim, vocab):
super(Generator, self).__init__()
self.dense ... | 25.761905 | 65 | 0.63586 |
031d59adf9eef813aa6e3d25c5cfb04c1557c8a2 | 5,651 | py | Python | blast.py | IsaacLuo/build-plasmid-map-from-abi | 442dcd5c170b1cc1f2a11881d1e08a30cf9cc5b1 | [
"MIT"
] | null | null | null | blast.py | IsaacLuo/build-plasmid-map-from-abi | 442dcd5c170b1cc1f2a11881d1e08a30cf9cc5b1 | [
"MIT"
] | null | null | null | blast.py | IsaacLuo/build-plasmid-map-from-abi | 442dcd5c170b1cc1f2a11881d1e08a30cf9cc5b1 | [
"MIT"
] | null | null | null | import json
import xmltodict
import subprocess
import random
import string
import os
import os.path
import sys
class BlastPlasmid:
def __init__(self, plasmidSeq):
self.plasmidSeq = plasmidSeq
randomFileName = ''.join(random.choice(string.ascii_uppercase+string.digits) for _ in range(10))+".tmp"
... | 35.540881 | 176 | 0.546983 |
031d74c81abf4951d256852f1e13a7d1b216db1f | 2,371 | py | Python | program_synthesis/algolisp/models/seq2code_model.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 123 | 2018-06-09T00:49:39.000Z | 2022-03-09T05:41:20.000Z | program_synthesis/algolisp/models/seq2code_model.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 9 | 2018-06-12T01:01:17.000Z | 2022-03-18T09:06:39.000Z | program_synthesis/algolisp/models/seq2code_model.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 24 | 2018-06-09T00:42:46.000Z | 2021-09-29T08:23:32.000Z | from __future__ import absolute_import
import os
import sys
import collections
import torch
from torch.autograd import Variable
import torch.nn as nn
from torch import optim
import torch.nn.functional as F
from program_synthesis.algolisp.dataset import data
from program_synthesis.algolisp.models import prepare_spec... | 35.924242 | 110 | 0.691691 |
031dd641fabf1bc9e84ec44ec96c9c93098bf3cd | 1,016 | py | Python | setup.py | showmethecoin/upbit-trader | f29f0e6074c4cc2296ca098f7d53cac5dd780881 | [
"Apache-2.0"
] | 8 | 2021-04-30T08:30:21.000Z | 2022-03-08T13:35:36.000Z | setup.py | showmethecoin/upbit-trader | f29f0e6074c4cc2296ca098f7d53cac5dd780881 | [
"Apache-2.0"
] | 4 | 2021-04-30T09:39:35.000Z | 2021-05-08T15:24:08.000Z | setup.py | showmethecoin/upbit-trader | f29f0e6074c4cc2296ca098f7d53cac5dd780881 | [
"Apache-2.0"
] | 4 | 2021-11-24T06:53:40.000Z | 2022-03-21T04:20:31.000Z | # !/usr/bin/python
# -*- coding: utf-8 -*-
import setuptools
install_requires = [
'pyyaml>=5.4.1',
'numpy>=1.20.3',
'matplotlib>=3.4.2',
'apscheduler>=3.7.0',
'pymongo>=3.11.4',
'motor>=2.4.0',
'mplfinance>=0.12.7a17',
'pyqt5>=5.15.4',
'aiopyupbit>=0.1.1',
'cx_freeze>=6.6'
]
wi... | 26.051282 | 65 | 0.630906 |
031e9d6feda371b0d38e0ace4efddd611f9ea6fb | 22,277 | py | Python | autotools/builder/cppheaderbuilder.py | LMiceOrg/Modelingtools | f372336d7c356dcf754db755f62165ba6961727a | [
"MIT"
] | 1 | 2016-01-08T10:54:02.000Z | 2016-01-08T10:54:02.000Z | autotools/builder/cppheaderbuilder.py | LMiceOrg/Modelingtools | f372336d7c356dcf754db755f62165ba6961727a | [
"MIT"
] | null | null | null | autotools/builder/cppheaderbuilder.py | LMiceOrg/Modelingtools | f372336d7c356dcf754db755f62165ba6961727a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" CPPheaderBuilder
CPP头文件建造者
"""
import basebuilder
import autotools
import baseitem
import time
import os
import re
import xml.etree.cElementTree as xmllib
import xml.dom.minidom as minidom
import web.template
render = web.template.render(os.path.split(os.path.realpa... | 35.815113 | 229 | 0.555685 |
031ec4b7564cee01b348344022e9c1129e75eff1 | 4,041 | py | Python | src/shared/config.py | cbn-alpin/gefiproj-api | 35e3f00dd71bcdd9ad751307ac379aa78d1545cf | [
"MIT"
] | 2 | 2020-10-15T15:16:08.000Z | 2020-11-06T10:41:13.000Z | src/shared/config.py | cbn-alpin/gefiproj-api | 35e3f00dd71bcdd9ad751307ac379aa78d1545cf | [
"MIT"
] | 1 | 2020-11-14T19:40:14.000Z | 2020-11-14T19:40:14.000Z | src/shared/config.py | cbn-alpin/gefiproj-api | 35e3f00dd71bcdd9ad751307ac379aa78d1545cf | [
"MIT"
] | null | null | null | import json
from io import StringIO
from os import path, environ
import yaml
environ['TC_ROOT_DIR'] = path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../'))
def create_json_config_file():
data = {
"type": "" + environ.get("GS_TYPE"),
"project_id": "" + environ.get("GS_PROJECT_I... | 30.383459 | 97 | 0.593417 |
031ecf9fddac80de47c12f40bb328badb2270a9e | 4,248 | py | Python | uarm_serial.py | orionrobots/armbot | 3940954b56724d651504166dc057dc2ca950551c | [
"MIT"
] | null | null | null | uarm_serial.py | orionrobots/armbot | 3940954b56724d651504166dc057dc2ca950551c | [
"MIT"
] | null | null | null | uarm_serial.py | orionrobots/armbot | 3940954b56724d651504166dc057dc2ca950551c | [
"MIT"
] | null | null | null | """uArm python controller.
Requires the uArmSerial code to be running on the arduino.
Usage:
>>> import serial
>>> import uarm_serial
>>> conn = serial.serial_for_url(<portspec>)
>>> arm = uarm_serial.uArmSerial(conn)
You are now connected to the arm.
>>> arm.attach_all()
This will enable all serial motors - it is n... | 28.702703 | 82 | 0.603107 |
031ef528a4ede2e25461522d043f8f994ffcb835 | 7,288 | py | Python | rls/algorithms/multi/vdn.py | StepNeverStop/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 371 | 2019-04-26T00:37:33.000Z | 2022-03-31T07:33:12.000Z | rls/algorithms/multi/vdn.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 47 | 2019-07-21T11:51:57.000Z | 2021-08-31T08:45:22.000Z | rls/algorithms/multi/vdn.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 102 | 2019-06-29T13:11:15.000Z | 2022-03-28T13:51:04.000Z | #!/usr/bin/env python3
# encoding: utf-8
import numpy as np
import torch as th
import torch.nn.functional as F
from rls.algorithms.base.marl_off_policy import MultiAgentOffPolicy
from rls.common.data import Data
from rls.common.decorator import iton
from rls.nn.mixers import Mixer_REGISTER
from rls.nn.models import C... | 45.55 | 125 | 0.534303 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.