hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e66f37c5353f8e0677fe17d966a7b79b068df462 | 14,998 | py | Python | tf_agents/networks/encoding_network_test.py | niklasnolte/agents | 065b801adf4d6be7beed64f3b07397bca3c741d2 | [
"Apache-2.0"
] | 16 | 2020-09-23T06:21:49.000Z | 2022-03-28T05:45:04.000Z | tf_agents/networks/encoding_network_test.py | MarioBonse/agents | c727141f67051b86d2564c4bd5fbc080623bfe19 | [
"Apache-2.0"
] | null | null | null | tf_agents/networks/encoding_network_test.py | MarioBonse/agents | c727141f67051b86d2564c4bd5fbc080623bfe19 | [
"Apache-2.0"
] | 6 | 2020-10-09T06:33:23.000Z | 2022-02-03T16:16:36.000Z | # coding=utf-8
# Copyright 2018 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 36.31477 | 79 | 0.672356 |
ac994e0454cdcec0bccd27f133225df46949179b | 2,293 | py | Python | makehuman-master/makehuman/testsuite/blender_initTest.py | Radiian-Arts-Main/Radiian-Arts-BioSource | 51e08da0b3171fe96badc68780fd0f3381d49738 | [
"MIT"
] | 1 | 2022-03-12T03:52:55.000Z | 2022-03-12T03:52:55.000Z | makehuman-master/makehuman/testsuite/blender_initTest.py | Phantori/Radiian-Arts-BioSource | 51e08da0b3171fe96badc68780fd0f3381d49738 | [
"MIT"
] | null | null | null | makehuman-master/makehuman/testsuite/blender_initTest.py | Phantori/Radiian-Arts-BioSource | 51e08da0b3171fe96badc68780fd0f3381d49738 | [
"MIT"
] | 3 | 2020-05-10T16:11:23.000Z | 2021-05-30T02:11:28.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Blender initialize test script
**Project Name:** MakeHuman
**Product Home Page:** http://www.makehumancommunity.org/
**Github Code Home Page:** https://github.com/makehumancommunity/
**Authors:** Jonas Hauquier
**Copyright(c):** MakeHuman T... | 28.6625 | 90 | 0.686873 |
3b895402c24bf76c6d4cd471b1b04db00e2f01fa | 3,673 | py | Python | tests/service/workflow/test_local_workflow_service.py | anrunw/flowserv-core-1 | 7116b7060aa68ab36bf08e6393be166dc5db955f | [
"MIT"
] | null | null | null | tests/service/workflow/test_local_workflow_service.py | anrunw/flowserv-core-1 | 7116b7060aa68ab36bf08e6393be166dc5db955f | [
"MIT"
] | null | null | null | tests/service/workflow/test_local_workflow_service.py | anrunw/flowserv-core-1 | 7116b7060aa68ab36bf08e6393be166dc5db955f | [
"MIT"
] | null | null | null | # This file is part of the Reproducible and Reusable Data Analysis Workflow
# Server (flowServ).
#
# Copyright (C) 2019-2021 NYU.
#
# flowServ is free software; you can redistribute it and/or modify it under the
# terms of the MIT License; see LICENSE file for more details.
"""Unit tests for the local workflow service... | 40.362637 | 79 | 0.598965 |
57d00912979fec21a20bb7538394dba7abc8aca5 | 11,760 | py | Python | pydavid/pydavid.py | Pablo-Arias/STIM | 4f9594c32003bc29268226b7766cc160655f7000 | [
"MIT"
] | 2 | 2018-02-12T14:31:14.000Z | 2020-02-27T22:53:05.000Z | pydavid/pydavid.py | Pablo-Arias/STIM | 4f9594c32003bc29268226b7766cc160655f7000 | [
"MIT"
] | null | null | null | pydavid/pydavid.py | Pablo-Arias/STIM | 4f9594c32003bc29268226b7766cc160655f7000 | [
"MIT"
] | 1 | 2018-09-27T10:11:25.000Z | 2018-09-27T10:11:25.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 5 16:57:12 2018
@author: leehooni
"""
from __future__ import absolute_import
from __future__ import print_function
import threading
from pyosc import OSC
# pyDAVID
#
class pydavid():
address = []
global user_callback
def user_callb... | 39.59596 | 187 | 0.589626 |
cc356e0300f23dd55abdd82bb139e1457732490a | 4,213 | py | Python | Storage/q_pack/q_strategies/simple_strategy_2.py | Alba-Intelligence/Microservices-Based-Algorithmic-Trading-System | 78a2b8d485a799fe5759f024b202355e94aeeb10 | [
"BSD-3-Clause"
] | 207 | 2020-01-09T14:07:47.000Z | 2022-03-24T00:04:37.000Z | Storage/q_pack/q_strategies/simple_strategy_2.py | snorics/Microservices-Based-Algorithmic-Trading-System | 454b6fb679c1b59a2f7e3aac7b2167901c9b4f2d | [
"BSD-3-Clause"
] | 9 | 2020-02-11T14:10:27.000Z | 2021-11-10T11:42:04.000Z | Storage/q_pack/q_strategies/simple_strategy_2.py | snorics/Microservices-Based-Algorithmic-Trading-System | 454b6fb679c1b59a2f7e3aac7b2167901c9b4f2d | [
"BSD-3-Clause"
] | 92 | 2020-01-10T01:23:37.000Z | 2022-03-21T19:23:10.000Z | import backtrader as bt
import backtrader.indicators as btind
import datetime
import psycopg2
import pandas as pd
import os
import mlflow.pyfunc
class St(bt.Strategy):
alias = 'Simple Strategy'
params = dict(
period=10,
limdays=200,
backtest=True,
ml_serving=False,
mode... | 39.745283 | 177 | 0.552575 |
95a5af4a3e6c1414bccfe4cb7269f01d2219e7da | 3,714 | py | Python | tests/test_iterable.py | deeprave/pylib | 53ec7e922c8474c08f62068361b5529ac0a21e6a | [
"Apache-2.0"
] | null | null | null | tests/test_iterable.py | deeprave/pylib | 53ec7e922c8474c08f62068361b5529ac0a21e6a | [
"Apache-2.0"
] | null | null | null | tests/test_iterable.py | deeprave/pylib | 53ec7e922c8474c08f62068361b5529ac0a21e6a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from unittest import TestCase
from pylib.iterable import is_iterable, iterable
class Counter(object):
"""
Sample iterable class
"""
def __init__(self, low=1, high=10):
self.current = self.low = low
self.high = high
def __next__(self):
if self.curre... | 31.74359 | 76 | 0.667205 |
34b9d26fcbdcac80ee8e6db2f9c68ba497124e8f | 293 | py | Python | selenium_demo/selenium_demo/pipelines.py | zhaohandd/Web_Crawler | b4ccbcce95fd1c037d1c8a6ae9b269eeb9928440 | [
"Apache-2.0"
] | 3 | 2018-10-18T14:50:24.000Z | 2021-12-30T08:45:33.000Z | selenium_demo/selenium_demo/pipelines.py | zhaohandd/Web_Crawler | b4ccbcce95fd1c037d1c8a6ae9b269eeb9928440 | [
"Apache-2.0"
] | null | null | null | selenium_demo/selenium_demo/pipelines.py | zhaohandd/Web_Crawler | b4ccbcce95fd1c037d1c8a6ae9b269eeb9928440 | [
"Apache-2.0"
] | 3 | 2019-04-27T15:11:49.000Z | 2021-09-06T04:47:05.000Z | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
class SeleniumDemoPipeline(object):
def process_item(self, item, spider):
return item
| 24.416667 | 65 | 0.716724 |
b48c82f0ebff24f95108b3e605b6957030ba99aa | 4,788 | py | Python | Project_Code/venv/lib/python3.7/site-packages/dash_html_components/Nextid.py | iataylor15/Non-hashed-Password-Cracker | c0c407bcbad403e0232ce20a109076e7a452695d | [
"MIT"
] | 2 | 2020-04-11T19:28:30.000Z | 2020-05-04T03:16:20.000Z | venv/lib/python3.7/site-packages/dash_html_components/Nextid.py | thaiscaldeira/ccinsight | 94efc5d68234950687d13151b8878bbdeef53eb3 | [
"BSD-3-Clause"
] | null | null | null | venv/lib/python3.7/site-packages/dash_html_components/Nextid.py | thaiscaldeira/ccinsight | 94efc5d68234950687d13151b8878bbdeef53eb3 | [
"BSD-3-Clause"
] | 1 | 2022-03-22T18:23:06.000Z | 2022-03-22T18:23:06.000Z | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class Nextid(Component):
"""A Nextid component.
Nextid is a wrapper for the <nextid> HTML5 element.
For detailed attribute info see:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nextid
Keywo... | 74.8125 | 586 | 0.737886 |
b385e4a4faa1e2f81cd2d665b197ea81d1d98ad3 | 1,719 | py | Python | Step_1_Introduction to Python/Python Programming_Beginner/py/4_Challenge_Files, Loops, and Conditional Logic.py | augustine0890/Data-Analyst | 97ec7c208818f3bb55c1ac8c3f1d4bd36570c0a2 | [
"MIT"
] | null | null | null | Step_1_Introduction to Python/Python Programming_Beginner/py/4_Challenge_Files, Loops, and Conditional Logic.py | augustine0890/Data-Analyst | 97ec7c208818f3bb55c1ac8c3f1d4bd36570c0a2 | [
"MIT"
] | null | null | null | Step_1_Introduction to Python/Python Programming_Beginner/py/4_Challenge_Files, Loops, and Conditional Logic.py | augustine0890/Data-Analyst | 97ec7c208818f3bb55c1ac8c3f1d4bd36570c0a2 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[1]:
import pandas as pd
# __Unisex Names__<br>
# - Read the File into a String
# In[2]:
r = open('dq_unisex_names.csv', 'r')
# In[3]:
names = r.read()
# __Convert the string to a list__
# Use the `split()` method that _strings_ have to split on the new-line delimiter (`"\n"`), and a... | 16.528846 | 140 | 0.685864 |
3f81aa05c5b7db63014b08e81240ff1babb5ac52 | 24,461 | py | Python | ykman/cli/fido.py | meeuw/yubikey-manager | 0e6fbaa73397ebc5f4488107d8ffa57159c8cc78 | [
"BSD-2-Clause"
] | null | null | null | ykman/cli/fido.py | meeuw/yubikey-manager | 0e6fbaa73397ebc5f4488107d8ffa57159c8cc78 | [
"BSD-2-Clause"
] | null | null | null | ykman/cli/fido.py | meeuw/yubikey-manager | 0e6fbaa73397ebc5f4488107d8ffa57159c8cc78 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2018 Yubico AB
# 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 conditi... | 32.966307 | 88 | 0.608234 |
a1685769cf941052712096ae0b73c9098658b25b | 13,790 | py | Python | tests/parser/cwrjson/encoder/test_json.py | orenyodfat/CWR-DataApi | f3b6ba8308c901b6ab87073c155c08e30692333c | [
"MIT"
] | 37 | 2015-04-21T15:33:53.000Z | 2022-02-07T00:02:29.000Z | tests/parser/cwrjson/encoder/test_json.py | orenyodfat/CWR-DataApi | f3b6ba8308c901b6ab87073c155c08e30692333c | [
"MIT"
] | 86 | 2015-02-01T22:26:02.000Z | 2021-07-09T08:49:36.000Z | tests/parser/cwrjson/encoder/test_json.py | orenyodfat/CWR-DataApi | f3b6ba8308c901b6ab87073c155c08e30692333c | [
"MIT"
] | 27 | 2015-01-26T16:01:09.000Z | 2021-11-08T23:53:55.000Z | # -*- coding: utf-8 -*-
import unittest
import datetime
import json
from cwr.parser.encoder.cwrjson import JSONEncoder
from cwr.file import FileTag, CWRFile
from cwr.group import GroupHeader, GroupTrailer, Group
from cwr.work import WorkRecord
from cwr.agreement import AgreementRecord
from cwr.transmission import Tra... | 66.941748 | 3,591 | 0.563452 |
cc56af1446ad3ceab11d0197cc59188fec8450e2 | 3,282 | py | Python | CodingTest_30102020/Live Coding Test Solution.py | indranildchandra/Practice-Problems | 3b9b6092c63fee52c289e2b3f26bf03b918bacc8 | [
"Apache-2.0"
] | null | null | null | CodingTest_30102020/Live Coding Test Solution.py | indranildchandra/Practice-Problems | 3b9b6092c63fee52c289e2b3f26bf03b918bacc8 | [
"Apache-2.0"
] | null | null | null | CodingTest_30102020/Live Coding Test Solution.py | indranildchandra/Practice-Problems | 3b9b6092c63fee52c289e2b3f26bf03b918bacc8 | [
"Apache-2.0"
] | 1 | 2022-01-24T18:36:51.000Z | 2022-01-24T18:36:51.000Z | ## Design push and pull APIs for a producer consumer system with N producers and M consumers conforming to the following definitions:
#
# # Push(Key, Payload);
# # Push need not have consecutive keys. But keys pushed are monotonically increasing.
#
# # Payload Pull(Key);
# # Pull can be for any seq/key number.
# # If... | 29.567568 | 142 | 0.654479 |
8ee27bfb8974fc475990548c7403f819e289ae55 | 2,266 | py | Python | data/infrastructure.py | jesmigel/jc_diagrams | fd87174451d95991e0c538bf9256bbfdf9f0538c | [
"MIT"
] | null | null | null | data/infrastructure.py | jesmigel/jc_diagrams | fd87174451d95991e0c538bf9256bbfdf9f0538c | [
"MIT"
] | null | null | null | data/infrastructure.py | jesmigel/jc_diagrams | fd87174451d95991e0c538bf9256bbfdf9f0538c | [
"MIT"
] | null | null | null | from diagrams import Cluster, Diagram
from diagrams.onprem.network import Nginx
from diagrams.oci.security import IDAccess
from diagrams.programming.language import Php, Go
from diagrams.onprem.vcs import Gitlab
from diagrams.generic.storage import Storage
from diagrams.generic.virtualization import Vmware
from diagram... | 24.106383 | 66 | 0.582083 |
2c59032b74e1c42e1522ee3ac5302b007d22ba72 | 806 | py | Python | libs/external_libs/simplejson-1.9.1/scripts/make_docs.py | google-code-export/django-hotclub | d783a5bbcc06816289565f3eae6d99461188ca4a | [
"MIT"
] | 3 | 2015-12-25T14:45:36.000Z | 2016-11-28T09:58:03.000Z | libs/external_libs/simplejson-1.9.1/scripts/make_docs.py | indro/t2c | 56482ad4aed150f29353e054db2c97b567243bf8 | [
"MIT"
] | null | null | null | libs/external_libs/simplejson-1.9.1/scripts/make_docs.py | indro/t2c | 56482ad4aed150f29353e054db2c97b567243bf8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import subprocess
import shutil
PROJECT='simplejson'
def _get_version():
from pkg_resources import PathMetadata, Distribution
egg_info = PROJECT + '.egg-info'
base_dir = os.path.dirname(egg_info)
metadata = PathMetadata(base_dir, egg_info)
dist_name = os.path.splite... | 27.793103 | 76 | 0.700993 |
c4a8070c18d7b5b6c6586d90d5af500260636e69 | 10,081 | py | Python | dltb/thirdparty/qt.py | Petr-By/qtpyvis | 0b9a151ee6b9a56b486c2bece9c1f03414629efc | [
"MIT"
] | 3 | 2017-10-04T14:51:26.000Z | 2017-10-22T09:35:50.000Z | dltb/thirdparty/qt.py | CogSciUOS/DeepLearningToolbox | bf07578b9486d8c48e25df357bc4b9963b513b46 | [
"MIT"
] | 13 | 2017-09-05T12:56:11.000Z | 2017-11-22T10:38:27.000Z | dltb/thirdparty/qt.py | CogSciUOS/DeepLearningToolbox | bf07578b9486d8c48e25df357bc4b9963b513b46 | [
"MIT"
] | 2 | 2017-09-24T21:39:42.000Z | 2017-10-04T15:29:54.000Z | """Implementation of abstract classes using the Qt library
(module `PyQt5`).
"""
# https://stackoverflow.com/questions/12718296/is-there-a-way-to-use-qt-without-qapplicationexec
# FIXME[todo]: the @protect decorator catches KeyboardInterrupt - this is
# not desirable if not run from Qt main event loop but some other
... | 39.073643 | 96 | 0.651919 |
3c767a44f7806c81df1529b122181a6d19fafeaf | 1,612 | py | Python | sgnlp/models/csgec/preprocess.py | raymondng76/sgnlp | f09eada90ef5b1ee979901e5c14413d32e758049 | [
"MIT"
] | 14 | 2021-08-02T01:52:18.000Z | 2022-01-14T10:16:02.000Z | sgnlp/models/csgec/preprocess.py | raymondng76/sgnlp | f09eada90ef5b1ee979901e5c14413d32e758049 | [
"MIT"
] | 29 | 2021-08-02T01:53:46.000Z | 2022-03-30T05:40:46.000Z | sgnlp/models/csgec/preprocess.py | raymondng76/sgnlp | f09eada90ef5b1ee979901e5c14413d32e758049 | [
"MIT"
] | 7 | 2021-08-02T01:54:19.000Z | 2022-01-07T06:37:45.000Z | import re
import torch
from typing import List
from nltk import word_tokenize, sent_tokenize
def prepare_sentences(text):
# tokenize paragraph into sentences
original_sentences = sent_tokenize(text)
original_sentences = list(
map(lambda x: " ".join(word_tokenize(x)), original_sentences)
)
... | 27.793103 | 88 | 0.602978 |
31b6f670e1ce2d00db64c253572e9ea2b7c81da0 | 6,246 | py | Python | src/data_source/catalog.py | ravwojdyla/public-data-source | 54a693e18419b57cb50c3c3e8a78930ac472ac47 | [
"Apache-2.0"
] | null | null | null | src/data_source/catalog.py | ravwojdyla/public-data-source | 54a693e18419b57cb50c3c3e8a78930ac472ac47 | [
"Apache-2.0"
] | null | null | null | src/data_source/catalog.py | ravwojdyla/public-data-source | 54a693e18419b57cb50c3c3e8a78930ac472ac47 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, date
from typing import Optional, Union, Sequence
from pathlib import Path
import functools
import yaml
import fsspec
import os
from . import ENV_CATALOG_PATH
from .core import Entry, Catalog, Storage, DEFAULT_STORAGE
import logging
logger = logging.getLogger(__name__)
PathType = Union[... | 31.386935 | 116 | 0.638168 |
a66949b9bff5ffef667a1f80e3752dc14c83cf3a | 21,950 | py | Python | rllib/agents/ddpg/tests/test_ddpg.py | zommiommy/ray | aa1cbe8abc845e1a6acf2f237b4b00aa7c3f295d | [
"Apache-2.0"
] | null | null | null | rllib/agents/ddpg/tests/test_ddpg.py | zommiommy/ray | aa1cbe8abc845e1a6acf2f237b4b00aa7c3f295d | [
"Apache-2.0"
] | null | null | null | rllib/agents/ddpg/tests/test_ddpg.py | zommiommy/ray | aa1cbe8abc845e1a6acf2f237b4b00aa7c3f295d | [
"Apache-2.0"
] | null | null | null | import numpy as np
import re
import unittest
import ray.rllib.agents.ddpg as ddpg
from ray.rllib.agents.ddpg.ddpg_torch_policy import ddpg_actor_critic_loss as \
loss_torch
from ray.rllib.agents.sac.tests.test_sac import SimpleEnv
from ray.rllib.execution.replay_buffer import LocalReplayBuffer
from ray.rllib.polic... | 43.208661 | 79 | 0.536538 |
d177fb449b3b4b4da37cd92b73d61e3a186fd129 | 3,875 | py | Python | crossword/format_ipuz.py | jmviz/xd | f905e5c61b2835073b19cc3fa0d6917432fa7ece | [
"MIT"
] | 179 | 2016-03-05T03:14:56.000Z | 2022-02-12T22:48:55.000Z | crossword/format_ipuz.py | jmviz/xd | f905e5c61b2835073b19cc3fa0d6917432fa7ece | [
"MIT"
] | 24 | 2016-02-14T07:43:42.000Z | 2021-12-14T01:09:54.000Z | crossword/format_ipuz.py | jmviz/xd | f905e5c61b2835073b19cc3fa0d6917432fa7ece | [
"MIT"
] | 25 | 2016-02-19T20:35:03.000Z | 2022-01-31T09:15:44.000Z | # -*- coding: utf-8 -*-
from crossword.core import Crossword, CrosswordCell
from crossword.exceptions import CrosswordException
def from_ipuz(ipuz_dict):
for kind in ipuz_dict['kind']:
if not kind.startswith("http://ipuz.org/crossword"):
raise CrosswordException
known_keys = (
"di... | 33.695652 | 69 | 0.612903 |
5218b3b231321aff7264685bf8fbe70afad19eb4 | 1,198 | py | Python | mutations/updateApp/example.py | plotly/dds-api-docs | 61fe3f74d5546b45bd1c960473beac6097bba7a1 | [
"MIT"
] | 6 | 2019-09-15T22:19:07.000Z | 2021-01-27T20:23:03.000Z | mutations/updateApp/example.py | plotly/dds-api-docs | 61fe3f74d5546b45bd1c960473beac6097bba7a1 | [
"MIT"
] | 2 | 2019-04-04T01:26:40.000Z | 2020-02-13T23:39:28.000Z | mutations/updateApp/example.py | plotly/dds-api-docs | 61fe3f74d5546b45bd1c960473beac6097bba7a1 | [
"MIT"
] | 2 | 2019-03-19T19:00:52.000Z | 2020-02-09T11:53:01.000Z | from gql import gql
from dds import client as dds_client
update_app_mutation = gql(
"""
mutation {
updateApp(
metadata: {
title: "title",
description: "description",
tags: "tag1,tag2,tag3",
showInPortal: true,
p... | 24.958333 | 86 | 0.412354 |
94c381be2092a47f3e036773e9760e7fdea96a1e | 17,626 | py | Python | sympy/printing/theanocode.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 445 | 2019-01-26T13:50:26.000Z | 2022-03-18T05:17:38.000Z | sympy/printing/theanocode.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | sympy/printing/theanocode.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 31 | 2019-03-10T09:51:27.000Z | 2022-02-14T23:11:12.000Z | from __future__ import print_function, division
from sympy.core.compatibility import range, is_sequence
from sympy.external import import_module
from sympy.printing.printer import Printer
import sympy
from functools import partial
theano = import_module('theano')
if theano:
ts = theano.scalar
tt = theano.te... | 33.382576 | 120 | 0.613355 |
05fea557a5eabb70af6d2403a59815a85a2e0ba6 | 7,636 | py | Python | numpy/core/function_base.py | leifdenby/numpy | 4750c2810c5e0943cbea8e2acc0337c4e66a9bb2 | [
"BSD-3-Clause"
] | 1 | 2021-01-06T21:28:45.000Z | 2021-01-06T21:28:45.000Z | numpy/core/function_base.py | leifdenby/numpy | 4750c2810c5e0943cbea8e2acc0337c4e66a9bb2 | [
"BSD-3-Clause"
] | null | null | null | numpy/core/function_base.py | leifdenby/numpy | 4750c2810c5e0943cbea8e2acc0337c4e66a9bb2 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, absolute_import, print_function
__all__ = ['logspace', 'linspace', 'may_share_memory']
from . import numeric as _nx
from .numeric import result_type, NaN, shares_memory, MAY_SHARE_BOUNDS, TooHardError
def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None):
"... | 30.91498 | 84 | 0.583944 |
0b244a62d7021362d8739c19e7ef6455d6111072 | 2,669 | py | Python | setup.py | CryptoChris7/Universal-setup.py | 8dbb49729e6e1d9cdbc81b5e1cad9cccecdde4a3 | [
"MIT"
] | null | null | null | setup.py | CryptoChris7/Universal-setup.py | 8dbb49729e6e1d9cdbc81b5e1cad9cccecdde4a3 | [
"MIT"
] | null | null | null | setup.py | CryptoChris7/Universal-setup.py | 8dbb49729e6e1d9cdbc81b5e1cad9cccecdde4a3 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import os
import re
import ast
HTTP = re.compile('^https?://.+#egg=(.+)$')
class UniversalSetupError(Exception):
pass
def parse_dependency_info() -> dict:
"""Reads dependency info from requirements.txt"""
packages = []
links = []
try:
with ope... | 29.655556 | 79 | 0.581491 |
f19afde0df670789cde6cdea385d704974c118e8 | 2,209 | py | Python | rps/examples/consensus/consensus_fewer_errors.py | cglacet/robotarium_python_simulator | b58ad6b201f404d0b079dc695f68d916260cc9d1 | [
"MIT"
] | 69 | 2017-09-28T22:30:43.000Z | 2022-03-08T15:01:44.000Z | rps/examples/consensus/consensus_fewer_errors.py | thomaswim/PIR | 1561f971ee7cc7b1d065a3a6ed5060d6539811ef | [
"MIT"
] | 12 | 2017-11-23T18:25:12.000Z | 2022-02-17T18:06:31.000Z | rps/examples/consensus/consensus_fewer_errors.py | thomaswim/PIR | 1561f971ee7cc7b1d065a3a6ed5060d6539811ef | [
"MIT"
] | 37 | 2017-11-23T18:15:24.000Z | 2022-02-15T17:28:09.000Z | import rps.robotarium as robotarium
from rps.utilities.graph import *
from rps.utilities.transformations import *
from rps.utilities.barrier_certificates import *
from rps.utilities.misc import *
from rps.utilities.controllers import *
import numpy as np
# Instantiate Robotarium object
N = 12
r = robotarium.Robotariu... | 33.469697 | 110 | 0.741059 |
83e5e475f21c67047e500bc73598e90089aed40d | 1,495 | py | Python | test_bench/serial_ctrl.py | LogicPi-cn/SerialMasterPyqt5 | a6598101e5d4d617f1e3f3785d2a9c5ed2df604e | [
"MIT"
] | null | null | null | test_bench/serial_ctrl.py | LogicPi-cn/SerialMasterPyqt5 | a6598101e5d4d617f1e3f3785d2a9c5ed2df604e | [
"MIT"
] | null | null | null | test_bench/serial_ctrl.py | LogicPi-cn/SerialMasterPyqt5 | a6598101e5d4d617f1e3f3785d2a9c5ed2df604e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import paho.mqtt.client as mqtt
import time
import hashlib
import hmac
import random
import json
import serial
import serial.tools.list_ports
import datetime
import threading
# 串口句柄
g_serial = None
# 串口已打开
g_port_is_open = False
# 接收线程运行标志位
g_rec_run = False
# 接收计数
g_rec_cnt = 0
# 发送计数
g_snd... | 17.183908 | 54 | 0.543813 |
c2ac8f5f7f823ee60760004cd40907079115fd55 | 3,589 | py | Python | neutron/agent/linux/openvswitch_firewall/iptables.py | knodir/neutron | ac4e28478ac8a8a0c9f5c5785f6a6bcf532c66b8 | [
"Apache-2.0"
] | 1 | 2018-10-19T01:48:37.000Z | 2018-10-19T01:48:37.000Z | neutron/agent/linux/openvswitch_firewall/iptables.py | knodir/neutron | ac4e28478ac8a8a0c9f5c5785f6a6bcf532c66b8 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | neutron/agent/linux/openvswitch_firewall/iptables.py | knodir/neutron | ac4e28478ac8a8a0c9f5c5785f6a6bcf532c66b8 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2017 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 35.534653 | 78 | 0.691 |
3d9ece2126d008e0106390a6ec2bb6b010731a0f | 106,185 | py | Python | CAAPR/CAAPR_AstroMagic/PTS/pts/core/simulation/skifile.py | wdobbels/CAAPR | 50d0b32642a61af614c22f1c6dc3c4a00a1e71a3 | [
"MIT"
] | 7 | 2016-05-20T21:56:39.000Z | 2022-02-07T21:09:48.000Z | CAAPR/CAAPR_AstroMagic/PTS/pts/core/simulation/skifile.py | wdobbels/CAAPR | 50d0b32642a61af614c22f1c6dc3c4a00a1e71a3 | [
"MIT"
] | 1 | 2019-03-21T16:10:04.000Z | 2019-03-22T17:21:56.000Z | CAAPR/CAAPR_AstroMagic/PTS/pts/core/simulation/skifile.py | wdobbels/CAAPR | 50d0b32642a61af614c22f1c6dc3c4a00a1e71a3 | [
"MIT"
] | 1 | 2020-05-19T16:17:17.000Z | 2020-05-19T16:17:17.000Z | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | 42.053465 | 208 | 0.654094 |
017d1e8e2a18720acae8c18a620590c279a3188d | 11,439 | py | Python | code/python/AxiomaEquityOptimizer/v3/fds/sdk/AxiomaEquityOptimizer/model/account_directories.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/AxiomaEquityOptimizer/v3/fds/sdk/AxiomaEquityOptimizer/model/account_directories.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/AxiomaEquityOptimizer/v3/fds/sdk/AxiomaEquityOptimizer/model/account_directories.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Axioma Equity API
Allow clients to fetch Analytics through APIs. # noqa: E501
The version of the OpenAPI document: 3
Contact: analytics.api.support@factset.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from fds.sdk.AxiomaEquityOptimiz... | 43.827586 | 121 | 0.571728 |
3b99b0ce80c00519fe5f1e5ea1d814642c8b15a0 | 333 | py | Python | experiments/GTSRB/net.py | k-yossy90229/Distillation-for-mitigating-backdoor-attack | 691332f54acafbc5e9c4e6495f670805ff622bae | [
"MIT"
] | null | null | null | experiments/GTSRB/net.py | k-yossy90229/Distillation-for-mitigating-backdoor-attack | 691332f54acafbc5e9c4e6495f670805ff622bae | [
"MIT"
] | null | null | null | experiments/GTSRB/net.py | k-yossy90229/Distillation-for-mitigating-backdoor-attack | 691332f54acafbc5e9c4e6495f670805ff622bae | [
"MIT"
] | 1 | 2020-12-10T14:14:16.000Z | 2020-12-10T14:14:16.000Z | import torchvision
from torch import nn
def CNV():
CNV = torchvision.models.vgg11(pretrained=False)
CNV.classifier = nn.Sequential(
nn.Linear(25088, 4096),
nn.ReLU(inplace=True),
nn.Dropout(p=0.5),
nn.Linear(4096, 4096),
nn.ReLU(inplace=True),
nn.Dropout(p=0.5),
nn.Linear(4096, 43)
)
... | 20.8125 | 50 | 0.657658 |
12b7ad33f96c4680823cb5acc33272a0131903f7 | 283 | py | Python | test_project/select2_taggit/forms.py | epoiate/django-autocomplete-light | 6cefd5ea73d1ef2c1c800cd1fdcf6cc6fbe27886 | [
"MIT"
] | 1,368 | 2015-01-03T09:52:33.000Z | 2022-03-27T09:06:00.000Z | test_project/select2_taggit/forms.py | epoiate/django-autocomplete-light | 6cefd5ea73d1ef2c1c800cd1fdcf6cc6fbe27886 | [
"MIT"
] | 919 | 2015-01-01T05:17:48.000Z | 2022-03-25T22:41:14.000Z | test_project/select2_taggit/forms.py | epoiate/django-autocomplete-light | 6cefd5ea73d1ef2c1c800cd1fdcf6cc6fbe27886 | [
"MIT"
] | 469 | 2015-01-19T21:40:30.000Z | 2022-03-26T17:27:40.000Z | from dal import autocomplete
from django import forms
from .models import TModel
class TForm(forms.ModelForm):
class Meta:
model = TModel
fields = ('name', 'test')
widgets = {
'test': autocomplete.TaggitSelect2('select2_taggit')
}
| 18.866667 | 64 | 0.621908 |
47f9127686f7375f4975b193e71bc2baf2cb659e | 1,946 | py | Python | build/lib/pie4t/__init__.py | beardad1975/pie4t | 7da08596dc4ac36a8f643cd682a7232623dd17a0 | [
"MIT"
] | 1 | 2019-12-05T04:10:24.000Z | 2019-12-05T04:10:24.000Z | pie4t/__init__.py | beardad1975/pie4t | 7da08596dc4ac36a8f643cd682a7232623dd17a0 | [
"MIT"
] | null | null | null | pie4t/__init__.py | beardad1975/pie4t | 7da08596dc4ac36a8f643cd682a7232623dd17a0 | [
"MIT"
] | null | null | null |
from . import common
from .engine import PhysicsEngine
物理引擎 = PhysicsEngine
__all__ = [
'add_circle', '新增圓球', '物理引擎',
'simulate', '模擬主迴圈','模擬進行中', '移除',
'add_segment','新增線段','add_box','新增方塊',
]
######## top level function
def add_circle(*args, **kwargs):
if... | 20.484211 | 77 | 0.584789 |
e90011d268e2ff481a89022509343b146d393d43 | 29,040 | py | Python | dask/dataframe/io/parquet/core.py | srijan-deepsource/dask | 0673d9084e02f985f3fdf5ba6ede80e8de5ac15c | [
"BSD-3-Clause"
] | 20 | 2015-01-19T14:04:10.000Z | 2020-01-14T03:43:19.000Z | dask/dataframe/io/parquet/core.py | srijan-deepsource/dask | 0673d9084e02f985f3fdf5ba6ede80e8de5ac15c | [
"BSD-3-Clause"
] | 12 | 2015-01-22T22:00:43.000Z | 2020-07-28T19:22:16.000Z | dask/dataframe/io/parquet/core.py | srijan-deepsource/dask | 0673d9084e02f985f3fdf5ba6ede80e8de5ac15c | [
"BSD-3-Clause"
] | 7 | 2015-01-04T18:50:00.000Z | 2020-07-29T11:00:04.000Z | from distutils.version import LooseVersion
import tlz as toolz
import warnings
from ....bytes import core # noqa
from fsspec.core import get_fs_token_paths
from fsspec.utils import stringify_path
from ...core import DataFrame, new_dd_object
from ....base import tokenize
from ....utils import import_required, natural... | 35.072464 | 88 | 0.594077 |
934bce7625279182c9b6822780a8445933b338b6 | 2,270 | py | Python | setup.py | a-maliarov/Amazon-Captcha-Solver | 085b203951e77b08da10edf4dbd172375bf4a098 | [
"MIT"
] | 43 | 2020-05-22T12:49:30.000Z | 2020-10-13T07:52:42.000Z | setup.py | a-maliarov/Amazon-Captcha-Solver | 085b203951e77b08da10edf4dbd172375bf4a098 | [
"MIT"
] | 22 | 2020-09-12T14:40:48.000Z | 2020-10-14T04:22:53.000Z | setup.py | a-maliarov/Amazon-Captcha-Solver | 085b203951e77b08da10edf4dbd172375bf4a098 | [
"MIT"
] | 7 | 2020-05-29T03:09:52.000Z | 2020-10-13T08:24:21.000Z | # -*- coding: utf-8 -*-
import setuptools
import os
#--------------------------------------------------------------------------------------------------------------
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'amazoncaptcha', '__version__.py'), 'r', encoding='utf-8') as f:... | 34.923077 | 112 | 0.528634 |
c539ce35d1e36dd53f85195b5598a2ef9826ebc1 | 403 | py | Python | edge_shipment/edge_shipment/wsgi.py | 2021-SE-Lab-Mindstorm-Project/Smart-Warehouse-Edge-Shipment | f84afef077a03ed9ade7426785770dcc0c4023d6 | [
"Apache-2.0"
] | null | null | null | edge_shipment/edge_shipment/wsgi.py | 2021-SE-Lab-Mindstorm-Project/Smart-Warehouse-Edge-Shipment | f84afef077a03ed9ade7426785770dcc0c4023d6 | [
"Apache-2.0"
] | null | null | null | edge_shipment/edge_shipment/wsgi.py | 2021-SE-Lab-Mindstorm-Project/Smart-Warehouse-Edge-Shipment | f84afef077a03ed9ade7426785770dcc0c4023d6 | [
"Apache-2.0"
] | null | null | null | """
WSGI config for edge_shipment project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO... | 23.705882 | 78 | 0.791563 |
7b9d97b685e3ae933a7b2400439b25b605904c36 | 34,382 | py | Python | scarf/plots.py | razofz/scarf-1 | 2c97ed6d9433ff95154ce8b26f382139a708207d | [
"BSD-3-Clause"
] | 1 | 2021-08-07T20:55:08.000Z | 2021-08-07T20:55:08.000Z | scarf/plots.py | razofz/scarf-1 | 2c97ed6d9433ff95154ce8b26f382139a708207d | [
"BSD-3-Clause"
] | null | null | null | scarf/plots.py | razofz/scarf-1 | 2c97ed6d9433ff95154ce8b26f382139a708207d | [
"BSD-3-Clause"
] | null | null | null | """
Contains the code for plotting in Scarf.
"""
import matplotlib.pyplot as plt
import matplotlib as mpl
import seaborn as sns
import numpy as np
import pandas as pd
from typing import Tuple, Optional
from cmocean import cm
from .utils import logger
plt.rcParams["svg.fonttype"] = "none"
# These palettes were lifted... | 28.916737 | 136 | 0.531092 |
7703e48fc7b865d657387900c3b02c2d98f773c3 | 4,319 | py | Python | paz/datasets/utils.py | DeepanChakravarthiPadmanabhan/paz_coco | ebbf178491f1771e873425a9b1507b0374325c48 | [
"MIT"
] | 300 | 2020-10-29T08:02:05.000Z | 2022-03-30T21:47:32.000Z | paz/datasets/utils.py | albertofernandezvillan/paz | 9fbd50b993f37e1e807297a29c6044c09967c9cc | [
"MIT"
] | 30 | 2020-10-29T12:40:32.000Z | 2022-03-31T14:06:35.000Z | paz/datasets/utils.py | albertofernandezvillan/paz | 9fbd50b993f37e1e807297a29c6044c09967c9cc | [
"MIT"
] | 62 | 2020-10-29T12:34:13.000Z | 2022-03-29T05:21:45.000Z | def get_class_names(dataset_name='VOC2007'):
"""Gets label names for the classes of the supported datasets.
# Arguments
dataset_name: String. Dataset name. Valid dataset names are:
VOC2007, VOC2012, COCO and YCBVideo.
# Returns
List of strings containing the class names for the ... | 44.989583 | 78 | 0.526279 |
92c19efd530f04175195738b85f74b77b33c249b | 6,367 | py | Python | python/arachne/utils/model_utils.py | fixstars/arachne | 03c00fc5105991d0d706b935d77e6f9255bae9e7 | [
"MIT"
] | 3 | 2022-03-29T03:02:20.000Z | 2022-03-29T03:48:38.000Z | python/arachne/utils/model_utils.py | fixstars/arachne | 03c00fc5105991d0d706b935d77e6f9255bae9e7 | [
"MIT"
] | null | null | null | python/arachne/utils/model_utils.py | fixstars/arachne | 03c00fc5105991d0d706b935d77e6f9255bae9e7 | [
"MIT"
] | 1 | 2022-03-29T05:44:12.000Z | 2022-03-29T05:44:12.000Z | import dataclasses
import os
import tarfile
import tempfile
from dataclasses import asdict
from typing import Optional
import onnx
import onnxruntime
import tensorflow as tf
import torch
import tvm
import yaml
from omegaconf import DictConfig, OmegaConf
from ..data import Model, ModelFormat, ModelSpec, TensorSpec
fro... | 32.319797 | 101 | 0.658395 |
d51f72dc15fd932780a0e0f8d65cab5ccbe23cca | 437 | py | Python | Wave Patterns/wavepattern25.py | Daksh777/Python-PatternHouse | ab801631c2e1f5ed3cc12a26c959d41a5e51273d | [
"MIT"
] | 61 | 2021-01-07T03:56:25.000Z | 2022-02-26T14:39:52.000Z | PythonPatternPrograms/WavePatterns/Pattern 25.py | Ankur-586/Printing-Pattern-Programs | 33e534ed66a02705e6cd6bc1992d4818a44d1b6b | [
"MIT"
] | 851 | 2021-04-02T09:08:15.000Z | 2022-01-12T11:26:57.000Z | PythonPatternPrograms/WavePatterns/Pattern 25.py | Ankur-586/Printing-Pattern-Programs | 33e534ed66a02705e6cd6bc1992d4818a44d1b6b | [
"MIT"
] | 15 | 2021-04-13T06:10:17.000Z | 2022-01-08T05:07:21.000Z | wH = 5 # 1
wL = 4 # 2
for x in range(1, wH + 1):
for y in range(1, wL + 1):
for z in range(1, wH + 1):
if (x == z or x + z == wH + 1):
print("*", end=" ")
else:
print(" ", end=" ") # 3
print()
"""
1) wH - change value to increase/decrease ... | 25.705882 | 64 | 0.475973 |
ebc15451fe0ebff5240009cca23e7a2897268689 | 150 | py | Python | main.py | tahv0/etherneumpaymentbot | 1485f6b069f698f5d29045414a4ebd4b2a924935 | [
"BSD-2-Clause"
] | 2 | 2018-01-17T06:35:52.000Z | 2019-12-16T16:02:08.000Z | main.py | tahv0/etherneumpaymentbot | 1485f6b069f698f5d29045414a4ebd4b2a924935 | [
"BSD-2-Clause"
] | null | null | null | main.py | tahv0/etherneumpaymentbot | 1485f6b069f698f5d29045414a4ebd4b2a924935 | [
"BSD-2-Clause"
] | 3 | 2019-01-04T17:55:17.000Z | 2021-07-16T22:58:42.000Z | #!/usr/bin/env python
from paymentpoller.blockchainpoller import start_polling
def run():
start_polling()
if __name__ == "__main__":
run()
| 15 | 56 | 0.713333 |
1074ddde0d610d4bc20845eaf5372f7802217d67 | 9,565 | py | Python | chapter6_tictactoe.py | liangxuCHEN/Algorithms_python | c76e2396bd60f477b69ed55a9a7e7c86eff46ed4 | [
"AFL-3.0"
] | 5 | 2020-12-11T08:14:08.000Z | 2021-09-07T13:40:20.000Z | chapter6_tictactoe.py | liangxuCHEN/Algorithms_python | c76e2396bd60f477b69ed55a9a7e7c86eff46ed4 | [
"AFL-3.0"
] | null | null | null | chapter6_tictactoe.py | liangxuCHEN/Algorithms_python | c76e2396bd60f477b69ed55a9a7e7c86eff46ed4 | [
"AFL-3.0"
] | 4 | 2021-07-13T02:14:57.000Z | 2022-02-23T09:21:25.000Z | import time
class Game(object):
"""井字游戏"""
def __init__(self):
# 实例化类便开始初始化游戏
self.initialize_game()
# 初始化棋盘
def initialize_game(self):
self.current_state = [['.','.','.'],
['.','.','.'],
['.','.','.']]
# 玩家X用X作... | 36.09434 | 101 | 0.404391 |
a9bb5d28443e1d82c0b3ff6a7ae144e87db5b58e | 8,302 | py | Python | GA.py | danielo620/Steel | 049719988c1d69df25aaf2c7201421d9f556dafe | [
"Apache-2.0"
] | null | null | null | GA.py | danielo620/Steel | 049719988c1d69df25aaf2c7201421d9f556dafe | [
"Apache-2.0"
] | null | null | null | GA.py | danielo620/Steel | 049719988c1d69df25aaf2c7201421d9f556dafe | [
"Apache-2.0"
] | null | null | null | import numpy as np
import Section
from joblib import Parallel, delayed
import SolutionStiffnessSpeed
import CostCalculator
import Mutation3
import UniformCrossover
import Roullette
import os
from timeit import default_timer as timer
import xlsxwriter
import pandas as pd
path = 'C:/Users/rocky/Desktop/Code... | 38.613953 | 269 | 0.484462 |
79a8db3fec89730990fa9a30047a9003026f5314 | 8,019 | py | Python | userbot/plugins/os.py | Fregiant16/fregiantuserbot | 6cb23022a1dfa66551c5ded1928d9fded16e0684 | [
"MIT"
] | 1 | 2020-04-14T15:19:47.000Z | 2020-04-14T15:19:47.000Z | userbot/plugins/os.py | Fregiant16/fregiantuserbot | 6cb23022a1dfa66551c5ded1928d9fded16e0684 | [
"MIT"
] | null | null | null | userbot/plugins/os.py | Fregiant16/fregiantuserbot | 6cb23022a1dfa66551c5ded1928d9fded16e0684 | [
"MIT"
] | 2 | 2020-12-01T02:27:27.000Z | 2022-02-16T08:32:11.000Z | """Emoji
Available Commands:
.emoji shrug
.emoji apple
.emoji :/
.emoji -_-"""
from telethon import events
import asyncio
from userbot import CMD_HELP
from userbot.utils import admin_cmd
@borg.on(admin_cmd(pattern=f"macos", allow_sudo=True))
@borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True))
asyn... | 43.345946 | 759 | 0.536351 |
078ba44bc1dc4e8511b0c4cfa1d00b1f3584dbbb | 6,060 | py | Python | app/grandchallenge/evaluation/tasks.py | pushpanjalip/grand-challenge.org | 607a30c9fe0e603b79f7b49dc9efeb48a484ebfc | [
"Apache-2.0"
] | null | null | null | app/grandchallenge/evaluation/tasks.py | pushpanjalip/grand-challenge.org | 607a30c9fe0e603b79f7b49dc9efeb48a484ebfc | [
"Apache-2.0"
] | null | null | null | app/grandchallenge/evaluation/tasks.py | pushpanjalip/grand-challenge.org | 607a30c9fe0e603b79f7b49dc9efeb48a484ebfc | [
"Apache-2.0"
] | null | null | null | import uuid
from statistics import mean, median
from celery import shared_task
from django.apps import apps
from grandchallenge.evaluation.utils import Metric, rank_results
@shared_task
def set_evaluation_inputs(evaluation_pk):
"""
Sets the inputs to the Evaluation for a algorithm submission.
If all of... | 28.995215 | 79 | 0.649175 |
c55d39c751718cdb4e63aa3da65bf7a16d16bbdf | 1,751 | py | Python | pomp/example_problems/doubleintegrator.py | Aand1/pyOptimalMotionPlanning | 5f06b4331149b86538e1ecfa7ccb9915c8cb510a | [
"Apache-2.0"
] | null | null | null | pomp/example_problems/doubleintegrator.py | Aand1/pyOptimalMotionPlanning | 5f06b4331149b86538e1ecfa7ccb9915c8cb510a | [
"Apache-2.0"
] | null | null | null | pomp/example_problems/doubleintegrator.py | Aand1/pyOptimalMotionPlanning | 5f06b4331149b86538e1ecfa7ccb9915c8cb510a | [
"Apache-2.0"
] | 1 | 2021-07-07T16:15:52.000Z | 2021-07-07T16:15:52.000Z | from OpenGL.GL import *
from geometric import *
from ..spaces.objective import *
from ..spaces.statespace import *
from ..spaces.configurationspace import *
from ..spaces.edgechecker import *
from ..spaces.metric import *
from ..planners.problem import PlanningProblem
class DoubleIntegratorVisualizer:
de... | 30.189655 | 74 | 0.606511 |
95ee3db30911dcd29b4bb789a3349024997a81f7 | 391 | py | Python | poshmon-tools/font.py | super-phreak/poshmon | cca861b0d6cb02fe4969c2dc099cbff5bae38134 | [
"MIT"
] | 1 | 2021-11-18T03:00:13.000Z | 2021-11-18T03:00:13.000Z | poshmon-tools/font.py | super-phreak/poshmon | cca861b0d6cb02fe4969c2dc099cbff5bae38134 | [
"MIT"
] | null | null | null | poshmon-tools/font.py | super-phreak/poshmon | cca861b0d6cb02fe4969c2dc099cbff5bae38134 | [
"MIT"
] | null | null | null | #Needed because powershell ConvertFrom-Json is dumb and treats 'A' and 'a' as the same.
from pokedata import Sprite
class Font:
def __init__(self,addr,char):
self.addr = addr
self.char = char
self.sprite = Sprite.decode1BPP(addr,1,1)
def to_json(self):
return {
'ch... | 26.066667 | 87 | 0.598465 |
bb29f054b294fe2c02496fc64ce65a82f11bf2bb | 1,027 | py | Python | Mundo 2 - Estruturas de Controle/ex059.py | diegomcosta/Curso-em-Video-Python | 3f91b27390b90b686547931d4b1116d1a801cac6 | [
"MIT"
] | null | null | null | Mundo 2 - Estruturas de Controle/ex059.py | diegomcosta/Curso-em-Video-Python | 3f91b27390b90b686547931d4b1116d1a801cac6 | [
"MIT"
] | null | null | null | Mundo 2 - Estruturas de Controle/ex059.py | diegomcosta/Curso-em-Video-Python | 3f91b27390b90b686547931d4b1116d1a801cac6 | [
"MIT"
] | null | null | null | n1 = int(input("Primeiro valor: "))
n2 = int(input("Segundo valor: "))
op = maior = 0
while (op != 5):
print(" [1] somar")
print(" [2] multiplicar")
print(" [3] maior")
print(" [4] novos números")
print(" [5] sair do programa")
op = int(input(">>>>> Qual é a sua opção? "))... | 31.121212 | 63 | 0.462512 |
88f5aee4dbf416d259f2392c712b765b371a5860 | 281 | py | Python | scripts/pickle/3pickle.py | trailofbits/not-slithering-anywhere | 250a7d47762bfd504195a450ce49c146a282323c | [
"Apache-2.0"
] | 11 | 2020-08-06T19:18:31.000Z | 2022-02-25T01:50:04.000Z | scripts/pickle/3pickle.py | Hinge/not-slithering-anywhere | 6f9a263e834ce1b863d33dbb80994eb6a66a5f5d | [
"Apache-2.0"
] | null | null | null | scripts/pickle/3pickle.py | Hinge/not-slithering-anywhere | 6f9a263e834ce1b863d33dbb80994eb6a66a5f5d | [
"Apache-2.0"
] | 3 | 2021-01-07T16:55:02.000Z | 2022-02-25T01:50:10.000Z | import pickle
import os
class F(object):
def __reduce__(self):
return (os.system, (('/usr/bin/id > dump',)))
f = F()
payload = pickle.dumps(f)
print(payload)
pickle.loads(payload)
with open('badpickle.p', 'wb') as fh:
pickle.dump(f, fh, pickle.HIGHEST_PROTOCOL)
| 18.733333 | 53 | 0.658363 |
9a633dd4469a528a405795fc606d3ac0073406c4 | 1,820 | py | Python | .history/my_classes/ScopesClosuresAndDecorators/nonLocalScopes_20210710221612.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/ScopesClosuresAndDecorators/nonLocalScopes_20210710221612.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/ScopesClosuresAndDecorators/nonLocalScopes_20210710221612.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """ NonLocal Scopes
Inner Functions
We can define functions from inside another function:
"""
def outer_func():
# some code
# this is an example of a nested function
def inner_func():
# some code
inner_func()
outer_func()
"""
Both functions have access to the global a... | 19.569892 | 101 | 0.684066 |
1a0cd992f7907b50ee40750e041fcf5a257cd960 | 104 | py | Python | enthought/naming/pyfs_object_factory.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/naming/pyfs_object_factory.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/naming/pyfs_object_factory.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from __future__ import absolute_import
from apptools.naming.pyfs_object_factory import *
| 26 | 49 | 0.855769 |
dc7fb771d0bc966f1d7cc6f74f7c4a0887dfa647 | 123,706 | py | Python | src/sage/crypto/mq/sr.py | vbraun/sage | 07d6c37d18811e2b377a9689790a7c5e24da16ba | [
"BSL-1.0"
] | 3 | 2016-06-19T14:48:31.000Z | 2022-01-28T08:46:01.000Z | src/sage/crypto/mq/sr.py | vbraun/sage | 07d6c37d18811e2b377a9689790a7c5e24da16ba | [
"BSL-1.0"
] | null | null | null | src/sage/crypto/mq/sr.py | vbraun/sage | 07d6c37d18811e2b377a9689790a7c5e24da16ba | [
"BSL-1.0"
] | 7 | 2021-11-08T10:01:59.000Z | 2022-03-03T11:25:52.000Z | r"""
Small Scale Variants of the AES (SR) Polynomial System Generator
Sage supports polynomial system generation for small scale (and full
scale) AES variants over `\GF{2}` and `\GF{2^e}`. Also, Sage supports
both the specification of SR as given in the papers [CMR2005]_ and
[CMR2006]_ and a variant of SR* which is eq... | 36.37342 | 251 | 0.465806 |
cd70deed1e1d6e6d9b7218557c251e178cd34575 | 22,156 | py | Python | tests/api/test_bot.py | eafanasev/permabots | 24de0376e8c482800f4214c021c133d81b9de69f | [
"BSD-3-Clause"
] | 81 | 2016-05-18T02:34:10.000Z | 2021-08-28T17:25:13.000Z | tests/api/test_bot.py | eafanasev/permabots | 24de0376e8c482800f4214c021c133d81b9de69f | [
"BSD-3-Clause"
] | 15 | 2016-05-27T08:51:46.000Z | 2021-03-19T21:42:21.000Z | tests/api/test_bot.py | eafanasev/permabots | 24de0376e8c482800f4214c021c133d81b9de69f | [
"BSD-3-Clause"
] | 34 | 2016-05-29T14:37:01.000Z | 2022-03-24T17:16:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from permabots.models import Bot, TelegramBot, KikBot, MessengerBot
from rest_framework import status
from permabots.views import BotDetail, TelegramBotDetail, KikBotDetail, MessengerBotDetail
import json
from tests.api.base import BaseTestAPI
from unittest import skip
cla... | 56.956298 | 160 | 0.663071 |
3be26f90524b0bce15f41ccddceb6318027e2639 | 1,877 | py | Python | examples/proxy.py | khadas/android_external_python_pyopenssl | 751caf63d05da8477d934da5c05316ddeb4f64de | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | examples/proxy.py | khadas/android_external_python_pyopenssl | 751caf63d05da8477d934da5c05316ddeb4f64de | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | examples/proxy.py | khadas/android_external_python_pyopenssl | 751caf63d05da8477d934da5c05316ddeb4f64de | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | #!/usr/bin/env python
#
# This script demonstrates how one can use pyOpenSSL to speak SSL over an HTTP
# proxy
# The challenge here is to start talking SSL over an already connected socket
#
# Author: Mihai Ibanescu <misa@redhat.com>
#
# $Id: proxy.py,v 1.2 2004/07/22 12:01:25 martin Exp $
import sys
import socket
imp... | 24.064103 | 78 | 0.627597 |
ea9e3a4a10ff228798376d3473b28b56a36da1d0 | 3,436 | py | Python | clif/testing/python/enable_instance_dict_test.py | sr-gi/clif | 39c511e5caccd203d261d97717acde8ec124f44c | [
"Apache-2.0"
] | null | null | null | clif/testing/python/enable_instance_dict_test.py | sr-gi/clif | 39c511e5caccd203d261d97717acde8ec124f44c | [
"Apache-2.0"
] | null | null | null | clif/testing/python/enable_instance_dict_test.py | sr-gi/clif | 39c511e5caccd203d261d97717acde8ec124f44c | [
"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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.347826 | 79 | 0.703434 |
563e4cde2b6ffa9c1715cf1963b82f6591b77577 | 56,952 | py | Python | components/google-cloud/google_cloud_pipeline_components/experimental/automl/tabular/utils.py | connor-mccarthy/pipelines | afe07f1d43a75838ab8e6788b6cd604877dbb4bb | [
"Apache-2.0"
] | null | null | null | components/google-cloud/google_cloud_pipeline_components/experimental/automl/tabular/utils.py | connor-mccarthy/pipelines | afe07f1d43a75838ab8e6788b6cd604877dbb4bb | [
"Apache-2.0"
] | null | null | null | components/google-cloud/google_cloud_pipeline_components/experimental/automl/tabular/utils.py | connor-mccarthy/pipelines | afe07f1d43a75838ab8e6788b6cd604877dbb4bb | [
"Apache-2.0"
] | null | null | null | """Util functions for AutoML Tabular pipeline."""
import json
import math
import os
import pathlib
from typing import Any, Dict, List, Tuple, Optional
_DEFAULT_NUM_PARALLEL_TRAILS = 35
_DEFAULT_STAGE_2_NUM_SELECTED_TRAILS = 5
_NUM_FOLDS = 5
_DISTILL_TOTAL_TRIALS = 100
def input_dictionary_to_parameter(input_dict: O... | 44.046404 | 149 | 0.74317 |
fd390eec24009528885bb2eab5726f94759bf1b2 | 1,467 | py | Python | app/core/adapters/mailjet.py | umluizlima/email-sender | d952874918fc6edc896dabe6d1c1e1391f9d8697 | [
"MIT"
] | 7 | 2020-05-24T16:49:05.000Z | 2021-05-03T18:50:00.000Z | app/core/adapters/mailjet.py | umluizlima/email-sender | d952874918fc6edc896dabe6d1c1e1391f9d8697 | [
"MIT"
] | 1 | 2021-11-07T18:52:54.000Z | 2021-11-07T18:52:55.000Z | app/core/adapters/mailjet.py | umluizlima/email-sender | d952874918fc6edc896dabe6d1c1e1391f9d8697 | [
"MIT"
] | 2 | 2020-05-24T16:49:07.000Z | 2022-02-03T00:57:25.000Z | from typing import Dict
from mailjet_rest import Client
from ..schemas import EmailSchema
from .base import BaseAdapter
class MailjetAdapter(BaseAdapter):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.client = Client(
auth=(
self.settings.MAILJET_API_K... | 29.938776 | 72 | 0.528971 |
3d90d7c98e3fb50149c77eb002567f870cf11977 | 122 | py | Python | src/interpret.py | BotScutters/eye-of-the-needle | 586d9c1e33763919b70382e67e4c7873bdbb05a8 | [
"MIT"
] | 16 | 2019-04-08T22:09:51.000Z | 2021-08-02T18:18:41.000Z | src/interpret.py | BotScutters/eye-of-the-needle | 586d9c1e33763919b70382e67e4c7873bdbb05a8 | [
"MIT"
] | 1 | 2019-11-19T06:27:37.000Z | 2019-12-26T20:56:03.000Z | src/interpret.py | BotScutters/eye-of-the-needle | 586d9c1e33763919b70382e67e4c7873bdbb05a8 | [
"MIT"
] | 8 | 2019-04-08T23:01:39.000Z | 2021-08-02T18:18:43.000Z |
def run():
print("iNterpret: calculating performance metrics...")
print("iNterpret: generating final reports...") | 30.5 | 58 | 0.696721 |
4d839981f24284a1b73710787dcc985d29b11e4f | 538 | py | Python | tests/rules/test_base64.py | Varun-22/Validator | 2c5caa9323aef35e2796813a357e5a7d6d4a80ba | [
"MIT"
] | 41 | 2020-05-07T15:35:12.000Z | 2021-11-01T03:57:09.000Z | tests/rules/test_base64.py | Varun-22/Validator | 2c5caa9323aef35e2796813a357e5a7d6d4a80ba | [
"MIT"
] | 83 | 2020-05-09T22:11:26.000Z | 2022-03-10T19:06:46.000Z | tests/rules/test_base64.py | Varun-22/Validator | 2c5caa9323aef35e2796813a357e5a7d6d4a80ba | [
"MIT"
] | 25 | 2020-05-27T22:46:01.000Z | 2022-03-04T01:36:11.000Z | from validator.rules import Base64
def test_base64_01():
assert Base64().check("c2hPd1MgaSBMSWtFOg==")
assert Base64().check("U09VVEggUEFSSw==")
assert Base64().check("QkxBQ0sgTUlSUk9S")
assert Base64().check("RkFSR08=")
assert Base64().check("QnJlYUtJTkcgQmFkIA==")
def test_base64_02():
... | 20.692308 | 50 | 0.66171 |
cedb0d32a51a1f575a622b38de2cee3ab4757821 | 2,365 | py | Python | mmcv/parallel/data_container.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | 3,748 | 2018-10-12T08:39:46.000Z | 2022-03-31T17:22:55.000Z | mmcv/parallel/data_container.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | 1,637 | 2018-10-12T06:06:18.000Z | 2022-03-31T02:20:53.000Z | mmcv/parallel/data_container.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | 1,234 | 2018-10-12T09:28:20.000Z | 2022-03-31T15:56:24.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import functools
import torch
def assert_tensor_type(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
if not isinstance(args[0].data, torch.Tensor):
raise AttributeError(
f'{args[0].__class__.__name__} has no attr... | 26.277778 | 79 | 0.62241 |
6433ca0e0c1c0316452cceedb5f77df0e71c419c | 3,108 | py | Python | rsbook_code/planning/paths.py | patricknaughton01/RoboticSystemsBook | 0fc67cbccee0832b5f9b00d848c55697fa69bedf | [
"Apache-2.0"
] | 116 | 2018-08-27T15:32:59.000Z | 2022-02-28T10:41:37.000Z | rsbook_code/planning/paths.py | patricknaughton01/RoboticSystemsBook | 0fc67cbccee0832b5f9b00d848c55697fa69bedf | [
"Apache-2.0"
] | 2 | 2021-05-04T12:56:40.000Z | 2022-02-18T23:13:33.000Z | rsbook_code/planning/paths.py | patricknaughton01/RoboticSystemsBook | 0fc67cbccee0832b5f9b00d848c55697fa69bedf | [
"Apache-2.0"
] | 29 | 2019-06-20T20:13:36.000Z | 2022-02-20T14:01:34.000Z | import numpy as np
import math
def linear(m0,m1,u,domain=None):
"""For completeness: linear interpolation between m0 and m1 at parameter u in [0,1].
Alternatively, if `domain` != None, then this will use domain=(a,b)
"""
if domain is not None:
return linear(m0,m1,(u-domain[0])/(domain[1]-d... | 32.715789 | 104 | 0.607465 |
d2be0693ac3b63c0e837b131c3715a876de2a61b | 3,325 | py | Python | train.py | jalywang123/facial-reidentification | 7bf9293eb50b6081e598aeff1516523057bbe002 | [
"MIT"
] | null | null | null | train.py | jalywang123/facial-reidentification | 7bf9293eb50b6081e598aeff1516523057bbe002 | [
"MIT"
] | null | null | null | train.py | jalywang123/facial-reidentification | 7bf9293eb50b6081e598aeff1516523057bbe002 | [
"MIT"
] | 1 | 2021-01-06T00:02:26.000Z | 2021-01-06T00:02:26.000Z | import sys
import argparse
import time
import torch
import PIL.ImageOps
from tqdm import tqdm
import torch.nn as nn
from torch import optim
import torchvision.utils
from helpers import show_plot
from datetime import datetime
import torch.nn.functional as F
from torch.utils.data import DataLoader, Dataset
import torchvi... | 28.418803 | 78 | 0.664662 |
e515a3360cfdc2a55c57866968737de94ac33caa | 631 | py | Python | main_gen.py | rongcloud/rongcloud-message-generator | 3ac5cfca0488e17ba1d3eaf1b547b248cfc296c9 | [
"MIT"
] | null | null | null | main_gen.py | rongcloud/rongcloud-message-generator | 3ac5cfca0488e17ba1d3eaf1b547b248cfc296c9 | [
"MIT"
] | null | null | null | main_gen.py | rongcloud/rongcloud-message-generator | 3ac5cfca0488e17ba1d3eaf1b547b248cfc296c9 | [
"MIT"
] | null | null | null | #coding=utf-8
from MsgObj import MsgObj;
import Util
def main():
# 1.构造 MsgObj 对象
obj = MsgObj("CustomMessage","app:cusMsg")
# 2.设置消息持久化标识
obj.setPersistentFlag(Util.Persistent.IsCounted)
# 3.设置消息所在包名 安卓专用
obj.setPackage("cn.rongcloud.im.im.message")
# 4.设置参数列表
obj.addParamBool("isVip"... | 19.71875 | 52 | 0.638669 |
38776d6d686bf44e8f4753f15c9dcfc3599d9d85 | 10,399 | py | Python | inbm/dispatcher-agent/dispatcher/sota/os_updater.py | ahameedx/intel-inb-manageability | aca445fa4cef0b608e6e88e74476547e10c06073 | [
"Apache-2.0"
] | null | null | null | inbm/dispatcher-agent/dispatcher/sota/os_updater.py | ahameedx/intel-inb-manageability | aca445fa4cef0b608e6e88e74476547e10c06073 | [
"Apache-2.0"
] | null | null | null | inbm/dispatcher-agent/dispatcher/sota/os_updater.py | ahameedx/intel-inb-manageability | aca445fa4cef0b608e6e88e74476547e10c06073 | [
"Apache-2.0"
] | null | null | null | """
SOTA updates factory class. Used to trigger
package installation, updates, security updates etc
Copyright (C) 2017-2022 Intel Corporation
SPDX-License-Identifier: Apache-2.0
"""
import logging
import re
import os
from pathlib import Path
from typing import List, Optional
from abc import ABC, a... | 39.093985 | 104 | 0.650159 |
949efeb188218c5ae4eed5fe198adfcc18bb4606 | 3,045 | py | Python | pyser/api/blog.py | pyserorg/backend | af6be4db7ed7961e80337c95de1e7cd8a06b778a | [
"BSD-2-Clause"
] | 1 | 2019-05-06T20:54:06.000Z | 2019-05-06T20:54:06.000Z | pyser/api/blog.py | mekanix/pyser-backend | af6be4db7ed7961e80337c95de1e7cd8a06b778a | [
"BSD-2-Clause"
] | null | null | null | pyser/api/blog.py | mekanix/pyser-backend | af6be4db7ed7961e80337c95de1e7cd8a06b778a | [
"BSD-2-Clause"
] | 2 | 2018-12-01T20:35:54.000Z | 2018-12-26T18:13:18.000Z | from datetime import datetime
from freenit.api.methodviews import MethodView
from freenit.schemas.paging import PageInSchema, paginate
from flask_jwt_extended import get_jwt_identity, jwt_optional, jwt_required
from flask_smorest import Blueprint, abort
from freenit.models.sql.user import User
from ..models.blog impo... | 31.71875 | 75 | 0.610181 |
4dfc1d00f19201b3dd2153e2c67227e45094a49c | 6,989 | py | Python | apps/impala/src/impala/api.py | FrommyMind/hue | 60a2df13da71bed656adbf61269ab841e2370ed4 | [
"Apache-2.0"
] | 2 | 2020-02-02T15:22:13.000Z | 2020-07-29T15:25:44.000Z | apps/impala/src/impala/api.py | FrommyMind/hue | 60a2df13da71bed656adbf61269ab841e2370ed4 | [
"Apache-2.0"
] | 7 | 2019-11-28T21:48:38.000Z | 2020-08-02T18:06:40.000Z | apps/impala/src/impala/api.py | FrommyMind/hue | 60a2df13da71bed656adbf61269ab841e2370ed4 | [
"Apache-2.0"
] | 6 | 2020-05-29T21:46:30.000Z | 2020-12-15T20:32:19.000Z | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 35.841026 | 241 | 0.742882 |
b1164bfa00c99fd7f2e852504c7c43d111bd6d12 | 307 | py | Python | orcinus/workspace/__init__.py | orcinus-lang/orcinus-bootstrap | 3a4766f05a21ca5d4cd6384d1857ec1ffaa09518 | [
"MIT"
] | null | null | null | orcinus/workspace/__init__.py | orcinus-lang/orcinus-bootstrap | 3a4766f05a21ca5d4cd6384d1857ec1ffaa09518 | [
"MIT"
] | null | null | null | orcinus/workspace/__init__.py | orcinus-lang/orcinus-bootstrap | 3a4766f05a21ca5d4cd6384d1857ec1ffaa09518 | [
"MIT"
] | null | null | null | # Copyright (C) 2019 Vasiliy Sheredeko
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from orcinus.workspace.workspace import Workspace
from orcinus.workspace.document import Document
from orcinus.workspace.package import Package
| 34.111111 | 63 | 0.814332 |
92408d38f525122ba9b2a170f7deb0a1f44ce952 | 4,232 | py | Python | deps/boost/tools/build/test/TestToolset.py | alexhenrie/poedit | b9b31a111d9e8a84cf1e698aff2c922a79bdd859 | [
"MIT"
] | 11,356 | 2017-12-08T19:42:32.000Z | 2022-03-31T16:55:25.000Z | deps/boost/tools/build/test/TestToolset.py | alexhenrie/poedit | b9b31a111d9e8a84cf1e698aff2c922a79bdd859 | [
"MIT"
] | 2,402 | 2017-12-08T22:31:01.000Z | 2022-03-28T19:25:52.000Z | deps/boost/tools/build/test/TestToolset.py | alexhenrie/poedit | b9b31a111d9e8a84cf1e698aff2c922a79bdd859 | [
"MIT"
] | 1,343 | 2017-12-08T19:47:19.000Z | 2022-03-26T11:31:36.000Z | #!/usr/bin/python
#
# Copyright 2017 Steven Watanabe
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# validates a toolset using a mock of the compiler
import BoostBuild
import os
import re
import sys
renames =... | 34.688525 | 87 | 0.643195 |
efb77a7eafa9170dbb9fbb67e090ca9c7a81dd5a | 4,246 | py | Python | pycroft/helpers/printing/__init__.py | marcelb98/pycroft | 34cc59d9ab7fdc0c20b09b4851111048a9f64d90 | [
"Apache-2.0"
] | null | null | null | pycroft/helpers/printing/__init__.py | marcelb98/pycroft | 34cc59d9ab7fdc0c20b09b4851111048a9f64d90 | [
"Apache-2.0"
] | null | null | null | pycroft/helpers/printing/__init__.py | marcelb98/pycroft | 34cc59d9ab7fdc0c20b09b4851111048a9f64d90 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
from io import BytesIO
from os.path import dirname, join
from reportlab.lib.colors imp... | 37.575221 | 89 | 0.567358 |
0fcc2697886a24660e92a7e6887ef1e536696469 | 3,941 | py | Python | pytreex/block/read/conllu.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | null | null | null | pytreex/block/read/conllu.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | null | null | null | pytreex/block/read/conllu.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
#
# Block for reading CoNLL-U files
#
from __future__ import absolute_import
from __future__ import unicode_literals
from pytreex.core.block import Block
from pytreex.core import Document
from pytreex.core.exception import LoadingException
from pytreex.core.util import file_stream... | 32.841667 | 96 | 0.513575 |
7627e028ba2ba86e785e340f232f05c119e756c7 | 54,687 | py | Python | synthetic data generation/DataGen.py | vivolscute/INDIAN_Bad_Words_Dataset | 8f4ec1fdf9838994fe8e2cee995f5873ce4da572 | [
"MIT"
] | 1 | 2021-06-15T19:01:19.000Z | 2021-06-15T19:01:19.000Z | synthetic data generation/DataGen.py | vivolscute/INDIAN_Bad_Words_Dataset | 8f4ec1fdf9838994fe8e2cee995f5873ce4da572 | [
"MIT"
] | null | null | null | synthetic data generation/DataGen.py | vivolscute/INDIAN_Bad_Words_Dataset | 8f4ec1fdf9838994fe8e2cee995f5873ce4da572 | [
"MIT"
] | null | null | null | from itertools import product
from IPython.display import clear_output
REPLACE = {'a': '@', 'i': '*', 'o': '*', 'u': '*', 'v': '*',
'l': '1', 'e': '*', 's': '$', 't': '7'}
def Leet2Combos(word):
possibles = []
for l in word.lower():
ll = REPLACE.get(l, l)
possibles.append( (l,) if ll == l els... | 13.117534 | 87 | 0.812241 |
0152fc835f369302f2e9e9902f7a71cec72cc7bc | 329 | py | Python | Codewars_Python/CodeGolf/jaden_casing_strings_7_kyu.py | nlantau/Codewars_2020_2021 | 055fbf8785ddd52b9f8e8c2b59294ead01852467 | [
"MIT"
] | null | null | null | Codewars_Python/CodeGolf/jaden_casing_strings_7_kyu.py | nlantau/Codewars_2020_2021 | 055fbf8785ddd52b9f8e8c2b59294ead01852467 | [
"MIT"
] | null | null | null | Codewars_Python/CodeGolf/jaden_casing_strings_7_kyu.py | nlantau/Codewars_2020_2021 | 055fbf8785ddd52b9f8e8c2b59294ead01852467 | [
"MIT"
] | null | null | null | # nlantau, 2021-10-10
"""
quote = "How can mirrors be real if our eyes aren't real"
test.assert_equals(to_jaden_case(quote), "How Can Mirrors Be Real If Our Eyes Aren't Real")
"""
a="How can mirrors be real if our eyes aren't real"
to_jaden_case=lambda a:' '.join(w[0].upper()+w[1:] for w in a.split())
print(to_jaden_... | 29.909091 | 91 | 0.702128 |
1c098f9b0b0dec57051b70f799973534a33efdc5 | 2,414 | py | Python | nlp/zemberek/preprocess_pb2_grpc.py | fatihint/lugatrap | 868bd34517eb325591eba96af8176bc4ad5b0fb6 | [
"Apache-2.0"
] | 1 | 2021-04-15T16:16:10.000Z | 2021-04-15T16:16:10.000Z | nlp/zemberek/preprocess_pb2_grpc.py | fatihint/lugatrap | 868bd34517eb325591eba96af8176bc4ad5b0fb6 | [
"Apache-2.0"
] | 1 | 2021-11-04T18:48:01.000Z | 2021-11-04T18:48:01.000Z | nlp/zemberek/preprocess_pb2_grpc.py | fatihint/lugatrap | 868bd34517eb325591eba96af8176bc4ad5b0fb6 | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from . import preprocess_pb2 as preprocess__pb2
class PreprocessingServiceStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A ... | 37.71875 | 91 | 0.769677 |
b12013c44a913bdefba7c7fd2ec22726a76fac2b | 24,741 | py | Python | grr/server/grr_response_server/artifact_registry.py | BA7JCM/grr | c6f3b19e73e1d76a195d3c9a63e894ace6ea2508 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/artifact_registry.py | BA7JCM/grr | c6f3b19e73e1d76a195d3c9a63e894ace6ea2508 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/artifact_registry.py | BA7JCM/grr | c6f3b19e73e1d76a195d3c9a63e894ace6ea2508 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Central registry for artifacts."""
import io
import logging
import os
import threading
from grr_response_core import config
from grr_response_core.lib import artifact_utils
from grr_response_core.lib import objectfilter
from grr_response_core.lib import parsers
from grr_response_core.lib impo... | 34.846479 | 80 | 0.697506 |
5df40bff61181c7c5b1000e9fc7b836034fe22ce | 1,255 | py | Python | sparklingpandas/shell/shell.py | michalmonselise/sparklingpandas | cf4136b5cd21a22e4e61d5da9aa15a72fc3d565c | [
"Apache-2.0"
] | 245 | 2015-02-24T02:49:06.000Z | 2021-11-16T11:25:02.000Z | sparklingpandas/shell/shell.py | michalmonselise/sparklingpandas | cf4136b5cd21a22e4e61d5da9aa15a72fc3d565c | [
"Apache-2.0"
] | 78 | 2015-02-19T23:38:36.000Z | 2017-11-09T11:47:35.000Z | sparklingpandas/shell/shell.py | sparklingpandas/sparklingpandas | 7d549df4348c979042b683c355aa778fc6d3a768 | [
"Apache-2.0"
] | 49 | 2015-02-19T21:56:17.000Z | 2020-11-30T22:20:23.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 35.857143 | 74 | 0.787251 |
d4fb1e2284dbcabc1b50220b69770590a03680ae | 3,713 | py | Python | WebKit/SessionShelveStore.py | PeaceWorksTechnologySolutions/w4py | 74f5a03a63f1a93563502b908474aefaae2abda2 | [
"MIT"
] | null | null | null | WebKit/SessionShelveStore.py | PeaceWorksTechnologySolutions/w4py | 74f5a03a63f1a93563502b908474aefaae2abda2 | [
"MIT"
] | null | null | null | WebKit/SessionShelveStore.py | PeaceWorksTechnologySolutions/w4py | 74f5a03a63f1a93563502b908474aefaae2abda2 | [
"MIT"
] | null | null | null | """Session store using the shelve module."""
import os
import shelve
import threading
from MiscUtils import NoDefault
from SessionStore import maxPickleProtocol, SessionStore
class SessionShelveStore(SessionStore):
"""A session store implemented with a shelve object.
To use this store, set SessionStore in... | 30.434426 | 76 | 0.599246 |
bbc153fc5db07206ffa96e79908516821e381b82 | 8,785 | py | Python | 20210104tempdir/auto1k.py | lamdalamda/auto-moldflow | a067ed7fb4e39179a36016d813aa036bb41f77b6 | [
"Apache-2.0"
] | null | null | null | 20210104tempdir/auto1k.py | lamdalamda/auto-moldflow | a067ed7fb4e39179a36016d813aa036bb41f77b6 | [
"Apache-2.0"
] | null | null | null | 20210104tempdir/auto1k.py | lamdalamda/auto-moldflow | a067ed7fb4e39179a36016d813aa036bb41f77b6 | [
"Apache-2.0"
] | null | null | null | import itertools
import os
class csv(object):#extract information from csv
def __init__(self,filename="1200hf.csv"):
self.lines=open(filename,"r").readlines()
self.attributes=self.lines[0].split(",")
self.attributes[-1]=self.attributes[-1].replace("\n","")
self.datalines=self.li... | 41.244131 | 351 | 0.620262 |
d3bd0ced37a22df3c016f6843152134d31f4b8f4 | 6,406 | py | Python | tools/outtakes.py | grische/whatstyle | eff02bfa45a75019ad4e470085ff7c4da51cb5c4 | [
"MIT"
] | 169 | 2016-06-21T16:43:06.000Z | 2022-01-24T23:01:45.000Z | tools/outtakes.py | grische/whatstyle | eff02bfa45a75019ad4e470085ff7c4da51cb5c4 | [
"MIT"
] | 9 | 2017-10-15T03:27:28.000Z | 2022-01-16T22:12:28.000Z | tools/outtakes.py | grische/whatstyle | eff02bfa45a75019ad4e470085ff7c4da51cb5c4 | [
"MIT"
] | 9 | 2016-08-24T18:27:27.000Z | 2021-12-22T10:27:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This script extracts program crashes from a dump file that was recorded with:
# whatstyle.py --color on --keeptempfiles --debug popenio ...
# The "--color on" is necessary so that it can be distinguished if a space character
# seperates two arguments or is part of the a... | 33.89418 | 93 | 0.52966 |
fb7ff00ae74fd29b817efd0d5c0238c9396a3962 | 38,694 | py | Python | mars/dataframe/indexing/index_lib.py | ueshin/mars | 0b542974243be4e0ff239eaf49ab0fb2935f3361 | [
"Apache-2.0"
] | 1 | 2020-06-25T13:51:16.000Z | 2020-06-25T13:51:16.000Z | mars/dataframe/indexing/index_lib.py | ueshin/mars | 0b542974243be4e0ff239eaf49ab0fb2935f3361 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/indexing/index_lib.py | ueshin/mars | 0b542974243be4e0ff239eaf49ab0fb2935f3361 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding 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 a... | 43.476404 | 101 | 0.5804 |
b4bec518a3d7310d718870c5b0307edeb03cc55f | 28,305 | py | Python | gradio/outputs.py | LysandreJik/gradio | 64dfcbd390c115d0abe42cd25c69c1384701973c | [
"Apache-2.0"
] | null | null | null | gradio/outputs.py | LysandreJik/gradio | 64dfcbd390c115d0abe42cd25c69c1384701973c | [
"Apache-2.0"
] | null | null | null | gradio/outputs.py | LysandreJik/gradio | 64dfcbd390c115d0abe42cd25c69c1384701973c | [
"Apache-2.0"
] | null | null | null | """
This module defines various classes that can serve as the `output` to an interface. Each class must inherit from
`OutputComponent`, and each class must define a path to its template. All of the subclasses of `OutputComponent` are
automatically added to a registry, which allows them to be easily referenced in other ... | 33.736591 | 289 | 0.581735 |
e144495e27aca0f9ece82a2e2fe2d42705ec5444 | 26,547 | py | Python | src/_pytest/capture.py | dougthor42/pytest | 0118f1c081dcd1c6b6de49bc2f7fa5bc2494753b | [
"MIT"
] | null | null | null | src/_pytest/capture.py | dougthor42/pytest | 0118f1c081dcd1c6b6de49bc2f7fa5bc2494753b | [
"MIT"
] | null | null | null | src/_pytest/capture.py | dougthor42/pytest | 0118f1c081dcd1c6b6de49bc2f7fa5bc2494753b | [
"MIT"
] | null | null | null | """
per-test stdout/stderr capturing mechanism.
"""
import collections
import contextlib
import io
import os
import sys
from io import UnsupportedOperation
from tempfile import TemporaryFile
import pytest
from _pytest.compat import CaptureIO
from _pytest.fixtures import FixtureRequest
patchsysdict = {0: "stdin", 1: ... | 32.178182 | 117 | 0.628207 |
978502ad6a23b5f493efdd1da35eb74eaf6dd73b | 5,691 | py | Python | hubblestack/extmods/returners/graylog_nebula_return.py | NerdsvilleCEO/hubble | 200dc8bc2075da5753b2424f1597d806a4139d41 | [
"Apache-2.0"
] | null | null | null | hubblestack/extmods/returners/graylog_nebula_return.py | NerdsvilleCEO/hubble | 200dc8bc2075da5753b2424f1597d806a4139d41 | [
"Apache-2.0"
] | null | null | null | hubblestack/extmods/returners/graylog_nebula_return.py | NerdsvilleCEO/hubble | 200dc8bc2075da5753b2424f1597d806a4139d41 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
'''
HubbleStack Nebula-to-graylog (http input) returner
Deliver HubbleStack Nebula query data into graylog using the HTTP input
plugin. Required config/pillar settings:
.. code-block:: yaml
hubblestack:
returner:
graylog:
- port: 12202
proxy: {}
timeout: 10
... | 40.077465 | 124 | 0.549464 |
4fa841d400a47a4f11331889867f11c025ddb3da | 1,379 | py | Python | tensorflow_graphics/datasets/modelnet40/modelnet40_show.py | jackd/graphics | 736b99a3306e302674a9b7599e3e2857b85fdb74 | [
"Apache-2.0"
] | null | null | null | tensorflow_graphics/datasets/modelnet40/modelnet40_show.py | jackd/graphics | 736b99a3306e302674a9b7599e3e2857b85fdb74 | [
"Apache-2.0"
] | null | null | null | tensorflow_graphics/datasets/modelnet40/modelnet40_show.py | jackd/graphics | 736b99a3306e302674a9b7599e3e2857b85fdb74 | [
"Apache-2.0"
] | 1 | 2020-04-11T10:37:36.000Z | 2020-04-11T10:37:36.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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 32.833333 | 78 | 0.730239 |
9b42abf44bc80c7834b7b555428a7a7433294b2b | 4,460 | py | Python | app/models.py | dan-jugz/stranger-blogs | 78dcfff2cb8f40a0e6fa079f14afbb7850f4ae18 | [
"MIT"
] | null | null | null | app/models.py | dan-jugz/stranger-blogs | 78dcfff2cb8f40a0e6fa079f14afbb7850f4ae18 | [
"MIT"
] | null | null | null | app/models.py | dan-jugz/stranger-blogs | 78dcfff2cb8f40a0e6fa079f14afbb7850f4ae18 | [
"MIT"
] | null | null | null | from . import db
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from . import login_manager
from datetime import datetime
@login_manager.user_loader
def load_user(user_id):
return Writer.query.get(int(user_id))
class Writer(UserMixin,db.Model):
"""
... | 28.961039 | 116 | 0.640583 |
2bd9e3beb5ccb0ef861e6d145c0fae5b73df37e7 | 6,076 | py | Python | mailchimp_transactional/api/metadata_api.py | mailchimp/mailchimp-transactional-python | 13984adc51f8a91a08c8b282d25c6752ba0375c4 | [
"Apache-2.0"
] | 21 | 2020-08-31T16:24:14.000Z | 2022-03-16T17:18:36.000Z | build/lib/mailchimp_transactional/api/metadata_api.py | mailchimp/mailchimp-transactional-python | 13984adc51f8a91a08c8b282d25c6752ba0375c4 | [
"Apache-2.0"
] | null | null | null | build/lib/mailchimp_transactional/api/metadata_api.py | mailchimp/mailchimp-transactional-python | 13984adc51f8a91a08c8b282d25c6752ba0375c4 | [
"Apache-2.0"
] | 5 | 2021-02-02T10:17:43.000Z | 2022-01-21T15:49:38.000Z | # coding: utf-8
"""
Mailchimp Transactional API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 1.0.46
Contact: apihelp@mailchimp.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
fr... | 32.319149 | 198 | 0.575379 |
5457fa57e968e2791493b86cae1a857dac960e8b | 14,176 | py | Python | examples/seq2seq/finetune_trainer_base (2).py | Eymen3455/transformers | f6960bb82015b15b10e5dcea71fd43dc1e73e0b3 | [
"Apache-2.0"
] | 1 | 2021-01-11T19:59:56.000Z | 2021-01-11T19:59:56.000Z | examples/seq2seq/finetune_trainer_base (2).py | Eymen3455/transformers | f6960bb82015b15b10e5dcea71fd43dc1e73e0b3 | [
"Apache-2.0"
] | null | null | null | examples/seq2seq/finetune_trainer_base (2).py | Eymen3455/transformers | f6960bb82015b15b10e5dcea71fd43dc1e73e0b3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2020 The HuggingFace Team. 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... | 37.802667 | 209 | 0.677836 |
12ded5fe094fb1c68f085cd3c2be731d8234008d | 1,825 | py | Python | dynamic_programming/fibonacci.py | srivama/Python | 809d4c077c179feb077f09a3cd2501f9724366a2 | [
"MIT"
] | null | null | null | dynamic_programming/fibonacci.py | srivama/Python | 809d4c077c179feb077f09a3cd2501f9724366a2 | [
"MIT"
] | null | null | null | dynamic_programming/fibonacci.py | srivama/Python | 809d4c077c179feb077f09a3cd2501f9724366a2 | [
"MIT"
] | null | null | null | """
This is a pure Python implementation of Dynamic Programming solution to the Fibonacci sequence problem.
"""
from __future__ import print_function
class Fibonacci:
def __init__(self, N=None):
self.fib_array = []
if N:
N = int(N)
self.fib_array.append(0)
self... | 32.589286 | 144 | 0.505753 |
34adf18944b161addb545aa6c40fcb69097d708f | 19,261 | py | Python | pypeit/par/util.py | joshwalawender/PypeIt | f952cbb2aaee640b5c585be823884a237b441e8e | [
"BSD-3-Clause"
] | null | null | null | pypeit/par/util.py | joshwalawender/PypeIt | f952cbb2aaee640b5c585be823884a237b441e8e | [
"BSD-3-Clause"
] | null | null | null | pypeit/par/util.py | joshwalawender/PypeIt | f952cbb2aaee640b5c585be823884a237b441e8e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Utility functions for PypeIt parameter sets
"""
import os
import time
import glob
import warnings
import textwrap
from IPython import embed
import numpy as np
from astropy.table import Table
from configobj import ConfigObj
from pypeit import msgs
from IPython import embed
#------------... | 31.523732 | 96 | 0.582992 |
6ffa90144304545bb9e311a852e9838fc854c08d | 7,754 | py | Python | dev/archery/archery/lang/python.py | timkpaine/arrow | a96297e65e17e728e4321cdecc7ace146e1363fb | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 9,734 | 2016-02-17T13:22:12.000Z | 2022-03-31T09:35:00.000Z | dev/archery/archery/lang/python.py | timkpaine/arrow | a96297e65e17e728e4321cdecc7ace146e1363fb | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 11,470 | 2016-02-19T15:30:28.000Z | 2022-03-31T23:27:21.000Z | dev/archery/archery/lang/python.py | timkpaine/arrow | a96297e65e17e728e4321cdecc7ace146e1363fb | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 2,637 | 2016-02-17T10:56:29.000Z | 2022-03-31T08:20:13.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.616071 | 79 | 0.60472 |
c7220b1cb4e8e24a248bae47f20de784f1573890 | 2,802 | py | Python | emukit/core/optimization/gradient_acquisition_optimizer.py | aaronkl/emukit | ccd80811a1b8e11ece97dceb2f8c7b92a7a4f236 | [
"Apache-2.0"
] | 6 | 2019-06-02T21:23:27.000Z | 2020-02-17T09:46:30.000Z | emukit/core/optimization/gradient_acquisition_optimizer.py | aaronkl/emukit | ccd80811a1b8e11ece97dceb2f8c7b92a7a4f236 | [
"Apache-2.0"
] | 4 | 2019-05-17T13:30:21.000Z | 2019-06-21T13:49:19.000Z | emukit/core/optimization/gradient_acquisition_optimizer.py | aaronkl/emukit | ccd80811a1b8e11ece97dceb2f8c7b92a7a4f236 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, Optional, Tuple
from GPyOpt.optimization import AcquisitionOptimizer
import numpy as np
from .acquisition_optimizer import AcquisitionOptimizerBase
from .context_manager import ContextManager
from .. import ParameterSpace
from ..acquisition import Acquisition
import logging
_log = logging.ge... | 43.78125 | 114 | 0.693433 |
7bdb81aadefec588d92f9e9d4b10bdc57ee6a2cb | 8,935 | py | Python | setuptools_rust/tomlgen.py | mtreinish/setuptools-rust | 75fa9ab31351071a490b8d9c18826adf05ceb047 | [
"MIT"
] | null | null | null | setuptools_rust/tomlgen.py | mtreinish/setuptools-rust | 75fa9ab31351071a490b8d9c18826adf05ceb047 | [
"MIT"
] | null | null | null | setuptools_rust/tomlgen.py | mtreinish/setuptools-rust | 75fa9ab31351071a490b8d9c18826adf05ceb047 | [
"MIT"
] | null | null | null | # coding: utf-8
import glob
import os
import string
try:
import configparser
except ImportError:
import ConfigParser as configparser
import setuptools
from distutils import log
from distutils.command.build import build
from .extension import RustExtension
__all__ = ["tomlgen"]
class tomlgen_rust(setupto... | 33.339552 | 86 | 0.573027 |
981dd83788630c5a1d578cafcb636622776c8a08 | 4,630 | py | Python | release/stubs.min/Autodesk/Revit/DB/__init___parts/ElementTransformUtils.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/__init___parts/ElementTransformUtils.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/__init___parts/ElementTransformUtils.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class ElementTransformUtils(object):
""" A collection of utilities allowing transformation of elements (e.g. move,rotate,mirror and copy). """
@staticmethod
def CanMirrorElement(ADoc, elemId):
"""
CanMirrorElement(ADoc: Document,elemId: ElementId) -> bool
Determines whether elem... | 27.235294 | 183 | 0.674298 |
612f08c8586d9a658409baaf37c70d38e9776028 | 7,530 | py | Python | scripts/psl2table.py | 861934367/cgat | 77fdc2f819320110ed56b5b61968468f73dfc5cb | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | scripts/psl2table.py | 861934367/cgat | 77fdc2f819320110ed56b5b61968468f73dfc5cb | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | scripts/psl2table.py | 861934367/cgat | 77fdc2f819320110ed56b5b61968468f73dfc5cb | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2019-08-04T22:46:38.000Z | 2019-08-04T22:46:38.000Z | '''
psl2table.py - output stats for psl formatted alignments
================================================================
:Author: Andreas Heger
:Release: $Id$
:Date: |today|
:Tags: Python
Purpose
-------
.. todo::
describe purpose of the script.
Usage
-----
Example::
python psl2table.py --help
Typ... | 29.186047 | 107 | 0.566135 |
5888bddc279642a95b880fd6902f03f41aa1b105 | 5,793 | py | Python | duelingDQN.py | 957001934/Multi-Commander | 20a3229a24040be95fadb02521d9a1f2f14e1888 | [
"MIT"
] | 6 | 2019-08-03T04:04:34.000Z | 2021-07-17T07:26:41.000Z | duelingDQN.py | 957001934/Multi-Commander | 20a3229a24040be95fadb02521d9a1f2f14e1888 | [
"MIT"
] | null | null | null | duelingDQN.py | 957001934/Multi-Commander | 20a3229a24040be95fadb02521d9a1f2f14e1888 | [
"MIT"
] | null | null | null | """
Dueling DQN implementation using tensorflow
"""
import tensorflow as tf
import numpy as np
import random
from collections import deque
import copy
class DuelingDQNAgent(object):
def __init__(self, config):
self.state_size = config['state_size']
self.action_size = config['action_size']
... | 38.62 | 107 | 0.587778 |
90864d9709d4b64fddc01d10d06eb3faa52ae0d7 | 52 | py | Python | graphrepo/drillers/__init__.py | sofiapereiraGIT/GraphRepo | ee479f097615d33b87d2621498272d2d8de1471d | [
"Apache-2.0"
] | null | null | null | graphrepo/drillers/__init__.py | sofiapereiraGIT/GraphRepo | ee479f097615d33b87d2621498272d2d8de1471d | [
"Apache-2.0"
] | null | null | null | graphrepo/drillers/__init__.py | sofiapereiraGIT/GraphRepo | ee479f097615d33b87d2621498272d2d8de1471d | [
"Apache-2.0"
] | null | null | null | from .driller import *
from .cache_driller import *
| 17.333333 | 28 | 0.769231 |
1d5842abdc41b081dcffbc393fa4887fae9749e2 | 377 | py | Python | IMPACTA/Unid02_Sem6.py/exe_2.py | FR7/Meus-Projetos | 1c8e1a91eaf143cccdc10f0e7edd013d910de474 | [
"MIT"
] | null | null | null | IMPACTA/Unid02_Sem6.py/exe_2.py | FR7/Meus-Projetos | 1c8e1a91eaf143cccdc10f0e7edd013d910de474 | [
"MIT"
] | null | null | null | IMPACTA/Unid02_Sem6.py/exe_2.py | FR7/Meus-Projetos | 1c8e1a91eaf143cccdc10f0e7edd013d910de474 | [
"MIT"
] | null | null | null | # A série de Fibonacci é formada pela sequência 1, 1, 2, 3, 5, 8, 13, 21, 34, ... Escreva um programa
# que apresente a série de Fibonacci até o n-ésimo termo (n > 0).
n = int(input("Digite o num n-ésimo termo para mostrar a serie de fibonacci: "))
a = 0
b = 1
print(a)
for x in range (b, n):
... | 29 | 101 | 0.549072 |
cd593c432f1ccecbba367d8bdf0967564f12d185 | 2,011 | py | Python | applications/FSIApplication/tests/test_mpi_FSIApplication.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 2 | 2019-10-25T09:28:10.000Z | 2019-11-21T12:51:46.000Z | applications/FSIApplication/tests/test_mpi_FSIApplication.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 13 | 2019-10-07T12:06:51.000Z | 2020-02-18T08:48:33.000Z | applications/FSIApplication/tests/test_mpi_FSIApplication.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 1 | 2020-06-12T08:51:24.000Z | 2020-06-12T08:51:24.000Z | # import Kratos
from KratosMultiphysics import *
from KratosMultiphysics.FSIApplication import *
# Import Kratos "wrapper" for unittests
import KratosMultiphysics.KratosUnittest as KratosUnittest
# Import the tests o test_classes to create the suits
## SMALL TESTS
from convergence_accelerator_spring_MPI_test import C... | 37.240741 | 116 | 0.719543 |
746d310d2457a1828d927b9980078063f37b4ec2 | 172 | py | Python | fourpisky/sites/ami.py | 4pisky/fourpisky-core | 1dc9c4f73dfef075e2a27c3c8453d811a5a99e58 | [
"BSD-2-Clause"
] | 2 | 2016-08-25T22:20:58.000Z | 2018-11-18T21:16:11.000Z | fourpisky/sites/ami.py | 4pisky/fourpisky-core | 1dc9c4f73dfef075e2a27c3c8453d811a5a99e58 | [
"BSD-2-Clause"
] | 2 | 2016-11-01T14:10:58.000Z | 2016-11-01T14:11:39.000Z | fourpisky/sites/ami.py | 4pisky/fourpisky-core | 1dc9c4f73dfef075e2a27c3c8453d811a5a99e58 | [
"BSD-2-Clause"
] | null | null | null | import ephem
AmiLA = ephem.Observer()
AmiLA.lat = ephem.degrees('52.16977')
AmiLA.lon = ephem.degrees('0.059167')
AmiLA.horizon = ephem.degrees('20')
AmiLA.name = 'AMI-LA'
| 24.571429 | 37 | 0.715116 |
2281138ef695ae786ad3aa89a59b7e45d3f0f74d | 899 | py | Python | gui/api_plugins/output_plugin_test.py | pchaigno/grr | 69c81624c281216a45c4bb88a9d4e4b0613a3556 | [
"Apache-2.0"
] | 1 | 2015-01-07T05:29:57.000Z | 2015-01-07T05:29:57.000Z | gui/api_plugins/output_plugin_test.py | pchaigno/grr | 69c81624c281216a45c4bb88a9d4e4b0613a3556 | [
"Apache-2.0"
] | null | null | null | gui/api_plugins/output_plugin_test.py | pchaigno/grr | 69c81624c281216a45c4bb88a9d4e4b0613a3556 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""This module contains tests for output plugins-related API renderers."""
from grr.gui import api_test_lib
from grr.lib import flags
from grr.lib import output_plugin
from grr.lib import test_lib
from grr.lib import utils
from grr.lib.output_plugins import csv_plugin
from grr.lib.output_plugin... | 25.685714 | 74 | 0.761958 |
4284861bd204069daecd42c8d56251205d65180f | 38,486 | py | Python | bin/Python27/Lib/site-packages/numpy/random/tests/test_random.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/numpy/random/tests/test_random.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/numpy/random/tests/test_random.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | 1 | 2020-05-07T11:04:14.000Z | 2020-05-07T11:04:14.000Z | from __future__ import division, absolute_import, print_function
import numpy as np
from numpy.testing import (
TestCase, run_module_suite, assert_, assert_raises, assert_equal,
assert_warns)
from numpy import random
from numpy.compat import asbytes
import sys
import warnings
class Test... | 44.907818 | 88 | 0.571403 |
7f8b4727b91698c45d131ec345a0b4ceefe851a2 | 21 | py | Python | modules/retrieval/text_classification/libs/customdatasets/__init__.py | martinhoang11/vietnamese-ocr-toolbox | 524b4908bedceb0c87b2c7cd7b5e3f6e1126ace5 | [
"Apache-2.0"
] | 14 | 2021-09-05T10:42:14.000Z | 2022-03-10T16:27:26.000Z | modules/retrieval/text_classification/libs/customdatasets/__init__.py | martinhoang11/vietnamese-ocr-toolbox | 524b4908bedceb0c87b2c7cd7b5e3f6e1126ace5 | [
"Apache-2.0"
] | 1 | 2021-06-16T11:35:24.000Z | 2021-06-16T11:35:24.000Z | modules/retrieval/text_classification/libs/customdatasets/__init__.py | martinhoang11/vietnamese-ocr-toolbox | 524b4908bedceb0c87b2c7cd7b5e3f6e1126ace5 | [
"Apache-2.0"
] | 5 | 2021-09-05T13:26:51.000Z | 2022-03-09T07:49:45.000Z | from .mcocr import *
| 10.5 | 20 | 0.714286 |
9b353307a2fceecef14982f76c268060b280c09e | 547 | py | Python | plotly/validators/scattergeo/marker/_size.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 2 | 2018-12-03T15:20:42.000Z | 2018-12-03T15:20:47.000Z | plotly/validators/scattergeo/marker/_size.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scattergeo/marker/_size.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 2 | 2019-06-17T01:35:57.000Z | 2020-11-03T01:07:19.000Z | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name='size', parent_name='scattergeo.marker', **kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_... | 30.388889 | 75 | 0.610603 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.