hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e9f1fa502170a2e93f549a491cb035c8fcee31ea | 2,017 | py | Python | csrv/model/cards/corp/card01065_test.py | mrroach/CentralServer | e377c65d8f3adf5a2d3273acd4f459be697aea56 | [
"Apache-2.0"
] | null | null | null | csrv/model/cards/corp/card01065_test.py | mrroach/CentralServer | e377c65d8f3adf5a2d3273acd4f459be697aea56 | [
"Apache-2.0"
] | null | null | null | csrv/model/cards/corp/card01065_test.py | mrroach/CentralServer | e377c65d8f3adf5a2d3273acd4f459be697aea56 | [
"Apache-2.0"
] | 1 | 2020-09-20T11:26:20.000Z | 2020-09-20T11:26:20.000Z | import unittest
if __name__ == '__main__':
unittest.main()
| 32.532258 | 64 | 0.705007 | import unittest
from csrv.model import errors
from csrv.model import events
from csrv.model import test_base
from csrv.model import timing_phases
from csrv.model.cards.corp import card01065
class Card01065Test(test_base.TestBase):
def setUp(self):
test_base.TestBase.setUp(self)
self.card = card01065.Card01... | 0 | 0 | 0 | 1,756 | 0 | 0 | 0 | 64 | 133 |
8b1e2c0c2faf01a9f0cd58b853271bbbceaaf19e | 2,374 | py | Python | tests/test_observer_abilities.py | IanDCarroll/xox | 38feac84e81e8c00a397f7f976efee15756cd3ac | [
"MIT"
] | null | null | null | tests/test_observer_abilities.py | IanDCarroll/xox | 38feac84e81e8c00a397f7f976efee15756cd3ac | [
"MIT"
] | 30 | 2016-11-25T05:34:34.000Z | 2017-02-11T00:10:17.000Z | tests/test_observer_abilities.py | IanDCarroll/tik-tak-toe | 38feac84e81e8c00a397f7f976efee15756cd3ac | [
"MIT"
] | 1 | 2016-11-26T01:41:37.000Z | 2016-11-26T01:41:37.000Z | import unittest
if __name__ == '__main__':
unittest.main()
| 38.290323 | 66 | 0.657961 | import unittest
from Training.observer_abilities import *
class ObserverTestCase(unittest.TestCase):
def setUp(self):
self.observer = Observer()
self.mock_4x4_board = [ 1, 0, 0,10,
0, 1,10, 0,
0,10, 1, 0,
... | 0 | 0 | 0 | 2,245 | 0 | 0 | 0 | 20 | 45 |
d2f90e2105f715bfa385ede947f0041c8746e8c3 | 6,133 | py | Python | in_progress/GiRaFFEfood_NRPy/GiRaFFEfood_NRPy_Aligned_Rotator.py | fedelopezar/nrpytutorial | 753acd954be4a2f99639c9f9fd5e623689fc7493 | [
"BSD-2-Clause"
] | 1 | 2021-12-13T05:51:18.000Z | 2021-12-13T05:51:18.000Z | in_progress/GiRaFFEfood_NRPy/GiRaFFEfood_NRPy_Aligned_Rotator.py | fedelopezar/nrpytutorial | 753acd954be4a2f99639c9f9fd5e623689fc7493 | [
"BSD-2-Clause"
] | null | null | null | in_progress/GiRaFFEfood_NRPy/GiRaFFEfood_NRPy_Aligned_Rotator.py | fedelopezar/nrpytutorial | 753acd954be4a2f99639c9f9fd5e623689fc7493 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# <a id='top'></a>
#
#
# # $\texttt{GiRaFFEfood}$: Initial data for $\texttt{GiRaFFE}$
#
# ## Aligned Rotator
#
# $$\label{top}$$
#
# This module provides another initial data option for $\texttt{GiRaFFE}$. This is a flat-spacetime test with initial data $$A_{\phi} = \frac{\mu \va... | 43.807143 | 334 | 0.633458 | #!/usr/bin/env python
# coding: utf-8
# <a id='top'></a>
#
#
# # $\texttt{GiRaFFEfood}$: Initial data for $\texttt{GiRaFFE}$
#
# ## Aligned Rotator
#
# $$\label{top}$$
#
# This module provides another initial data option for $\texttt{GiRaFFE}$. This is a flat-spacetime test with initial data $$A_{\phi} = \frac{\mu \va... | 0 | 0 | 0 | 0 | 0 | 3,285 | 0 | 0 | 151 |
c1f5aebe5569e8c058f6ab1653350eefa2178d40 | 6,434 | py | Python | nlp/tutorials/word2vec/word2vec.py | bhrgv-bolla/AI | e0a0a5750c5c389bb5f512cec979da10041c8dff | [
"Apache-2.0"
] | null | null | null | nlp/tutorials/word2vec/word2vec.py | bhrgv-bolla/AI | e0a0a5750c5c389bb5f512cec979da10041c8dff | [
"Apache-2.0"
] | null | null | null | nlp/tutorials/word2vec/word2vec.py | bhrgv-bolla/AI | e0a0a5750c5c389bb5f512cec979da10041c8dff | [
"Apache-2.0"
] | null | null | null | """ Implementing word2vec using the skipgram model using a logistic regression
as probability function. """
import tensorflow as tf
import numpy as np
import zipfile
import math
from . import directory_util, download
import os
import collections
dataset_name = 'text8.zip'
def read_data(filename):
""" Step 1 Rea... | 43.181208 | 127 | 0.633976 | """ Implementing word2vec using the skipgram model using a logistic regression
as probability function. """
import tensorflow as tf
import numpy as np
import zipfile
import math
from . import directory_util, download
import os
import collections
dataset_name = 'text8.zip'
def read_data(filename):
""" Step 1 Rea... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
58b12136edc0e2b57e2f2ffb93b8c5cbc6d2086c | 585 | py | Python | 09_Dividir_A_Conta.py | Bruna-Fernandes/Python | 2af20ec86f202bebfd4e0647589ec3f8449534a7 | [
"MIT"
] | null | null | null | 09_Dividir_A_Conta.py | Bruna-Fernandes/Python | 2af20ec86f202bebfd4e0647589ec3f8449534a7 | [
"MIT"
] | null | null | null | 09_Dividir_A_Conta.py | Bruna-Fernandes/Python | 2af20ec86f202bebfd4e0647589ec3f8449534a7 | [
"MIT"
] | null | null | null | # 09_Trs amigos, Carlos, Andr e Felipe. decidiram rachar igualmente a conta de um bar.
# Faa um algoritmo para ler o valor total da conta e imprimir quanto cada um deve
# pagar, mas faa com que Carlos e Andr no paguem centavos. Ex: uma conta de
# R$101,53 resulta em R$33,00 para Carlos, R$33,00 para Andr e R$35,53 para... | 45 | 88 | 0.697436 | # 09_Três amigos, Carlos, André e Felipe. decidiram rachar igualmente a conta de um bar.
# Faça um algoritmo para ler o valor total da conta e imprimir quanto cada um deve
# pagar, mas faça com que Carlos e André não paguem centavos. Ex: uma conta de
# R$101,53 resulta em R$33,00 para Carlos, R$33,00 para André e R$35,... | 16 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6881fedc7e7bedf8fde423a271c428047546c2be | 1,067 | py | Python | data_structure_and_algorithm/queue.py | KiwiShow/PythonWeb | a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd | [
"MIT"
] | 7 | 2018-02-24T13:41:21.000Z | 2022-02-06T04:59:13.000Z | data_structure_and_algorithm/queue.py | KiwiShow/PythonWeb | a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd | [
"MIT"
] | 6 | 2018-02-25T11:50:42.000Z | 2021-12-13T19:55:13.000Z | data_structure_and_algorithm/queue.py | KiwiShow/PythonWeb | a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd | [
"MIT"
] | 1 | 2018-03-01T02:43:15.000Z | 2018-03-01T02:43:15.000Z |
##############################################
# head-1-2-3-4(tail) <---enqueue
# dequeue---^
##############################################
#
if __name__ == '__main__':
#
test()
# 1
# 2
# 3
# 4
# None
| 17.209677 | 48 | 0.490159 | class Node():
def __init__(self, element=None, next=None):
self.element = element
self.next = next
def __repr__(self):
return str(self.element)
class Queue():
def __init__(self):
self.head = Node()
self.tail = self.head
def is_empty(self):
return self.... | 54 | 0 | 0 | 545 | 0 | 202 | 0 | 0 | 67 |
04c0e3b1a68066e78e3f5914a72a288687fde62e | 4,255 | py | Python | tests/fixtures.py | soupault/solt | 50b064b398306ff0b21f8c39968e9201b697ddc1 | [
"MIT"
] | null | null | null | tests/fixtures.py | soupault/solt | 50b064b398306ff0b21f8c39968e9201b697ddc1 | [
"MIT"
] | null | null | null | tests/fixtures.py | soupault/solt | 50b064b398306ff0b21f8c39968e9201b697ddc1 | [
"MIT"
] | null | null | null | import numpy as np
__all__ = [
"img_2x2",
"mask_2x2",
"img_3x3_rgb",
"img_3x3",
"img_3x4",
"mask_3x3",
"mask_3x4",
"img_5x5",
"mask_5x5",
"img_6x6",
"img_6x6_lc",
"img_6x6_rgb",
"mask_6x6",
"img_7x7",
"cube_3x3x3",
]
def img_2x2():
"""
Generates a ... | 17.878151 | 104 | 0.490482 | import numpy as np
__all__ = [
"img_2x2",
"mask_2x2",
"img_3x3_rgb",
"img_3x3",
"img_3x4",
"mask_3x3",
"mask_3x4",
"img_5x5",
"mask_5x5",
"img_6x6",
"img_6x6_lc",
"img_6x6_rgb",
"mask_6x6",
"img_7x7",
"cube_3x3x3",
]
def img_2x2():
"""
Generates a ... | 0 | 0 | 0 | 0 | 0 | 46 | 0 | 0 | 23 |
fbfde656fba4fbe3f8de6a09fc45e35b6e589258 | 1,524 | py | Python | root/ilikeit/RabbitMQCrashCourse/tutorials/publishsubscribe/emit_log.py | ChyiYaqing/chyidlTutorial | 77e7f6f84f21537a58a8a8a42e31cf2e3dd31996 | [
"MIT"
] | 5 | 2018-10-17T05:57:39.000Z | 2021-07-05T15:38:24.000Z | root/ilikeit/RabbitMQCrashCourse/tutorials/publishsubscribe/emit_log.py | ChyiYaqing/chyidlTutorial | 77e7f6f84f21537a58a8a8a42e31cf2e3dd31996 | [
"MIT"
] | 2 | 2021-04-14T00:48:43.000Z | 2021-04-14T02:20:50.000Z | root/ilikeit/RabbitMQCrashCourse/tutorials/publishsubscribe/emit_log.py | ChyiYaqing/chyidlTutorial | 77e7f6f84f21537a58a8a8a42e31cf2e3dd31996 | [
"MIT"
] | 3 | 2019-03-02T14:36:19.000Z | 2022-03-18T10:12:09.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
emit_log.py published log messages are going to be broadcast to all the receives
"""
# Pika is a pure-Python implementation of the AMQP 0-9-1 protocol
import pika
import sys
# guest user can only connect via localhost
#credentials = pika.PlainCredentials('guest', 'gue... | 40.105263 | 126 | 0.62664 | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
emit_log.py published log messages are going to be broadcast to all the receives
"""
# Pika is a pure-Python implementation of the AMQP 0-9-1 protocol
import pika
import sys
# guest user can only connect via localhost
#credentials = pika.PlainCredentials('guest', 'gue... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a32f0742cb04350a5e987b2f89ac96d7488514a9 | 686 | py | Python | resources/solicit_token.py | jnbellinger/lta | b7cb3c65e0f167e56abb67f8283083aafd700e42 | [
"MIT"
] | 1 | 2019-07-30T16:03:26.000Z | 2019-07-30T16:03:26.000Z | resources/solicit_token.py | jnbellinger/lta | b7cb3c65e0f167e56abb67f8283083aafd700e42 | [
"MIT"
] | 80 | 2019-01-10T21:46:43.000Z | 2022-03-24T22:40:54.000Z | resources/solicit_token.py | jnbellinger/lta | b7cb3c65e0f167e56abb67f8283083aafd700e42 | [
"MIT"
] | 1 | 2018-12-10T21:13:11.000Z | 2018-12-10T21:13:11.000Z | """
Ask the (testing) token service for a token.
Run with `python -m lta.solicit_token`.
"""
import asyncio
from rest_tools.server import from_environment # type: ignore
EXPECTED_CONFIG = {
'LTA_AUTH_ROLE': None,
'TOKEN_SERVICE_URL': None,
}
if __name__ == '__main__':
config = from_environment(EXPECTED... | 26.384615 | 84 | 0.708455 | """
Ask the (testing) token service for a token.
Run with `python -m lta.solicit_token`.
"""
import asyncio
from rest_tools.client import RestClient # type: ignore
from rest_tools.server import from_environment # type: ignore
EXPECTED_CONFIG = {
'LTA_AUTH_ROLE': None,
'TOKEN_SERVICE_URL': None,
}
async d... | 0 | 0 | 191 | 0 | 0 | 0 | 0 | 19 | 62 |
ce6b8693fb7f178920298e9524c0d231053f67ed | 2,322 | py | Python | examples/sentence_classifier/config_kim.py | GingerBear/texar | 46e006f9349893a3015cd937bee9914c516e26af | [
"Apache-2.0"
] | 2,325 | 2018-08-29T19:34:09.000Z | 2022-03-26T18:11:58.000Z | examples/sentence_classifier/config_kim.py | GingerBear/texar | 46e006f9349893a3015cd937bee9914c516e26af | [
"Apache-2.0"
] | 183 | 2018-08-30T02:17:45.000Z | 2022-02-23T13:53:58.000Z | examples/sentence_classifier/config_kim.py | GingerBear/texar | 46e006f9349893a3015cd937bee9914c516e26af | [
"Apache-2.0"
] | 421 | 2018-08-29T20:00:16.000Z | 2022-03-08T13:32:03.000Z | # Copyright 2018 The Texar Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 29.769231 | 74 | 0.644703 | # Copyright 2018 The Texar Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3ca946b6325d9ecbaa1ac46ed1599756f09a9151 | 2,457 | py | Python | LeetCode/Python3/Math/279. Perfect Squares.py | WatsonWangZh/CodingPractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | 11 | 2019-09-01T22:36:00.000Z | 2021-11-08T08:57:20.000Z | LeetCode/Python3/Math/279. Perfect Squares.py | WatsonWangZh/LeetCodePractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | null | null | null | LeetCode/Python3/Math/279. Perfect Squares.py | WatsonWangZh/LeetCodePractice | dc057dd6ea2fc2034e14fd73e07e73e6364be2ae | [
"MIT"
] | 2 | 2020-05-27T14:58:52.000Z | 2020-05-27T15:04:17.000Z | # Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.
# Example 1:
# Input: n = 12
# Output: 3
# Explanation: 12 = 4 + 4 + 4.
# Example 2:
# Input: n = 13
# Output: 2
# Explanation: 13 = 4 + 9.
# 200627
# M1. TLE
# M2. DP
# M3. BFS
| 25.59375 | 125 | 0.448514 | # Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.
# Example 1:
# Input: n = 12
# Output: 3
# Explanation: 12 = 4 + 4 + 4.
# Example 2:
# Input: n = 13
# Output: 2
# Explanation: 13 = 4 + 9.
class Solution(object):
def numSquares(self, n... | 129 | 0 | 0 | 2,011 | 0 | 0 | 0 | 0 | 89 |
4b642531f4d2a435d10018cb459ade38ae6e1377 | 2,727 | py | Python | eternity_backend_server/blueprints/datamin/detail_function/token_parse.py | Eternity-labs/eternity-backend-server | 3159326a0277e37b8fa74e747e8e13934d1bccc2 | [
"Apache-2.0"
] | null | null | null | eternity_backend_server/blueprints/datamin/detail_function/token_parse.py | Eternity-labs/eternity-backend-server | 3159326a0277e37b8fa74e747e8e13934d1bccc2 | [
"Apache-2.0"
] | null | null | null | eternity_backend_server/blueprints/datamin/detail_function/token_parse.py | Eternity-labs/eternity-backend-server | 3159326a0277e37b8fa74e747e8e13934d1bccc2 | [
"Apache-2.0"
] | null | null | null | from bs4 import BeautifulSoup
from lxml import etree
import json
# xpath
def overview_info_parse(parse_str:str = ''):
"""
"""
html_info = etree.HTML(parse_str,parser=None)
try:
#==============================================
Price = html_info.xpath('string(//*[@id="ContentPlaceHo... | 37.875 | 147 | 0.550422 | from bs4 import BeautifulSoup
from lxml import etree
import json
# xpath需要定期更换,否则数据抓取不全
def overview_info_parse(parse_str:str = ''):
"""
传入一个待解析的字符串
"""
html_info = etree.HTML(parse_str,parser=None)
try:
#=======================开始解析字段=======================
Price = html_info.xpath... | 189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
156b2a11a4f618e4547a8257ca33ab9c15ae88e3 | 924 | py | Python | kubeyard/commands/build.py | socialwifi/kubeyard | 094576e6ad4ff7b9eb419234a3392523cf9e2b18 | [
"BSD-3-Clause"
] | 16 | 2018-11-30T09:53:23.000Z | 2020-06-07T16:36:10.000Z | kubeyard/commands/build.py | socialwifi/kubeyard | 094576e6ad4ff7b9eb419234a3392523cf9e2b18 | [
"BSD-3-Clause"
] | 34 | 2018-12-17T15:22:16.000Z | 2020-08-14T11:04:24.000Z | kubeyard/commands/build.py | socialwifi/kubeyard | 094576e6ad4ff7b9eb419234a3392523cf9e2b18 | [
"BSD-3-Clause"
] | 4 | 2018-12-17T09:57:09.000Z | 2020-05-14T11:16:34.000Z | import logging
logger = logging.getLogger(__name__)
| 35.538462 | 110 | 0.70671 | import logging
import shlex
from kubeyard.commands.devel import BaseDevelCommand
logger = logging.getLogger(__name__)
class BuildCommand(BaseDevelCommand):
"""
Builds docker image required to run tests and deployment. Can be overridden in <project_dir>/sripts/build.
If kubeyard is set up in development ... | 0 | 0 | 0 | 780 | 0 | 0 | 0 | 22 | 68 |
eca0a428d1caa2f9f94de70e2ac9e7901807a7f3 | 8,819 | py | Python | misc_scripts/Check_Name_Synonym.py | pombase/legacy-eg-loader | 1a324121325ffc3b9a4c15922f7a12756a9c3206 | [
"Apache-2.0"
] | null | null | null | misc_scripts/Check_Name_Synonym.py | pombase/legacy-eg-loader | 1a324121325ffc3b9a4c15922f7a12756a9c3206 | [
"Apache-2.0"
] | null | null | null | misc_scripts/Check_Name_Synonym.py | pombase/legacy-eg-loader | 1a324121325ffc3b9a4c15922f7a12756a9c3206 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import MySQLdb as mdb
import psycopg2
import psycopg2.extras
import psycopg2.extensions
from psycopg2 import OperationalError
import sys
import argparse
parser = argparse.ArgumentParser(description='Generate an SQL file to update the ontology terms in the core database based on the matching terms in... | 54.438272 | 591 | 0.666175 | #!/usr/bin/python
import MySQLdb as mdb
import psycopg2
import psycopg2.extras
import psycopg2.extensions
from psycopg2 import OperationalError
import sys
import argparse
parser = argparse.ArgumentParser(description='Generate an SQL file to update the ontology terms in the core database based on the matching terms in... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1962404f10e788ca65e007899f888e6147170f36 | 4,687 | py | Python | src/MPLayout/Figure.py | csiegl182/MPLayout | 68d7d30c38796e370e187f1b31ff70cd3e756162 | [
"MIT"
] | null | null | null | src/MPLayout/Figure.py | csiegl182/MPLayout | 68d7d30c38796e370e187f1b31ff70cd3e756162 | [
"MIT"
] | null | null | null | src/MPLayout/Figure.py | csiegl182/MPLayout | 68d7d30c38796e370e187f1b31ff70cd3e756162 | [
"MIT"
] | null | null | null |
##
| 36.617188 | 223 | 0.680393 | import matplotlib
import matplotlib.pyplot as mpl
from dataclasses import dataclass
from typing import Callable, List
import os
import numpy
import pkg_resources
def get_mplstyle_path(style: str):
return pkg_resources.resource_filename('MPLayout', os.path.join('mplstyles', style + '.mplstyle'))
def new_figure(sty... | 0 | 150 | 0 | 1,448 | 0 | 2,574 | 0 | 8 | 502 |
7cfed758f72efd2d83f83aa742d1af06f10e7817 | 7,527 | py | Python | senior/TBEFN/predict_TBEFN.py | LeiGitHub1024/lowlight | 86649ae4275b8908d39561792a8068d391318f8d | [
"MIT"
] | null | null | null | senior/TBEFN/predict_TBEFN.py | LeiGitHub1024/lowlight | 86649ae4275b8908d39561792a8068d391318f8d | [
"MIT"
] | null | null | null | senior/TBEFN/predict_TBEFN.py | LeiGitHub1024/lowlight | 86649ae4275b8908d39561792a8068d391318f8d | [
"MIT"
] | null | null | null | """
# -*- coding:utf-8 -*-
# @Time : 2019/5/4 20:24
# @Author : KUN LU @ SXU
# @Email : lukun199@gmail.com
# @Github : lukun199
"""
from __future__ import division
#import sys
import os, time
# import matplotlib.pyplot as plt
import tensorflow as tf
import tensorflow.contrib.slim as slim
import... | 41.585635 | 132 | 0.620433 | """
# -*- coding:utf-8 -*-
# @Time : 2019/5/4 20:24
# @Author : KUN LU @ SXU
# @Email : lukun199@gmail.com
# @Github : lukun199
"""
from __future__ import division
#import sys
import os, time
# import matplotlib.pyplot as plt
import tensorflow as tf
import tensorflow.contrib.slim as slim
import... | 153 | 0 | 0 | 0 | 0 | 4,633 | 0 | 0 | 175 |
e3088fc35f45a82bc2737b6c54697ce8970a2605 | 6,686 | py | Python | projetdrone-MissionControll/flightcommand.py | mariusweiler/raspberry-phantom2 | 39e9a85e6a9163618e4f49402f89dbdf6111dc9f | [
"MIT"
] | null | null | null | projetdrone-MissionControll/flightcommand.py | mariusweiler/raspberry-phantom2 | 39e9a85e6a9163618e4f49402f89dbdf6111dc9f | [
"MIT"
] | null | null | null | projetdrone-MissionControll/flightcommand.py | mariusweiler/raspberry-phantom2 | 39e9a85e6a9163618e4f49402f89dbdf6111dc9f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# import des fonctions de temps pour attendre
## import de grovepi adresse 4
## import du grovepi adresse 3
## import de la division reele qui retourne un chiffre a virgule
| 73.472527 | 410 | 0.71373 | # -*- coding: utf-8 -*-
# import des fonctions de temps pour attendre
import time
## import de grovepi adresse 4
import grovepi
## import du grovepi adresse 3
import grovepi3
## import de la division reele qui retourne un chiffre a virgule
from operator import truediv
class flightcommand:
## initialisation des vari... | 36 | 0 | 0 | 6,377 | 0 | 0 | 0 | -16 | 110 |
071c7bf9ca4121241e39992ae3d768dd0acc9c54 | 1,461 | py | Python | pyvisdk/do/vm_port_group_profile.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/do/vm_port_group_profile.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/do/vm_port_group_profile.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def VmPortGroupProfile(vim, *args, **kwargs):
'''The VmPortGroupProfile data object repre... | 38.447368 | 124 | 0.649555 |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def VmPortGroupProfile(vim, *args, **kwargs):
'''The VmPortGroupProfile data object repre... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
46773800e04d8319548ed25ab2a1a3e42483700b | 5,494 | py | Python | src/app.py | rewindio/aws-es-update-notifier | 0c4c8a9d2efac58046cfd7ba9e81f7f67d77e572 | [
"MIT"
] | null | null | null | src/app.py | rewindio/aws-es-update-notifier | 0c4c8a9d2efac58046cfd7ba9e81f7f67d77e572 | [
"MIT"
] | null | null | null | src/app.py | rewindio/aws-es-update-notifier | 0c4c8a9d2efac58046cfd7ba9e81f7f67d77e572 | [
"MIT"
] | null | null | null | import boto3
boto_session = boto3.session.Session()
es_client = boto_session.client('es')
ssm_client = boto_session.client('ssm')
iam_client = boto_session.client('iam')
| 49.053571 | 174 | 0.442847 | import json
import boto3
from botocore.exceptions import ClientError
import os
from slack import WebClient
from slack.errors import SlackApiError
boto_session = boto3.session.Session()
es_client = boto_session.client('es')
ssm_client = boto_session.client('ssm')
iam_client = boto_session.client('iam')
def get_aws_acc... | 0 | 0 | 0 | 0 | 0 | 5,121 | 0 | 23 | 179 |
bc6db2b6ef5b4593996b30437e553f766a7c65c4 | 719 | py | Python | raiden/network/proxies/utils.py | tirkarthi/raiden | dbd03ddda039332b54ec0c02d81cbe1100bc8028 | [
"MIT"
] | 2,101 | 2016-06-01T11:31:49.000Z | 2022-03-27T20:13:19.000Z | raiden/network/proxies/utils.py | tirkarthi/raiden | dbd03ddda039332b54ec0c02d81cbe1100bc8028 | [
"MIT"
] | 5,291 | 2016-06-01T18:14:04.000Z | 2022-03-31T11:19:09.000Z | raiden/network/proxies/utils.py | tirkarthi/raiden | dbd03ddda039332b54ec0c02d81cbe1100bc8028 | [
"MIT"
] | 484 | 2016-06-01T18:21:06.000Z | 2022-03-22T10:29:45.000Z | from raiden.exceptions import RaidenUnrecoverableError
from raiden.utils.formatting import format_block_id
from raiden.utils.typing import BlockIdentifier, NoReturn
def raise_on_call_returned_empty(given_block_identifier: BlockIdentifier) -> NoReturn:
"""Format a message and raise RaidenUnrecoverableError."""
... | 42.294118 | 86 | 0.752434 | from raiden.exceptions import RaidenUnrecoverableError
from raiden.utils.formatting import format_block_id
from raiden.utils.typing import BlockIdentifier, NoReturn
def raise_on_call_returned_empty(given_block_identifier: BlockIdentifier) -> NoReturn:
"""Format a message and raise RaidenUnrecoverableError."""
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4e04886fa95c43d0eb8613ef4407b50921568a29 | 242 | py | Python | Program File/WAP2.py | cyph3r-exe/python-practice-files | d95dd5eb14378c4f08fe4354d66356e3128de54e | [
"Apache-2.0"
] | null | null | null | Program File/WAP2.py | cyph3r-exe/python-practice-files | d95dd5eb14378c4f08fe4354d66356e3128de54e | [
"Apache-2.0"
] | null | null | null | Program File/WAP2.py | cyph3r-exe/python-practice-files | d95dd5eb14378c4f08fe4354d66356e3128de54e | [
"Apache-2.0"
] | null | null | null | #Debangshu Roy
#WAP to add input no. in inches and display in cms to program list
oldvalue = int(input("Enter your number in inches "))
inches(oldvalue)
| 24.2 | 66 | 0.698347 | #Debangshu Roy
#WAP to add input no. in inches and display in cms to program list
def inches(value):
cms = value*2.54
print("The given lenth in cms is ", cms)
oldvalue = int(input("Enter your number in inches "))
inches(oldvalue)
| 0 | 0 | 0 | 0 | 0 | 63 | 0 | 0 | 24 |
616db53f745f376766e0e74de7ba9d7078ce39c4 | 3,090 | py | Python | src/sentry/web/frontend/create_project.py | ChadKillingsworth/sentry | ffcb9007a95a83ee267935fe605f8ee8f03a85a5 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/web/frontend/create_project.py | ChadKillingsworth/sentry | ffcb9007a95a83ee267935fe605f8ee8f03a85a5 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/web/frontend/create_project.py | ChadKillingsworth/sentry | ffcb9007a95a83ee267935fe605f8ee8f03a85a5 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
ERR_NO_TEAMS = 'You cannot create a new project because there are no teams to assign it to.'
| 33.586957 | 95 | 0.654369 | from __future__ import absolute_import
from django import forms
from django.contrib import messages
from django.core.urlresolvers import reverse
from sentry.models import (
OrganizationMember, OrganizationMemberType, Project, Team
)
from sentry.web.forms.add_project import AddProjectForm
from sentry.web.frontend.... | 0 | 0 | 0 | 2,598 | 0 | 0 | 0 | 176 | 180 |
d41f67967a99e1b1ab5280dcea22b87c5d6fe9df | 750 | py | Python | generate_files.py | sharkbound/advent_of_code_2016 | e655974b2dea422af4ec1debad296ee6c22d690a | [
"MIT"
] | null | null | null | generate_files.py | sharkbound/advent_of_code_2016 | e655974b2dea422af4ec1debad296ee6c22d690a | [
"MIT"
] | null | null | null | generate_files.py | sharkbound/advent_of_code_2016 | e655974b2dea422af4ec1debad296ee6c22d690a | [
"MIT"
] | null | null | null | from pathlib import Path
from sys import argv
if len(argv) == 1:
day = int(input('day? '))
else:
day = int(argv[1])
day_folder = Path(f'day{day}/')
make_files(day_folder, 'data.txt', 'part1.py', 'part2.py', 'notes.md')
| 19.230769 | 70 | 0.606667 | from builtins import SystemError
from pathlib import Path
from sys import argv
from typing import Union
if len(argv) == 1:
day = int(input('day? '))
else:
day = int(argv[1])
def make_files(day_folder: Path, *files: Union[str, Path]):
if not day_folder.exists():
day_folder.mkdir(parents=True)
... | 0 | 0 | 0 | 0 | 0 | 438 | 0 | 14 | 67 |
1f8e22688b05f6b5049e8f2cee683f3a0e997a60 | 2,660 | py | Python | redbean/reactive/specs.py | lcgong/redbean | 4e3a075567336db3f5469c5bc7dc009b5a24071c | [
"Apache-2.0"
] | 4 | 2017-08-26T10:03:59.000Z | 2022-02-17T20:46:02.000Z | redbean/reactive/specs.py | lcgong/redbean | 4e3a075567336db3f5469c5bc7dc009b5a24071c | [
"Apache-2.0"
] | 1 | 2018-06-04T10:57:28.000Z | 2018-06-04T10:57:28.000Z | redbean/reactive/specs.py | lcgong/redbean | 4e3a075567336db3f5469c5bc7dc009b5a24071c | [
"Apache-2.0"
] | null | null | null | from typing import Callable, Awaitable, Any
HandlerType = Callable[..., Awaitable[Any]]
| 28.602151 | 76 | 0.658271 |
import functools
from typing import Callable, Awaitable, Any
HandlerType = Callable[..., Awaitable[Any]]
class ListenerSpec:
__slots__ = ("topic_expr", "handler", "group_id")
def __init__(self, topic_expr: str, handler: HandlerType):
self.topic_expr = topic_expr
self.handler = handler
... | 78 | 207 | 393 | 1,794 | 0 | 0 | 0 | 10 | 137 |
e0551a7f555c95c837ea468ad85fe0295c3bb83b | 16,157 | py | Python | smore/models/beta.py | isabella232/smore | 02e5a89e84a805eed632eefbdecd957d95e202d4 | [
"Apache-2.0"
] | 78 | 2021-10-31T23:20:26.000Z | 2022-03-21T01:07:01.000Z | smore/models/beta.py | google-research/smore | e4ba95a7466ef7d018987bce7688b77bf2ea7e4f | [
"Apache-2.0"
] | 4 | 2021-11-02T13:45:38.000Z | 2022-02-17T04:18:32.000Z | smore/models/beta.py | pyg-team/smore | 02e5a89e84a805eed632eefbdecd957d95e202d4 | [
"Apache-2.0"
] | 15 | 2021-11-02T23:55:29.000Z | 2022-03-19T10:30:51.000Z | # Copyright 2021 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,... | 52.288026 | 264 | 0.630129 | # Copyright 2021 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,... | 0 | 0 | 0 | 14,926 | 0 | 0 | 0 | 229 | 291 |
efdba53aa00a559d2c77d76f103cae0ad25e70e6 | 253 | py | Python | example/main.py | zx013/pyvoxel | 4d886b25a3430dbd54863bf433c2eebbd030d0f4 | [
"MIT"
] | null | null | null | example/main.py | zx013/pyvoxel | 4d886b25a3430dbd54863bf433c2eebbd030d0f4 | [
"MIT"
] | null | null | null | example/main.py | zx013/pyvoxel | 4d886b25a3430dbd54863bf433c2eebbd030d0f4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from pyvoxel.log import Log
from pyvoxel.manager import Manager
if __name__ == '__main__':
log_test()
Log.error('Error')
p = Manager.auto_load()
print(p)
| 21.083333 | 36 | 0.592885 | # -*- coding: utf-8 -*-
from pyvoxel.log import Log
from pyvoxel.manager import Manager
if __name__ == '__main__':
def log_test():
Log.debug('Debug')
log_test()
Log.error('Error')
p = Manager.auto_load()
print(p)
| 0 | 0 | 0 | 0 | 0 | 22 | 0 | 0 | 27 |
dbb3d433f54cbaa0deb5b7a60a9e0cac74b3920d | 15,619 | py | Python | python/redmonster/physics/pixelsplines.py | tskisner/redmonster | 57f31d66259ec92c0fb5c60c202c419028c1b9cf | [
"CNRI-Python"
] | null | null | null | python/redmonster/physics/pixelsplines.py | tskisner/redmonster | 57f31d66259ec92c0fb5c60c202c419028c1b9cf | [
"CNRI-Python"
] | 2 | 2016-06-16T08:33:39.000Z | 2016-06-16T13:23:59.000Z | python/redmonster/physics/pixelsplines.py | julienguy/redlantern | ba92b0951d8af56693b210b1f51254a6a11dc17a | [
"CNRI-Python"
] | null | null | null | # pixelsplines.py
# Pixel-integrated sline utilities.
# Written by A. Bolton, U. of Utah, 2010-2013.
import numpy as n
from scipy import linalg as la
from scipy import sparse as sp
from scipy import special as sf
def compute_duck_slopes(pixbound, flux):
"""
Compute the slope of the illuminating quadratic ... | 45.40407 | 80 | 0.584673 | # pixelsplines.py
# Pixel-integrated sline utilities.
# Written by A. Bolton, U. of Utah, 2010-2013.
import numpy as n
from scipy import linalg as la
from scipy import sparse as sp
from scipy import special as sf
def compute_duck_slopes(pixbound, flux):
"""
Compute the slope of the illuminating quadratic ... | 0 | 0 | 0 | 10,082 | 0 | 0 | 0 | 0 | 69 |
bba7d66222da2af05f6a32b36d7582a900766e87 | 3,633 | py | Python | src/File.py | ytyaru/Python.File.Dir.Stat.20180402093000 | f66e5eff603c62e24dd25f4aea034ce288059c66 | [
"CC0-1.0"
] | null | null | null | src/File.py | ytyaru/Python.File.Dir.Stat.20180402093000 | f66e5eff603c62e24dd25f4aea034ce288059c66 | [
"CC0-1.0"
] | null | null | null | src/File.py | ytyaru/Python.File.Dir.Stat.20180402093000 | f66e5eff603c62e24dd25f4aea034ce288059c66 | [
"CC0-1.0"
] | null | null | null | import os
| 43.771084 | 194 | 0.629232 | import os, os.path, pathlib, shutil
from Stat import Stat
class File(Stat):
def __init__(self, path):
if not os.path.isabs(path): raise ValueError('引数pathは絶対パスにしてください。path=\'{}\''.format(path))
super().__init__(path)
def mk(self, path=None):
if path is not None and os.path.isabs(path) ... | 465 | 959 | 0 | 2,438 | 0 | 0 | 0 | 26 | 45 |
852dce101de13404757f08f03cc79527ac4ad765 | 998 | py | Python | Contributions/nQueen.py | sattwik21/Hacktoberfest2021-1 | 74c8edd54f9c967c0f301f74dec31526dffa8222 | [
"MIT"
] | 215 | 2021-10-01T08:18:16.000Z | 2022-03-29T04:12:03.000Z | Contributions/nQueen.py | sattwik21/Hacktoberfest2021-1 | 74c8edd54f9c967c0f301f74dec31526dffa8222 | [
"MIT"
] | 51 | 2021-10-01T08:16:42.000Z | 2021-10-31T13:51:51.000Z | Contributions/nQueen.py | sattwik21/Hacktoberfest2021-1 | 74c8edd54f9c967c0f301f74dec31526dffa8222 | [
"MIT"
] | 807 | 2021-10-01T08:11:45.000Z | 2021-11-21T18:57:09.000Z |
n = int(input())
solution = [[0 for i in range(n)] for j in range(n)]
for j in range(n) :
nQueen(0, j, n, solution)
| 22.681818 | 52 | 0.465932 |
def isPoss(i, j, matrix) :
for k in range(i) :
if matrix[k][j] == 1 : return False
for l in range(j) :
if matrix[i][l] == 1 : return False
k, l = i-1, j-1
while k>=0 and l>=0 :
if matrix[k][l] == 1 : return False
k, l = k-1, l-1
k, l = i-1, j+1
... | 0 | 0 | 0 | 0 | 0 | 827 | 0 | 0 | 50 |
b95b936937e1f3a8196fa97a04c875ad44bcfa2f | 12,306 | py | Python | gevent/pool.py | bkad/gevent | 185b71cc472db413515059ab4a197207cdaf1f6c | [
"MIT"
] | 2 | 2015-12-19T01:34:43.000Z | 2018-02-02T12:32:01.000Z | gevent/pool.py | alex/gevent | 454a77ca561868854760b2d9cbfa3bf3bbd2e062 | [
"MIT"
] | null | null | null | gevent/pool.py | alex/gevent | 454a77ca561868854760b2d9cbfa3bf3bbd2e062 | [
"MIT"
] | 2 | 2019-11-24T12:11:50.000Z | 2020-12-26T19:00:20.000Z | # Copyright (c) 2009-2011 Denis Bilenko. See LICENSE for details.
"""Managing greenlets in a group.
The :class:`Group` class in this module abstracts a group of running greenlets.
When a greenlet dies, it's automatically removed from the group.
The :class:`Pool` which a subclass of :class:`Group` provides a way to li... | 30.688279 | 124 | 0.573704 | # Copyright (c) 2009-2011 Denis Bilenko. See LICENSE for details.
"""Managing greenlets in a group.
The :class:`Group` class in this module abstracts a group of running greenlets.
When a greenlet dies, it's automatically removed from the group.
The :class:`Pool` which a subclass of :class:`Group` provides a way to li... | 0 | 0 | 0 | 11,355 | 0 | 0 | 0 | 119 | 294 |
45cb9ce86ce46ee40a4f96a29f1f0759cef62cd4 | 2,834 | py | Python | app/settings.py | shenhaizhumin/fastapi-demo | bce6ec556b1058f3b213e2698075d72033c2162d | [
"Apache-2.0"
] | null | null | null | app/settings.py | shenhaizhumin/fastapi-demo | bce6ec556b1058f3b213e2698075d72033c2162d | [
"Apache-2.0"
] | null | null | null | app/settings.py | shenhaizhumin/fastapi-demo | bce6ec556b1058f3b213e2698075d72033c2162d | [
"Apache-2.0"
] | null | null | null | import os
import configparser
# from fastapi.logger import logger
# from logging.handlers import RotatingFileHandler
import logging
formatter = logging.Formatter(
"(%(asctime)s.%(msecs)03d) %(levelname)s (%(thread)d) - %(message)s", "%Y-%m-%d %H:%M:%S")
# import re
# import yaml
#
# path_matcher = re.compile(r'.... | 32.574713 | 117 | 0.695483 | import os
import configparser
import redis
from passlib.context import CryptContext
from app.util.log_util2 import get_path, get_logger
from pydantic import BaseSettings, Field
# from fastapi.logger import logger
# from logging.handlers import RotatingFileHandler
import logging
formatter = logging.Formatter(
"(%(... | 18 | 0 | 0 | 1,389 | 0 | 0 | 0 | 59 | 111 |
7fd28b1257d684a486e683748c33d57b2368aca7 | 23,962 | py | Python | geco/attrgenfunct.py | kdurril/mvp_app | dfe7ef75e4a49d9bce3cb50c29f1a6d25a15361d | [
"MIT"
] | null | null | null | geco/attrgenfunct.py | kdurril/mvp_app | dfe7ef75e4a49d9bce3cb50c29f1a6d25a15361d | [
"MIT"
] | null | null | null | geco/attrgenfunct.py | kdurril/mvp_app | dfe7ef75e4a49d9bce3cb50c29f1a6d25a15361d | [
"MIT"
] | null | null | null | # Functions that can generate attribute values.
#
# These are functions that can be used in the GenerateFuncAttribute() class
# (see module generator.py). They generate values according to some internal
# functionality.
#
# The requirement of any such functions are:
# 1) that it must return a string
# 2) it can... | 32.034759 | 91 | 0.562057 | # Functions that can generate attribute values.
#
# These are functions that can be used in the GenerateFuncAttribute() class
# (see module generator.py). They generate values according to some internal
# functionality.
#
# The requirement of any such functions are:
# 1) that it must return a string
# 2) it can... | 0 | 0 | 0 | 0 | 0 | 284 | 0 | -11 | 125 |
548255d2dbe0cab9d4fa99c132b58e09a06d7d2c | 6,166 | py | Python | mkdocs_terraform_monorepo_plugin/parser.py | wtc-cloud-eng/mkdocs-terraform-monorepo-plugin | a6bb70638219ae358e66923640d958608196b082 | [
"Apache-2.0"
] | 3 | 2021-03-11T13:53:42.000Z | 2021-03-12T12:06:00.000Z | mkdocs_terraform_monorepo_plugin/parser.py | wtc-cloud-eng/mkdocs-terraform-monorepo-plugin | a6bb70638219ae358e66923640d958608196b082 | [
"Apache-2.0"
] | 53 | 2021-03-26T18:05:22.000Z | 2022-03-28T13:12:33.000Z | mkdocs_terraform_monorepo_plugin/parser.py | wtc-cloud-eng/mkdocs-terraform-monorepo-plugin | a6bb70638219ae358e66923640d958608196b082 | [
"Apache-2.0"
] | null | null | null | import logging
from mkdocs.utils import warning_filter
log = logging.getLogger(__name__)
log.addFilter(warning_filter)
INCLUDE_STATEMENT = "!tf_modules_root "
# TODO should make these config variables in mkdocs.yml
DOCUMENT_FILE_NAME = 'README.md'
NAVIGATION_KEY_NAME = 'About'
| 39.273885 | 104 | 0.554817 | import logging
import os
import copy
from pathlib import Path
from mkdocs.utils import warning_filter
log = logging.getLogger(__name__)
log.addFilter(warning_filter)
INCLUDE_STATEMENT = "!tf_modules_root "
# TODO should make these config variables in mkdocs.yml
DOCUMENT_FILE_NAME = 'README.md'
NAVIGATION_KEY_NAME = ... | 0 | 0 | 0 | 5,790 | 0 | 0 | 0 | -19 | 112 |
c1d329add48daaf9b6c1f2cfa1999f82cfa7b64c | 202 | py | Python | samples/docs/simple.py | sidneyarcidiacono/coworks | 7f51b83e8699ced991d16a5a43ad19e569b6e814 | [
"MIT"
] | null | null | null | samples/docs/simple.py | sidneyarcidiacono/coworks | 7f51b83e8699ced991d16a5a43ad19e569b6e814 | [
"MIT"
] | null | null | null | samples/docs/simple.py | sidneyarcidiacono/coworks | 7f51b83e8699ced991d16a5a43ad19e569b6e814 | [
"MIT"
] | null | null | null |
app = SimpleMicroService()
| 14.428571 | 43 | 0.727723 | from coworks import TechMicroService
from coworks import entry
class SimpleMicroService(TechMicroService):
@entry
def get(self):
return "Hello world.\n"
app = SimpleMicroService()
| 0 | 36 | 0 | 22 | 0 | 0 | 0 | 19 | 94 |
98dcad3246ee4b1c4180827431f1ba0900947c7c | 4,013 | py | Python | whois/whois.py | jacobdshimer/Python-Misc-Scripts | d3a33d78542ef0492939334d176f231fb363f894 | [
"MIT"
] | null | null | null | whois/whois.py | jacobdshimer/Python-Misc-Scripts | d3a33d78542ef0492939334d176f231fb363f894 | [
"MIT"
] | null | null | null | whois/whois.py | jacobdshimer/Python-Misc-Scripts | d3a33d78542ef0492939334d176f231fb363f894 | [
"MIT"
] | null | null | null | import urllib3
import csv
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# TODO: Add in reverse lookup
csvfile = open('countries_by_rir.csv', 'r')
readcsv = csv.reader(csvfile, delimiter=',')
rir = {'AFRINIC': [],
'APNIC': [],
'ARIN': [],
'RIPE NCC': [],
'LACNIC': ... | 37.858491 | 146 | 0.427859 | import urllib3
import csv
import os
import json
import arin
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# TODO: Add in reverse lookup
csvfile = open('countries_by_rir.csv', 'r')
readcsv = csv.reader(csvfile, delimiter=',')
rir = {'AFRINIC': [],
'APNIC': [],
'ARIN': [],
... | 0 | 0 | 0 | 0 | 0 | 3,459 | 0 | -32 | 112 |
680252ce879d90c59db8b12d25a4d27573909ee8 | 535 | py | Python | publish.py | jpbarto/redis_benchmark | 0a926f45d9955aa4d03795b9e363bf1a85011c91 | [
"Apache-2.0"
] | null | null | null | publish.py | jpbarto/redis_benchmark | 0a926f45d9955aa4d03795b9e363bf1a85011c91 | [
"Apache-2.0"
] | null | null | null | publish.py | jpbarto/redis_benchmark | 0a926f45d9955aa4d03795b9e363bf1a85011c91 | [
"Apache-2.0"
] | null | null | null | import redis
import json
import uuid
import time
HOST = 'localhost'
PORT = 6379
MSG_COUNT = 250000
r = redis.Redis (host = HOST, port = PORT)
pub = r.pubsub ()
sender_id = uuid.uuid4 ()
start_time = time.time ()
for i in range (MSG_COUNT):
data = {"sender_id": str(sender_id), "message_id": i, "body": "I am mess... | 25.47619 | 118 | 0.676636 | import redis
import json
import uuid
import time
HOST = 'localhost'
PORT = 6379
MSG_COUNT = 250000
r = redis.Redis (host = HOST, port = PORT)
pub = r.pubsub ()
sender_id = uuid.uuid4 ()
start_time = time.time ()
for i in range (MSG_COUNT):
data = {"sender_id": str(sender_id), "message_id": i, "body": "I am mess... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7695cce9e1bb37ade56725cc1738bb7551d90a27 | 1,981 | py | Python | backend/flask_app/api/wallet.py | zIPjahoda/Flask-Angular | a31bfdd27aa30fffd6cacd6f27305f523879e710 | [
"MIT"
] | null | null | null | backend/flask_app/api/wallet.py | zIPjahoda/Flask-Angular | a31bfdd27aa30fffd6cacd6f27305f523879e710 | [
"MIT"
] | null | null | null | backend/flask_app/api/wallet.py | zIPjahoda/Flask-Angular | a31bfdd27aa30fffd6cacd6f27305f523879e710 | [
"MIT"
] | null | null | null | from flask import Blueprint
import logging
from flask_jwt_simple import (JWTManager)
from backend.flask_app.factory import create_app
wallet = Blueprint('wallet', __name__)
logger = logging.getLogger(__name__)
app = create_app()
jwt = JWTManager(app)
| 31.951613 | 108 | 0.720343 | from flask import Blueprint
import json
import logging
import traceback
from datetime import datetime
from flask import Response, request, jsonify, current_app
from gevent.wsgi import WSGIServer
from flask_jwt_simple import (
JWTManager, jwt_required, create_jwt, get_jwt_identity, get_jwt
)
from backend.flask_app... | 0 | 1,307 | 0 | 0 | 0 | 0 | 0 | 219 | 201 |
cbbdaa273a9753aa6dd34408775ff7f313bfeb7e | 790 | py | Python | MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-2/PSET-1/countingBobs.py | lilsweetcaligula/MIT6.00.1x | ee2902782a08ff685e388b2f40c09ea8c9c5fcfe | [
"MIT"
] | null | null | null | MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-2/PSET-1/countingBobs.py | lilsweetcaligula/MIT6.00.1x | ee2902782a08ff685e388b2f40c09ea8c9c5fcfe | [
"MIT"
] | null | null | null | MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-2/PSET-1/countingBobs.py | lilsweetcaligula/MIT6.00.1x | ee2902782a08ff685e388b2f40c09ea8c9c5fcfe | [
"MIT"
] | null | null | null | """
PSET-1
Counting Bobs
Assume s is a string of lower case characters.
Write a program that prints the number of times the string 'bob'
occurs in s. For example, if s = 'azcbobobegghakl', then your
program should print:
Number of times bob occurs is: 2
"""
py_main()
| 21.351351 | 65 | 0.588608 | """
PSET-1
Counting Bobs
Assume s is a string of lower case characters.
Write a program that prints the number of times the string 'bob'
occurs in s. For example, if s = 'azcbobobegghakl', then your
program should print:
Number of times bob occurs is: 2
"""
def countPal(target, pal):
midPoint = int(len... | 0 | 0 | 0 | 0 | 0 | 455 | 0 | 0 | 54 |
31b4d4041b346080b3c99bf0b972817cb29cc91f | 1,056 | py | Python | setup.py | MLResearchAtOSRAM/cause2e | 9420e88802172b893d4029b741dfd3e5e718880b | [
"MIT"
] | 33 | 2021-05-18T13:03:54.000Z | 2022-02-17T16:50:48.000Z | setup.py | MLResearchAtOSRAM/cause2e | 9420e88802172b893d4029b741dfd3e5e718880b | [
"MIT"
] | 11 | 2021-09-17T07:27:38.000Z | 2022-03-29T07:04:33.000Z | setup.py | MLResearchAtOSRAM/cause2e | 9420e88802172b893d4029b741dfd3e5e718880b | [
"MIT"
] | 1 | 2021-11-15T12:22:51.000Z | 2021-11-15T12:22:51.000Z | import setuptools
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
setuptools.setup(
name="cause2e",
version="0.2.0",
author="Daniel Gruenbaum",
author_email="daniel.gruenbaum@ams-osram.com",
description="A package for end-to-end causal analysis",
... | 28.540541 | 60 | 0.585227 | import setuptools
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
setuptools.setup(
name="cause2e",
version="0.2.0",
author="Daniel Gruenbaum",
author_email="daniel.gruenbaum@ams-osram.com",
description="A package for end-to-end causal analysis",
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d48c2ef6acdd3722de0456719e1c6ed9281ed527 | 132 | py | Python | src/deep_dialog/models/nlg/convert.py | gzpbbd/DDQ | 44f4d2bf27c4299d349339de7bc85d1b9b640c50 | [
"MIT"
] | 141 | 2018-05-23T02:20:36.000Z | 2022-03-20T21:49:03.000Z | D3Q/src/deep_dialog/models/nlg/convert.py | yanglongfei908/D3Q | eb9cb05ffc3c22fcd4972371a987dbacab3e4ff6 | [
"MIT"
] | 10 | 2018-05-25T07:08:16.000Z | 2021-05-23T08:36:20.000Z | D3Q/src/deep_dialog/models/nlg/convert.py | yanglongfei908/D3Q | eb9cb05ffc3c22fcd4972371a987dbacab3e4ff6 | [
"MIT"
] | 44 | 2018-07-17T10:14:07.000Z | 2021-09-11T07:19:43.000Z | import cPickle
model=cPickle.load(open('lstm_tanh_relu_[1468202263.38]_2_0.610.p'))
cPickle.dump(model,open('model.bin.nlg','wb')) | 44 | 69 | 0.765152 | import cPickle
model=cPickle.load(open('lstm_tanh_relu_[1468202263.38]_2_0.610.p'))
cPickle.dump(model,open('model.bin.nlg','wb')) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cf22a43cb28da76dd9e14ea02ae3c02acf643632 | 70 | py | Python | controller/controller/__init__.py | FilippoRanza/rr-scheduler | 8fc06f9d0ffe514ab6a94fd8a330f1cfd45b56c3 | [
"MIT"
] | 1 | 2022-01-13T13:59:28.000Z | 2022-01-13T13:59:28.000Z | controller/controller/__init__.py | FilippoRanza/rr-scheduler | 8fc06f9d0ffe514ab6a94fd8a330f1cfd45b56c3 | [
"MIT"
] | null | null | null | controller/controller/__init__.py | FilippoRanza/rr-scheduler | 8fc06f9d0ffe514ab6a94fd8a330f1cfd45b56c3 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
| 14 | 25 | 0.742857 | #! /usr/bin/python3
from . import get_best
from . import math_helper
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 45 |
5925eb09d90602cd2178221ab4c247113649ec3c | 918 | py | Python | core/type.py | kainstan/stealer | 5e363a70558454093c4ad3f0065366f2b99ef4f4 | [
"MIT"
] | null | null | null | core/type.py | kainstan/stealer | 5e363a70558454093c4ad3f0065366f2b99ef4f4 | [
"MIT"
] | null | null | null | core/type.py | kainstan/stealer | 5e363a70558454093c4ad3f0065366f2b99ef4f4 | [
"MIT"
] | null | null | null | import json
video_mapper = {item.value: item for item in Video.__members__.values() if item.enable}
video_mapper_json = []
for item in Video.__members__.values():
if not item.enable:
continue
video_mapper_json.append({
'label': item.label,
'value': item.value,
})
video_mapper_js... | 24.810811 | 87 | 0.620915 | import json
from enum import Enum, unique
@unique
class Video(Enum):
AUTO = '自动适配', 'auto', True
DOUYIN = '抖音', 'douyin', True
TIKTOK = 'TikTok', 'tiktok', True
KUAISHOU = '快手', 'kuaishou', True
HUOSHAN = '火山小视频', 'huoshan', True
XIGUA = ' 西瓜视频', 'xigua', False
PIPIXIA = '皮皮虾', 'pipixia', ... | 60 | 470 | 0 | 0 | 0 | 0 | 0 | 8 | 45 |
8d066504a7fa81e53bf316edc3ef322b6e28ad1e | 4,813 | py | Python | lib/googlecloudsdk/command_lib/asset/flags.py | kylewuolle/google-cloud-sdk | 75f09ebe779e99fdc3fd13b48621fe12bfaa11aa | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/asset/flags.py | kylewuolle/google-cloud-sdk | 75f09ebe779e99fdc3fd13b48621fe12bfaa11aa | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/asset/flags.py | kylewuolle/google-cloud-sdk | 75f09ebe779e99fdc3fd13b48621fe12bfaa11aa | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2018 Google 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 requir... | 36.462121 | 80 | 0.67006 | # -*- coding: utf-8 -*- #
# Copyright 2018 Google 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 requir... | 0 | 0 | 0 | 0 | 0 | 2,907 | 0 | 26 | 207 |
393a6e5e32f57b74dc75ac6425a9355ea05c3fba | 1,597 | py | Python | graph4ipy/jgfio.py | agapow/graph4ipy | 447a7361d5e78304460f3a46971cb62ab26d548f | [
"MIT"
] | null | null | null | graph4ipy/jgfio.py | agapow/graph4ipy | 447a7361d5e78304460f3a46971cb62ab26d548f | [
"MIT"
] | null | null | null | graph4ipy/jgfio.py | agapow/graph4ipy | 447a7361d5e78304460f3a46971cb62ab26d548f | [
"MIT"
] | null | null | null | """
Reading and writing JGF format graphs.
"""
### IMPORTS
### CONSTANTS & DEFINES
### CODE ###
| 27.534483 | 89 | 0.608641 | """
Reading and writing JGF format graphs.
"""
### IMPORTS
import json
### CONSTANTS & DEFINES
### CODE ###
class JgfReader (object):
# XXX: maybe look at a custom decoder/loader?
def parse (self, str_or_file):
# NOTE: try to decode multiple objects: MultiGraph, SingleGraph or Graph
# XXX: do w... | 0 | 0 | 0 | 1,461 | 0 | 0 | 0 | -10 | 46 |
3ff5e8b4281d311e8e44b442abc96ec7cc202046 | 7,765 | py | Python | proteus/tests/LS_with_edgeBased_EV/VOF/test_vof.py | dloney/proteus | 615cdf57f765b2e99bac904bb6eb71e39e58ab56 | [
"MIT"
] | null | null | null | proteus/tests/LS_with_edgeBased_EV/VOF/test_vof.py | dloney/proteus | 615cdf57f765b2e99bac904bb6eb71e39e58ab56 | [
"MIT"
] | null | null | null | proteus/tests/LS_with_edgeBased_EV/VOF/test_vof.py | dloney/proteus | 615cdf57f765b2e99bac904bb6eb71e39e58ab56 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Test module for VOF with EV
"""
from __future__ import absolute_import
from proteus import Comm
comm = Comm.get()
Profiling.logLevel=2
Profiling.verbose=True
| 38.825 | 80 | 0.523889 | #!/usr/bin/env python
"""
Test module for VOF with EV
"""
from __future__ import absolute_import
from builtins import object
from proteus.iproteus import *
from proteus import Comm
comm = Comm.get()
Profiling.logLevel=2
Profiling.verbose=True
import numpy as np
import tables
from . import thelper_vof
from . import the... | 0 | 63 | 0 | 7,320 | 0 | 0 | 0 | 20 | 178 |
600f817de7371c0681cdf874cff69364d4981fec | 1,637 | py | Python | k2/python/k2/fsa_properties.py | Jarvan-Wang/k2 | 7f164ecb804d15006fd30e8564d80e0fa212f011 | [
"Apache-2.0"
] | 1 | 2021-03-03T03:30:40.000Z | 2021-03-03T03:30:40.000Z | k2/python/k2/fsa_properties.py | Jarvan-Wang/k2 | 7f164ecb804d15006fd30e8564d80e0fa212f011 | [
"Apache-2.0"
] | null | null | null | k2/python/k2/fsa_properties.py | Jarvan-Wang/k2 | 7f164ecb804d15006fd30e8564d80e0fa212f011 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 Mobvoi Inc. (authors: Fangjun Kuang)
# Xiaomi Corporation (authors: Haowen Qiu)
#
# See ../../../LICENSE for clarification regarding multiple authors
import _k2
# The FSA properties are a bit-field; these constants can be used
# with '&' to determine the properties.
... | 34.829787 | 80 | 0.709224 | # Copyright (c) 2020 Mobvoi Inc. (authors: Fangjun Kuang)
# Xiaomi Corporation (authors: Haowen Qiu)
#
# See ../../../LICENSE for clarification regarding multiple authors
import torch # noqa
import _k2
# The FSA properties are a bit-field; these constants can be used
# with '&' to deter... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -9 | 31 |
1d4cbd29ad7f4886c5b362bdeccbf0638428eb2a | 1,212 | py | Python | configs.py | microsoft/nxs | b271c0637576084b36bd0bd397a673fb348913b3 | [
"MIT"
] | 5 | 2022-03-23T21:27:42.000Z | 2022-03-24T19:57:27.000Z | configs.py | microsoft/nxs | b271c0637576084b36bd0bd397a673fb348913b3 | [
"MIT"
] | null | null | null | configs.py | microsoft/nxs | b271c0637576084b36bd0bd397a673fb348913b3 | [
"MIT"
] | 1 | 2022-03-23T21:27:44.000Z | 2022-03-23T21:27:44.000Z | # Database info
MONGODB_DB_NAME = "NXS"
MONGODB_MODELS_COLLECTION_NAME = "Models"
MONGODB_PIPELINES_COLLECTION_NAME = "Pipelines"
MONGODB_W4_MODEL_PROFILES_COLLECTION_NAME = "W4Profiles"
# Storage info
STORAGE_MODEL_PATH = "models"
STORAGE_PREPROC_PATH = "preprocessing"
STORAGE_POSTPROC_PATH = "postprocessing"
STORAGE... | 29.560976 | 57 | 0.806931 | # Database info
MONGODB_DB_NAME = "NXS"
MONGODB_MODELS_COLLECTION_NAME = "Models"
MONGODB_PIPELINES_COLLECTION_NAME = "Pipelines"
MONGODB_W4_MODEL_PROFILES_COLLECTION_NAME = "W4Profiles"
# Storage info
STORAGE_MODEL_PATH = "models"
STORAGE_PREPROC_PATH = "preprocessing"
STORAGE_POSTPROC_PATH = "postprocessing"
STORAGE... | 0 | 0 | 0 | 548 | 0 | 0 | 0 | 0 | 91 |
3df2e92f7e304451ae09047afa971ea7d8e328b5 | 1,226 | py | Python | chromium/tools/telemetry/telemetry/core/network_controller.py | wedataintelligence/vivaldi-source | 22a46f2c969f6a0b7ca239a05575d1ea2738768c | [
"BSD-3-Clause"
] | 27 | 2016-04-27T01:02:03.000Z | 2021-12-13T08:53:19.000Z | chromium/tools/telemetry/telemetry/core/network_controller.py | wedataintelligence/vivaldi-source | 22a46f2c969f6a0b7ca239a05575d1ea2738768c | [
"BSD-3-Clause"
] | 2 | 2017-03-09T09:00:50.000Z | 2017-09-21T15:48:20.000Z | chromium/tools/telemetry/telemetry/core/network_controller.py | wedataintelligence/vivaldi-source | 22a46f2c969f6a0b7ca239a05575d1ea2738768c | [
"BSD-3-Clause"
] | 17 | 2016-04-27T02:06:39.000Z | 2019-12-18T08:07:00.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
| 36.058824 | 75 | 0.709625 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class NetworkController(object):
"""Control network settings and servers to simulate the Web.
Network changes include forwarding device ports to host p... | 0 | 0 | 0 | 1,040 | 0 | 0 | 0 | 0 | 23 |
55281a41f46df9fd13977f6cbe8b7bf74aadca4f | 4,995 | py | Python | weatherbot.py | kraused53/Project-Hermes | db1c0f759e9e59e4b926c7927726c5f458ef7db0 | [
"OML"
] | null | null | null | weatherbot.py | kraused53/Project-Hermes | db1c0f759e9e59e4b926c7927726c5f458ef7db0 | [
"OML"
] | null | null | null | weatherbot.py | kraused53/Project-Hermes | db1c0f759e9e59e4b926c7927726c5f458ef7db0 | [
"OML"
] | null | null | null | import OPEN_WEATHER_KEYS
# ----------------------------------------------------------------------------
"""
Use the datetime library to convert an integer unix timestamp and a unix
timezone offset to calculate string formated time and date.
Inputs:
dt -> Int
unix ... | 40.609756 | 130 | 0.545946 | import OPEN_WEATHER_KEYS
from requests import get, exceptions
from datetime import datetime
# ----------------------------------------------------------------------------
"""
Use the datetime library to convert an integer unix timestamp and a unix
timezone offset to calculate string formated time and date... | 0 | 0 | 0 | 0 | 0 | 1,004 | 0 | 23 | 88 |
bb635bcee607470ded8929e519323a7c0c4e2554 | 19,001 | py | Python | Evolife/Ecology/Alliances.py | antoorofino/Emergence_in_complex_systems_EVOLIFE | c36d3883326ea91b8d890666bf2b37b599141945 | [
"MIT"
] | null | null | null | Evolife/Ecology/Alliances.py | antoorofino/Emergence_in_complex_systems_EVOLIFE | c36d3883326ea91b8d890666bf2b37b599141945 | [
"MIT"
] | null | null | null | Evolife/Ecology/Alliances.py | antoorofino/Emergence_in_complex_systems_EVOLIFE | c36d3883326ea91b8d890666bf2b37b599141945 | [
"MIT"
] | null | null | null | #!/usr/bin/env python##############################################################################
#!/usr/bin/env python3
##############################################################################
# EVOLIFE http://evolife.telecom-paris.fr Jean-Louis Dessalles #
# Telecom Paris 2021 ... | 38.541582 | 139 | 0.625651 | #!/usr/bin/env python##############################################################################
#!/usr/bin/env python3
##############################################################################
# EVOLIFE http://evolife.telecom-paris.fr Jean-Louis Dessalles #
# Telecom Paris 2021 ... | 0 | 0 | 0 | 12,217 | 0 | 0 | 0 | 16 | 92 |
db8dc16caffaac1205f497668a199d8909d61214 | 1,460 | py | Python | min_mp3.py | amikey/audio_scripts | 3c6adc3c4e2a338590bb69e2a13c954bfd8cec46 | [
"MIT"
] | 6 | 2016-05-29T23:20:17.000Z | 2019-03-10T18:18:05.000Z | min_mp3.py | amikey/audio_scripts | 3c6adc3c4e2a338590bb69e2a13c954bfd8cec46 | [
"MIT"
] | null | null | null | min_mp3.py | amikey/audio_scripts | 3c6adc3c4e2a338590bb69e2a13c954bfd8cec46 | [
"MIT"
] | null | null | null | #!//Users/tkirke/anaconda/bin/python
# -*- coding: utf-8 -*-
import re
import sys, os
import codecs
from math import sqrt, log
from scipy.io.wavfile import read, write
from scipy import signal
import numpy
import matplotlib
import pylab
# Remove chunks more -27 db down from peak to remove audio 'gaps'
# optional plot ... | 23.934426 | 132 | 0.541096 | #!//Users/tkirke/anaconda/bin/python
# -*- coding: utf-8 -*-
import re
import sys,os
import codecs
from math import sqrt,log
from scipy.io.wavfile import read,write
from scipy import signal
import numpy
import matplotlib
import pylab
from lame import *
# Remove chunks more -27 db down from peak to remove audio 'gaps'
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -6 | 22 |
3c6755baeede12a1db47d023b18dd9493e78a17c | 2,620 | py | Python | application/bills/bills.py | akelshareif/fiscally | ca44ca00537d2b9ef1bca8a3a67b66427394dc72 | [
"MIT"
] | 1 | 2020-09-18T04:18:58.000Z | 2020-09-18T04:18:58.000Z | application/bills/bills.py | akelshareif/fiscally | ca44ca00537d2b9ef1bca8a3a67b66427394dc72 | [
"MIT"
] | null | null | null | application/bills/bills.py | akelshareif/fiscally | ca44ca00537d2b9ef1bca8a3a67b66427394dc72 | [
"MIT"
] | null | null | null | """ Bills routes """
from flask import Blueprint
bills_bp = Blueprint('bills', __name__, url_prefix='/user',
template_folder='templates')
| 28.172043 | 137 | 0.666794 | """ Bills routes """
from flask import Blueprint, render_template, redirect, request, url_for, flash
from flask_login import login_required, current_user
from application import db
from .bill_forms import BillForm
from ..models import Bill
bills_bp = Blueprint('bills', __name__, url_prefix='/user',
... | 0 | 2,172 | 0 | 0 | 0 | 0 | 0 | 103 | 180 |
1ef83bce037d82916bba554d8f49ad853081e5a7 | 5,986 | py | Python | coherence/upnp/core/soap_service.py | stonewell/Coherence | af7d2dc1224e705d172cee8a15d87f3abcccab2a | [
"MIT"
] | 112 | 2015-01-13T14:50:41.000Z | 2022-01-20T08:48:04.000Z | coherence/upnp/core/soap_service.py | stonewell/Coherence | af7d2dc1224e705d172cee8a15d87f3abcccab2a | [
"MIT"
] | 14 | 2015-01-26T21:54:14.000Z | 2020-01-19T19:28:52.000Z | coherence/upnp/core/soap_service.py | stonewell/Coherence | af7d2dc1224e705d172cee8a15d87f3abcccab2a | [
"MIT"
] | 40 | 2015-01-01T07:59:25.000Z | 2020-05-07T14:54:48.000Z | # Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2007 - Frank Scholz <coherence@beebits.net>
import coherence.extern.louie as louie
| 35.630952 | 105 | 0.600568 | # Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2007 - Frank Scholz <coherence@beebits.net>
from twisted.web import server, resource
from twisted.python import failure
from twisted.internet import defer
from coherence import log, SERVER_ID
from coherence.extern.et impor... | 0 | 0 | 0 | 5,458 | 0 | 0 | 0 | 141 | 205 |
a0879d95dd3d00d9199837cf041da7dad6c67c02 | 431 | py | Python | setup.py | ptcane/mkdocs-bulma | b40a90369ac273abb5fe45295cceadf5297ec356 | [
"MIT"
] | 6 | 2018-05-26T00:51:29.000Z | 2021-03-18T18:03:26.000Z | setup.py | ptcane/mkdocs-bulma | b40a90369ac273abb5fe45295cceadf5297ec356 | [
"MIT"
] | 4 | 2019-02-28T14:51:24.000Z | 2021-05-06T08:31:13.000Z | setup.py | ptcane/mkdocs-bulma | b40a90369ac273abb5fe45295cceadf5297ec356 | [
"MIT"
] | 10 | 2018-05-26T00:53:25.000Z | 2021-04-03T05:46:27.000Z | from setuptools import setup, find_packages
VERSION = "0.0.5"
setup(
name="mkdocs-bulma",
version=VERSION,
url="https://github.com/rajasimon/mkdocs-bulma",
license="MIT",
description="Bulma for mkdocs",
author="Raja Simon",
author_email="rajasimon@icloud.com",
packages=find_packages()... | 22.684211 | 55 | 0.675174 | from setuptools import setup, find_packages
VERSION = "0.0.5"
setup(
name="mkdocs-bulma",
version=VERSION,
url="https://github.com/rajasimon/mkdocs-bulma",
license="MIT",
description="Bulma for mkdocs",
author="Raja Simon",
author_email="rajasimon@icloud.com",
packages=find_packages()... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b2507f349e76a89f6be4354bfaf0a6719ddc192 | 17,147 | py | Python | window.py | Chapsjrl/Genetico2018-2 | e1bf4ccb0da422156d8df541be50965c1d79c2b2 | [
"MIT"
] | null | null | null | window.py | Chapsjrl/Genetico2018-2 | e1bf4ccb0da422156d8df541be50965c1d79c2b2 | [
"MIT"
] | null | null | null | window.py | Chapsjrl/Genetico2018-2 | e1bf4ccb0da422156d8df541be50965c1d79c2b2 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""GUI module generated by PAGE version 4.14.
# In conjunction with Tcl version 8.6
# Jun 04, 2018 08:42:31 PM
"""
import base64
try:
except ImportError:
try:
import ttk
py3 = False
except ImportError:
import tkinter.ttk as ttk
py3 = True
# spinbo... | 39.327982 | 79 | 0.619642 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""GUI module generated by PAGE version 4.14.
# In conjunction with Tcl version 8.6
# Jun 04, 2018 08:42:31 PM
"""
import base64
import sys
from GaQueens import GaQueens
try:
from Tkinter import *
except ImportError:
from tkinter import *
try:
import ... | 10 | 460 | 0 | 14,558 | 0 | 355 | 0 | -3 | 260 |
322dda659558109f88d9fdc1b584c49ba748b072 | 722 | py | Python | apps/medicamento/admin.py | alejandrobolivar/sist_inv_coesbicop | 36a068f21adb28f1f711b540841786538dbf8411 | [
"CC0-1.0"
] | null | null | null | apps/medicamento/admin.py | alejandrobolivar/sist_inv_coesbicop | 36a068f21adb28f1f711b540841786538dbf8411 | [
"CC0-1.0"
] | null | null | null | apps/medicamento/admin.py | alejandrobolivar/sist_inv_coesbicop | 36a068f21adb28f1f711b540841786538dbf8411 | [
"CC0-1.0"
] | null | null | null |
# Register your models here.
#admin.site.register(Medicamento) | 45.125 | 150 | 0.760388 | from django.contrib import admin
# Register your models here.
from apps.medicamento.models import Medicamento
#admin.site.register(Medicamento)
@admin.register(Medicamento)
class PostAdmin(admin.ModelAdmin):
list_display = ('cod_med', 'principio_activo_med', 'nombre_comercial_med', 'nombre_lab_med', 'grupo_med',... | 0 | 554 | 0 | 0 | 0 | 0 | 0 | 37 | 68 |
d3468bc4c6b972e250c94b3a6607f2ace5a9fe6c | 474 | py | Python | mtaa/migrations/0004_auto_20190914_1612.py | macymuhia/My_mtaa | ade06c1d30d8f293963ed09924419e3b3a881dbc | [
"MIT"
] | null | null | null | mtaa/migrations/0004_auto_20190914_1612.py | macymuhia/My_mtaa | ade06c1d30d8f293963ed09924419e3b3a881dbc | [
"MIT"
] | 8 | 2020-06-05T23:02:57.000Z | 2022-02-10T12:51:58.000Z | mtaa/migrations/0004_auto_20190914_1612.py | macymuhia/My_mtaa | ade06c1d30d8f293963ed09924419e3b3a881dbc | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-09-14 13:12
| 23.7 | 107 | 0.64135 | # Generated by Django 2.2.4 on 2019-09-14 13:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mtaa', '0003_auto_20190914_1607'),
]
operations = [
migrations.AlterField(
model_name='business... | 0 | 0 | 0 | 327 | 0 | 0 | 0 | 30 | 68 |
61f07c63c841bd7eb1642f0876d4c78eff8a1acb | 364 | py | Python | poker.py | JonLinC07/Poker | f21ea29acb5a9e674c665cf56033471634955e68 | [
"MIT"
] | null | null | null | poker.py | JonLinC07/Poker | f21ea29acb5a9e674c665cf56033471634955e68 | [
"MIT"
] | null | null | null | poker.py | JonLinC07/Poker | f21ea29acb5a9e674c665cf56033471634955e68 | [
"MIT"
] | null | null | null | from Dealer import Dealer
from Player import Player
dealer = Dealer()
player_name = input('Ingrese el nombre del jugador \n|>> ')
player = Player(player_name)
players = player.make_players()
players.append(player)
dealer.shuffle()
dealer.deal_cards(players)
for player in players:
print(player)
for card ... | 17.333333 | 59 | 0.722527 | from Dealer import Dealer
from Player import Player
dealer = Dealer()
player_name = input('Ingrese el nombre del jugador \n|>> ')
player = Player(player_name)
players = player.make_players()
players.append(player)
dealer.shuffle()
dealer.deal_cards(players)
for player in players:
print(player)
for card ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bc1a420a889f511f32028279e0393433650fda9a | 786 | py | Python | CUSTOM-SERVER/50-config.py | tdmorello/omero-docker-compose | 6c023615852ead560bbdc86542c3d30e838f3f27 | [
"BSD-2-Clause"
] | null | null | null | CUSTOM-SERVER/50-config.py | tdmorello/omero-docker-compose | 6c023615852ead560bbdc86542c3d30e838f3f27 | [
"BSD-2-Clause"
] | null | null | null | CUSTOM-SERVER/50-config.py | tdmorello/omero-docker-compose | 6c023615852ead560bbdc86542c3d30e838f3f27 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# 1. Run .omero files from /opt/omero/server/config/
# 2. Set omero config properties from CONFIG_ envvars
# Variable names should replace "." with "_" and "_" with "__"
# E.g. CONFIG_omero_web_public_enabled=false
import os
from subprocess import call
from re import sub
CONFIG_OMERO = '/... | 29.111111 | 71 | 0.620865 | #!/usr/bin/env python
# 1. Run .omero files from /opt/omero/server/config/
# 2. Set omero config properties from CONFIG_ envvars
# Variable names should replace "." with "_" and "_" with "__"
# E.g. CONFIG_omero_web_public_enabled=false
import os
from subprocess import call
from re import sub
CONFIG_OMERO = '/... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4c8808c50b2dd4ec244e24b3a2ff51b5549508b2 | 8,849 | py | Python | gpflux/layers/basis_functions/fourier_features/random.py | tensorlicious/GPflux | 8a2c66310b2a43b6259591ee142a29c618ef18be | [
"Apache-2.0"
] | null | null | null | gpflux/layers/basis_functions/fourier_features/random.py | tensorlicious/GPflux | 8a2c66310b2a43b6259591ee142a29c618ef18be | [
"Apache-2.0"
] | null | null | null | gpflux/layers/basis_functions/fourier_features/random.py | tensorlicious/GPflux | 8a2c66310b2a43b6259591ee142a29c618ef18be | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021 The GPflux 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 agr... | 38.641921 | 100 | 0.659623 | #
# Copyright (c) 2021 The GPflux 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 agr... | 0 | 216 | 0 | 7,360 | 0 | 0 | 0 | 319 | 272 |
39a07c09f6024565b3147c8504611623c2108b19 | 75 | py | Python | tests/__init__.py | Purg/SMQTK-Indexing | 24b5f875ec01a93f1c4842381a6de88041166604 | [
"BSD-3-Clause"
] | 82 | 2015-01-07T15:33:29.000Z | 2021-08-11T18:34:05.000Z | tests/__init__.py | Purg/SMQTK-Indexing | 24b5f875ec01a93f1c4842381a6de88041166604 | [
"BSD-3-Clause"
] | 230 | 2015-04-08T14:36:51.000Z | 2022-03-14T17:55:30.000Z | tests/__init__.py | Purg/SMQTK-Indexing | 24b5f875ec01a93f1c4842381a6de88041166604 | [
"BSD-3-Clause"
] | 65 | 2015-01-04T15:00:16.000Z | 2021-11-19T18:09:11.000Z | import os
TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
| 18.75 | 63 | 0.746667 | import os
TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b0bb9262cf421e6c6ef21d8135a4ed13a6df9c0c | 2,484 | py | Python | Chapter07/Ch7.AmazonSP.py | AcornPublishing/keras-projects | 1a8486a375af3bacf9aa78e93c9fc1736ac16d52 | [
"MIT"
] | null | null | null | Chapter07/Ch7.AmazonSP.py | AcornPublishing/keras-projects | 1a8486a375af3bacf9aa78e93c9fc1736ac16d52 | [
"MIT"
] | null | null | null | Chapter07/Ch7.AmazonSP.py | AcornPublishing/keras-projects | 1a8486a375af3bacf9aa78e93c9fc1736ac16d52 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
np.random.seed(3)
Data = pd.read_csv('AMZN.csv',header=0, usecols=['Date',
'Close'],parse_dates=True,index_col='Date')
print(Data.info())
print(Data.head())
print(Data.describe())
plt.figure(figsize=(10,5))
plt.plot(Data)
plt.show()
DataPCh = D... | 25.875 | 78 | 0.73591 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
np.random.seed(3)
Data = pd.read_csv('AMZN.csv',header=0, usecols=['Date',
'Close'],parse_dates=True,index_col='Date')
print(Data.info())
print(Data.head())
print(Data.describe())
plt.figure(figsize=(10,5))
plt.plot(Data)
plt.show()
DataPCh = D... | 0 | 0 | 0 | 0 | 0 | 260 | 0 | 0 | 23 |
7f50763a80caa2b617b0e496c76ddba132736dd1 | 752 | py | Python | tpu_main.py | shfshf/seq2annotation | d4bf88a869631b43fa2974c2ffa1c5dd6a7623ed | [
"Apache-2.0"
] | 90 | 2018-11-29T07:05:16.000Z | 2021-11-22T11:32:58.000Z | tpu_main.py | shfshf/seq2annotation | d4bf88a869631b43fa2974c2ffa1c5dd6a7623ed | [
"Apache-2.0"
] | 50 | 2019-06-27T07:11:18.000Z | 2022-02-10T00:01:02.000Z | tpu_main.py | lanSeFangZhou/seq2annotation | a824520d46f0b3d70268fae422976a5ce1b3f4ce | [
"Apache-2.0"
] | 23 | 2019-01-03T14:57:15.000Z | 2022-03-08T07:50:33.000Z | from seq2annotation.trainer.train_model import train_model
from seq2annotation.algorithms.BiLSTM_CRF_model import BilstmCrfModel
# train_model(data_dir='./data', result_dir='./result', model_fn=IdcnnCrfModel.model_fn, **IdcnnCrfModel.default_params())
result = train_model(
data_dir='./data', result_dir='./results... | 30.08 | 122 | 0.692819 | from seq2annotation.trainer.train_model import train_model
from seq2annotation.algorithms.BiLSTM_CRF_model import BilstmCrfModel
from seq2annotation.algorithms.IDCNN_CRF_model import IdcnnCrfModel
# train_model(data_dir='./data', result_dir='./result', model_fn=IdcnnCrfModel.model_fn, **IdcnnCrfModel.default_params()... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 22 |
b1de41b00c9777f9ef77d27cf37128daac1c1eae | 2,301 | py | Python | src/m6_your_turtles.py | jasminescott18/01-IntroductionToPython | ab3daadd9be0651cc42fff6323647b067c15b134 | [
"MIT"
] | null | null | null | src/m6_your_turtles.py | jasminescott18/01-IntroductionToPython | ab3daadd9be0651cc42fff6323647b067c15b134 | [
"MIT"
] | null | null | null | src/m6_your_turtles.py | jasminescott18/01-IntroductionToPython | ab3daadd9be0651cc42fff6323647b067c15b134 | [
"MIT"
] | null | null | null | """
Your chance to explore Loops and Turtles!
Authors: David Mutchler, Dave Fisher, Vibha Alangar, Amanda Stouder,
their colleagues and Jasmine Scott
"""
###############################################################################
# COMPLETED: 1.
# On Line 5 above, replace PUT_YOUR_NAME_HERE with your ... | 30.68 | 79 | 0.611039 | """
Your chance to explore Loops and Turtles!
Authors: David Mutchler, Dave Fisher, Vibha Alangar, Amanda Stouder,
their colleagues and Jasmine Scott
"""
###############################################################################
# COMPLETED: 1.
# On Line 5 above, replace PUT_YOUR_NAME_HERE with your ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6a2930c078c01007b8afaabbbd8918a486f730c7 | 363 | py | Python | 1_PythonDataProcessing/4_18_read_csv_parse_dates.py | hnwarid/DQLabAcademy | e03d82f97536ae103b6abc65db0ae16520fb68c7 | [
"MIT"
] | null | null | null | 1_PythonDataProcessing/4_18_read_csv_parse_dates.py | hnwarid/DQLabAcademy | e03d82f97536ae103b6abc65db0ae16520fb68c7 | [
"MIT"
] | null | null | null | 1_PythonDataProcessing/4_18_read_csv_parse_dates.py | hnwarid/DQLabAcademy | e03d82f97536ae103b6abc65db0ae16520fb68c7 | [
"MIT"
] | null | null | null | import pandas as pd
# Load dataset https://storage.googleapis.com/dqlab-dataset/LO4/global_air_quality_4000rows.csv
gaq = pd.read_csv('https://storage.googleapis.com/dqlab-dataset/LO4/global_air_quality_4000rows.csv', parse_dates=True, index_col='timestamp')
# Cetak 5 data teratas
print(gaq.head())
# Cetak info dari da... | 45.375 | 142 | 0.793388 | import pandas as pd
# Load dataset https://storage.googleapis.com/dqlab-dataset/LO4/global_air_quality_4000rows.csv
gaq = pd.read_csv('https://storage.googleapis.com/dqlab-dataset/LO4/global_air_quality_4000rows.csv', parse_dates=True, index_col='timestamp')
# Cetak 5 data teratas
print(gaq.head())
# Cetak info dari da... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fcb53cd4210d941389826d9bb52da3658b50b8ce | 7,714 | py | Python | bugbane/tools/send/dd_api/official_customized.py | gardatech/bugbane | b19a2c28732697ce7fd277f4256d14c307900678 | [
"Apache-2.0"
] | 9 | 2022-02-14T11:21:06.000Z | 2022-03-21T22:06:06.000Z | bugbane/tools/send/dd_api/official_customized.py | gardatech/bugbane | b19a2c28732697ce7fd277f4256d14c307900678 | [
"Apache-2.0"
] | 4 | 2022-02-21T09:45:27.000Z | 2022-03-14T14:09:52.000Z | bugbane/tools/send/dd_api/official_customized.py | gardatech/bugbane | b19a2c28732697ce7fd277f4256d14c307900678 | [
"Apache-2.0"
] | 1 | 2022-03-14T13:56:37.000Z | 2022-03-14T13:56:37.000Z | # Copyright 2022 Garda Technologies, LLC. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 38.378109 | 87 | 0.525668 | # Copyright 2022 Garda Technologies, LLC. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 0 | 371 | 0 | 6,184 | 0 | 0 | 0 | 99 | 181 |
4e35d75032ed2762b5cce0ddc64ea4ee177879df | 10,527 | py | Python | codes/dgmpm_stability/2Dcomparison_random.py | adRenaud/research | 2f0062a1800d7a17577bbfc2393b084253d567f4 | [
"MIT"
] | 1 | 2021-06-18T14:52:03.000Z | 2021-06-18T14:52:03.000Z | codes/dgmpm_stability/2Dcomparison_random.py | adRenaud/research | 2f0062a1800d7a17577bbfc2393b084253d567f4 | [
"MIT"
] | 1 | 2019-01-07T13:11:11.000Z | 2019-01-07T13:11:11.000Z | codes/dgmpm_stability/2Dcomparison_random.py | adRenaud/research | 2f0062a1800d7a17577bbfc2393b084253d567f4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import numpy as np
from scipy import optimize
import matplotlib.pyplot as plt
import random
import pdb
import os
# Symbolic function to evaluate shape functions
shape_functions=lambda x,y: np.array([(1.-x)*(1.-y)/4.,(1.+x)*(1.-y)/4.,(1.+x)*(1.+y)/4.,(1.-x)*(1.+y)/4.])
grad_xi=lambda y:np.array([-(1... | 37.066901 | 158 | 0.588582 | #!/usr/bin/python
import numpy as np
from scipy import optimize
from sympy import *
import matplotlib.pyplot as plt
import random
import pdb
import os
def export2DTeXFile(fileName,xField,fields,*kwargs):
TeXFile=open(fileName,"w")
n_fields = np.shape(fields)[0]
n_labels = np.shape(kwargs)[0]
# Define ... | 0 | 0 | 0 | 0 | 0 | 6,837 | 0 | -2 | 137 |
8e8a2eb679aeb3ae22f2f3709ecb4bbc7bc8cd46 | 3,261 | py | Python | src/test/conftest.py | gyana/alembic_utils | a4bc7f5f025335faad7b178eb84ab78093e525ec | [
"MIT"
] | null | null | null | src/test/conftest.py | gyana/alembic_utils | a4bc7f5f025335faad7b178eb84ab78093e525ec | [
"MIT"
] | null | null | null | src/test/conftest.py | gyana/alembic_utils | a4bc7f5f025335faad7b178eb84ab78093e525ec | [
"MIT"
] | null | null | null | # pylint: disable=redefined-outer-name,no-member
PYTEST_DB = "postgresql://alem_user:password@localhost:5680/alem_db"
| 26.950413 | 88 | 0.592763 | # pylint: disable=redefined-outer-name,no-member
import json
import os
import shutil
import subprocess
import time
import pytest
from parse import parse
from sqlalchemy import create_engine
from alembic_utils.testbase import TEST_VERSIONS_ROOT, reset_event_listener_registry
PYTEST_DB = "postgresql://alem_user:passw... | 0 | 2,841 | 0 | 0 | 0 | 0 | 0 | 28 | 270 |
dff4f076230460df34341907153dd1c94b54a8a1 | 239 | py | Python | env/script/python_console.py | ZhuoZhuoCrayon/AcousticKeyBoard-Web | 0a0ead78aec7ed03898fd51e076aa57df966508c | [
"MIT"
] | null | null | null | env/script/python_console.py | ZhuoZhuoCrayon/AcousticKeyBoard-Web | 0a0ead78aec7ed03898fd51e076aa57df966508c | [
"MIT"
] | null | null | null | env/script/python_console.py | ZhuoZhuoCrayon/AcousticKeyBoard-Web | 0a0ead78aec7ed03898fd51e076aa57df966508c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import dotenv
#
print("Python %s on %s" % (sys.version, sys.platform))
sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])
#
dotenv.load_dotenv(dotenv_path=PROJECT_ROOT + "/env/dc_dev.env")
| 18.384615 | 64 | 0.719665 | # -*- coding: utf-8 -*-
import sys
import dotenv
# 打印系统信息
print("Python %s on %s" % (sys.version, sys.platform))
sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])
# 导入环境变量
dotenv.load_dotenv(dotenv_path=PROJECT_ROOT + "/env/dc_dev.env")
| 36 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d765d8e2258ab69e90c67075674e072f5706b65f | 1,295 | py | Python | repoman/signature.py | jsoriano/python-repoman | 308c141ce7177238c70f78facf1fc2642cf485aa | [
"Apache-2.0"
] | 6 | 2015-08-10T09:42:55.000Z | 2021-11-08T10:26:02.000Z | repoman/signature.py | jsoriano/python-repoman | 308c141ce7177238c70f78facf1fc2642cf485aa | [
"Apache-2.0"
] | 11 | 2017-08-28T17:38:24.000Z | 2019-05-31T12:49:31.000Z | repoman/signature.py | jsoriano/python-repoman | 308c141ce7177238c70f78facf1fc2642cf485aa | [
"Apache-2.0"
] | 7 | 2015-02-14T16:15:41.000Z | 2021-09-29T09:53:26.000Z | #!/usr/bin/env python
#
# Copyright 2014 Tuenti Technologies S.L.
#
# 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... | 26.428571 | 74 | 0.649421 | #!/usr/bin/env python
#
# Copyright 2014 Tuenti Technologies S.L.
#
# 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... | 0 | 444 | 0 | 183 | 0 | 0 | 0 | -15 | 68 |
575da1aa4f49004db0d40f9f3a5e6c15334882ed | 272 | py | Python | base/fork_test.py | victor999999/play_python | e3d777a3c7f000206ac69765bf27d3f38812e274 | [
"MIT"
] | null | null | null | base/fork_test.py | victor999999/play_python | e3d777a3c7f000206ac69765bf27d3f38812e274 | [
"MIT"
] | null | null | null | base/fork_test.py | victor999999/play_python | e3d777a3c7f000206ac69765bf27d3f38812e274 | [
"MIT"
] | null | null | null | import os
from time import sleep
print('***********************')
a = 1
pid = os.fork()
if pid < 0:
print("")
elif pid == 0:
print('')
print("a =",a)
a = 10000
else:
sleep(1)
print("")
print("psarent a =",a)
print("")
| 12.952381 | 32 | 0.5 | import os
from time import sleep
print('***********************')
a = 1
pid = os.fork()
if pid < 0:
print("创建进程失败")
elif pid == 0:
print('这是新的进程')
print("a =",a)
a = 10000
else:
sleep(1)
print("这是原有进程")
print("psarent a =",a)
print("演示完毕")
| 66 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cc5ce244934e2fbe53fde388a5e411e3b23b1335 | 567 | py | Python | pyglet-gui-master/tests/runtests.py | jorvasquezr/IA_ChessGame_Solver | 976e8098feb53bc033a8a7b11475e4d5405db56b | [
"MIT"
] | 52 | 2015-04-18T20:45:52.000Z | 2021-11-21T14:50:10.000Z | pyglet-gui-master/tests/runtests.py | jorvasquezr/IA_ChessGame_Solver | 976e8098feb53bc033a8a7b11475e4d5405db56b | [
"MIT"
] | 8 | 2015-06-14T19:35:55.000Z | 2018-06-29T13:52:28.000Z | tests/runtests.py | jorgecarleitao/pyglet-gui | 20ec4b335c9af3698dfa8328894544d4d0417973 | [
"BSD-3-Clause"
] | 21 | 2015-07-22T16:21:11.000Z | 2021-09-23T09:37:43.000Z | import unittest
import sys
if __name__ == "__main__":
suite = build_test_suite()
runner = unittest.TextTestRunner()
result = runner.run(suite)
sys.exit(not result.wasSuccessful())
| 23.625 | 72 | 0.659612 | import glob
import os
import unittest
import sys
def build_test_suite():
suite = unittest.TestSuite()
for test_case in glob.glob('tests/test_*.py'):
modname = os.path.splitext(test_case)[0]
modname = modname.replace('/', '.')
module = __import__(modname, {}, {}, ['1'])
suite.ad... | 0 | 0 | 0 | 0 | 0 | 323 | 0 | -22 | 67 |
6a770b59826299201618e3ab24fef6c1130fc5fa | 3,159 | py | Python | builder/frameworks/arduino/arduino-common.py | Niruyi/platform-senseboxsam | 32617df06332b0631609c043a5ba0703e96fda9e | [
"Apache-2.0"
] | null | null | null | builder/frameworks/arduino/arduino-common.py | Niruyi/platform-senseboxsam | 32617df06332b0631609c043a5ba0703e96fda9e | [
"Apache-2.0"
] | null | null | null | builder/frameworks/arduino/arduino-common.py | Niruyi/platform-senseboxsam | 32617df06332b0631609c043a5ba0703e96fda9e | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-present PlatformIO <contact@platformio.org>
#
# 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 applicabl... | 27.710526 | 91 | 0.608737 | # Copyright 2014-present PlatformIO <contact@platformio.org>
#
# 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 applicabl... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1756d64f7ac98d743a36980cccd531b6a44525f4 | 4,170 | py | Python | Data_Production/full_LHCO_wrangler.py | pwinslow/Lepton-Number-Violation-at-100-TeV | e697142e8e1222a423d1e7bd1ea1e65d1b6f94b8 | [
"MIT"
] | null | null | null | Data_Production/full_LHCO_wrangler.py | pwinslow/Lepton-Number-Violation-at-100-TeV | e697142e8e1222a423d1e7bd1ea1e65d1b6f94b8 | [
"MIT"
] | null | null | null | Data_Production/full_LHCO_wrangler.py | pwinslow/Lepton-Number-Violation-at-100-TeV | e697142e8e1222a423d1e7bd1ea1e65d1b6f94b8 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#####################################################################################################################################
# #
# The purpose of this script is to collect data generated from parallel computation of parton level cross sections into one #
# dat file. T... | 36.578947 | 157 | 0.656835 | #!/usr/bin/python
#####################################################################################################################################
# #
# The purpose of this script is to collect data generated from parallel computation of parton level cross sections into one #
# dat file. T... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d7ffcee15a996978d3c096439336ad48cfbfa2f9 | 7,400 | py | Python | pyfiles/AutoDetectCircle.py | Rylu12/CircleD | d275d7804acd460f4ad13b9ee9342976df900fee | [
"MIT"
] | 25 | 2020-02-27T18:34:30.000Z | 2022-03-03T01:24:33.000Z | pyfiles/AutoDetectCircle.py | Rylu12/CircleD | d275d7804acd460f4ad13b9ee9342976df900fee | [
"MIT"
] | null | null | null | pyfiles/AutoDetectCircle.py | Rylu12/CircleD | d275d7804acd460f4ad13b9ee9342976df900fee | [
"MIT"
] | 4 | 2020-03-04T00:16:50.000Z | 2020-07-01T05:19:25.000Z |
#Get pixel/distance (using ImageJ software) to output actual diameters of circles
dp = 1
accum_ratio = 1
min_dist = 5
p1 = 40
p2 = 30
minDiam = 1
maxDiam = 30
scalebar = 10
min_range = 0
max_range = 100
intervals = 10
rad_list =[]
detected_circles = []
dataForTable = {}
# pd.DataFrame(rad_list).to_excel('... | 33.944954 | 124 | 0.597568 | import cv2
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import openpyxl
#Get pixel/distance (using ImageJ software) to output actual diameters of circles
dp = 1
accum_ratio = 1
min_dist = 5
p1 = 40
p2 = 30
minDiam = 1
maxDiam = 30
scalebar = 10
min_range = 0
max_range = 100
intervals = 10
ra... | 0 | 0 | 0 | 0 | 0 | 6,781 | 0 | -12 | 248 |
1e119287bd02cbf67397abfc87053e83d67df483 | 2,801 | py | Python | scripts/fit_whitepoint_matrices.py | 99991/foreground-estimation-evaluation | d13bb0657df502e32da18235beb984bacaa50591 | [
"MIT"
] | 1 | 2021-01-04T15:57:07.000Z | 2021-01-04T15:57:07.000Z | scripts/fit_whitepoint_matrices.py | 99991/foreground-estimation-evaluation | d13bb0657df502e32da18235beb984bacaa50591 | [
"MIT"
] | 1 | 2021-01-05T16:44:22.000Z | 2021-02-11T10:10:19.000Z | scripts/fit_whitepoint_matrices.py | pymatting/foreground-estimation-evaluation | d13bb0657df502e32da18235beb984bacaa50591 | [
"MIT"
] | null | null | null | import util
if __name__ == "__main__":
fit_whitepoint_matrices(util.find_data_directory())
| 31.122222 | 84 | 0.584791 | import numpy as np
import os, json, util
def fit_whitepoint_matrices(directory, gamma=2.0):
output_path = os.path.join(directory, "whitepoint_matrices.json")
matrices = {}
print("Computing whitepoint transform matrices")
# fit matrix M to transform from have_lrgb to want_lrgb in least square sense
... | 0 | 0 | 0 | 0 | 0 | 2,651 | 0 | 7 | 45 |
7c19be2e05b9c3b06671bdeb178f870193035964 | 319 | py | Python | pdc/pdc/serial/comm_protocol.py | sergiorb/pdc | 0337daf7fd63e5a226af12aacfd502a3aac294d9 | [
"MIT"
] | null | null | null | pdc/pdc/serial/comm_protocol.py | sergiorb/pdc | 0337daf7fd63e5a226af12aacfd502a3aac294d9 | [
"MIT"
] | null | null | null | pdc/pdc/serial/comm_protocol.py | sergiorb/pdc | 0337daf7fd63e5a226af12aacfd502a3aac294d9 | [
"MIT"
] | null | null | null | # Inital char for detecting incoming order's String.
INITIALCHAR = '$'
# Separates order string from device id.
IDENTIFIERCHART = ":"
# Device Id and function separator in order's String.
DEFUSEPARATOR = '/'
# Variable separator
VARSEPARATOR = '&'
# Final char for detecting the final order's string.
STOPCHAR = ';' | 22.785714 | 53 | 0.730408 | # Inital char for detecting incoming order's String.
INITIALCHAR = '$'
# Separates order string from device id.
IDENTIFIERCHART = ":"
# Device Id and function separator in order's String.
DEFUSEPARATOR = '/'
# Variable separator
VARSEPARATOR = '&'
# Final char for detecting the final order's string.
STOPCHAR = ';' | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ac03bbe228ac3b2173aa9a8e83fe86907dfacbc4 | 3,070 | py | Python | Hubitat Presence from Unifi/Unifi-Presence.py | cesquib/python-scripts | bd1a56d8814debc8afcaf31ac3c8d447704f5ff1 | [
"MIT"
] | null | null | null | Hubitat Presence from Unifi/Unifi-Presence.py | cesquib/python-scripts | bd1a56d8814debc8afcaf31ac3c8d447704f5ff1 | [
"MIT"
] | null | null | null | Hubitat Presence from Unifi/Unifi-Presence.py | cesquib/python-scripts | bd1a56d8814debc8afcaf31ac3c8d447704f5ff1 | [
"MIT"
] | null | null | null | #imports
import requests
import requests.utils
import urllib3
import configparser
import logging
from urllib3.exceptions import InsecureRequestWarning
urllib3.disable_warnings(InsecureRequestWarning)
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
config = configparser.ConfigParser()
con... | 35.697674 | 171 | 0.671987 | #imports
import csv
import json
import requests
import requests.utils
import requests.sessions
import urllib3
import sys
import traceback
import configparser
import logging
from urllib3.exceptions import InsecureRequestWarning
urllib3.disable_warnings(InsecureRequestWarning)
logging.basicConfig(format='%(levelname)s... | 0 | 0 | 0 | 0 | 0 | 2,491 | 0 | -34 | 233 |
4bccd7428316015be16c38509ae34fe303dc319d | 1,812 | py | Python | bip32utils/Base58.py | lyndsysimon/bip32utils | 56f5a56d1c54e648f35b670a87efabbca08fffae | [
"MIT"
] | 40 | 2017-09-05T21:34:05.000Z | 2022-03-22T01:03:24.000Z | bip32utils/Base58.py | deployed/bip32utils | 85c46714b580978da396d7984c466ec14e15b675 | [
"MIT"
] | 1 | 2019-08-13T11:55:32.000Z | 2019-08-13T12:07:05.000Z | bip32utils/Base58.py | deployed/bip32utils | 85c46714b580978da396d7984c466ec14e15b675 | [
"MIT"
] | 20 | 2017-05-27T19:27:49.000Z | 2022-02-05T10:04:34.000Z | #!/usr/bin/env python
#
# Copyright 2014 Corgan Labs
# See LICENSE.txt for distribution terms
#
from hashlib import sha256
__base58_alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
__base58_radix = len(__base58_alphabet)
def __string_to_int(data):
"Convert string of bytes Python integer, ... | 25.521127 | 81 | 0.639625 | #!/usr/bin/env python
#
# Copyright 2014 Corgan Labs
# See LICENSE.txt for distribution terms
#
from hashlib import sha256
__base58_alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
__base58_radix = len(__base58_alphabet)
def __string_to_int(data):
"Convert string of bytes Python integer, ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2d9a451ecbb99e4ca2b66ca8136964aa76800625 | 1,291 | py | Python | P1.Outliers/Ex1. Code.py | khaledxmust/Statistical-Projects | 2aa832a13f9d9ee9e21db7ea12b151b092baa86a | [
"MIT"
] | null | null | null | P1.Outliers/Ex1. Code.py | khaledxmust/Statistical-Projects | 2aa832a13f9d9ee9e21db7ea12b151b092baa86a | [
"MIT"
] | null | null | null | P1.Outliers/Ex1. Code.py | khaledxmust/Statistical-Projects | 2aa832a13f9d9ee9e21db7ea12b151b092baa86a | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
data = np.loadtxt('Data1.txt')
dataset = pd.DataFrame({'No.':data[:]})
dataset.sort_values('No.',inplace=True)
dataset.hist(bins=50) # Exploring data
plt.show()
dataset.boxplot(vert=False)
plt.show()
Q1=np.percentile(dataset, [25]) #... | 30.738095 | 68 | 0.62897 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
data = np.loadtxt('Data1.txt')
dataset = pd.DataFrame({'No.':data[:]})
dataset.sort_values('No.',inplace=True)
dataset.hist(bins=50) # Exploring data
plt.show()
dataset.boxplot(vert=False)
plt.show()
Q1=np.percentile(dataset, [25]) #... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
97da7aec4eb5fdc0db5ef2ecdb8ecc9a5b223165 | 15,172 | py | Python | preprocess_recovered_hormuud_messages.py | AfricasVoices/Project-RVI-Election | 78c88e98584e89330bb286ca01c32c1ae03c88eb | [
"MIT"
] | null | null | null | preprocess_recovered_hormuud_messages.py | AfricasVoices/Project-RVI-Election | 78c88e98584e89330bb286ca01c32c1ae03c88eb | [
"MIT"
] | 2 | 2022-03-07T10:03:20.000Z | 2022-03-15T11:45:32.000Z | preprocess_recovered_hormuud_messages.py | AfricasVoices/Project-RVI-Election | 78c88e98584e89330bb286ca01c32c1ae03c88eb | [
"MIT"
] | null | null | null | import argparse
import csv
import re
from datetime import timedelta
from decimal import Decimal
from core_data_modules.logging import Logger
from dateutil.parser import isoparse
log = Logger(__name__)
TARGET_SHORTCODE = "378"
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Us... | 54.971014 | 124 | 0.680925 | import argparse
import csv
import re
from datetime import datetime, timedelta
from decimal import Decimal
import pytz
from core_data_modules.logging import Logger
from dateutil.parser import isoparse
from rapid_pro_tools.rapid_pro_client import RapidProClient
from storage.google_cloud import google_cloud_utils
log = ... | 0 | 0 | 0 | 0 | 0 | 3,788 | 0 | 68 | 113 |
f44356cc7275597e8fb3e5cb12dc91edf393188f | 11,478 | py | Python | platform/polycommon/tests/test_conf/test_option_service.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | platform/polycommon/tests/test_conf/test_option_service.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | platform/polycommon/tests/test_conf/test_option_service.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 33.858407 | 88 | 0.688796 | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 0 | 0 | 0 | 10,297 | 0 | 0 | 0 | 157 | 410 |
bad371a5670df77a6cc1c85725b2410b85c36255 | 210 | py | Python | tests/conftest.py | ynikitenko/lena | d0fbae47f21007685edbd4e77bc91413421bebd1 | [
"Apache-2.0"
] | 4 | 2020-03-01T14:01:48.000Z | 2021-02-23T19:33:36.000Z | tests/conftest.py | ynikitenko/lena | d0fbae47f21007685edbd4e77bc91413421bebd1 | [
"Apache-2.0"
] | 1 | 2021-05-09T15:47:17.000Z | 2021-05-09T16:12:03.000Z | tests/conftest.py | ynikitenko/lena | d0fbae47f21007685edbd4e77bc91413421bebd1 | [
"Apache-2.0"
] | null | null | null | try:
except ImportError:
collect_ignore_glob = ["*/root/*"]
# otherwise will have problems either with tox,
# or when executing pytest directly
collect_ignore_glob += ["root/*"]
| 26.25 | 51 | 0.680952 | try:
import ROOT
except ImportError:
collect_ignore_glob = ["*/root/*"]
# otherwise will have problems either with tox,
# or when executing pytest directly
collect_ignore_glob += ["root/*"]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -10 | 26 |
40cab5c47f0af4516f0ed2cdf6a7aaed78088be1 | 1,013 | py | Python | leave/migrations/0005_auto_20211121_0757.py | PriyanshBordia/LNMIIT-Leave-Management | 279464f4c3e3103d4edadc161f5efa027bca9bbd | [
"MIT"
] | 1 | 2022-03-06T19:39:10.000Z | 2022-03-06T19:39:10.000Z | leave/migrations/0005_auto_20211121_0757.py | PriyanshBordia/LNMIIT-Leave-Management-System | 279464f4c3e3103d4edadc161f5efa027bca9bbd | [
"MIT"
] | null | null | null | leave/migrations/0005_auto_20211121_0757.py | PriyanshBordia/LNMIIT-Leave-Management-System | 279464f4c3e3103d4edadc161f5efa027bca9bbd | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-21 07:57
| 34.931034 | 305 | 0.615992 | # Generated by Django 3.2.9 on 2021-11-21 07:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('leave', '0004_rename_reschedules_date_application_rescheduled_date'),
]
operations = [
migrations.AddField(
model_name='person',... | 0 | 0 | 0 | 899 | 0 | 0 | 0 | 19 | 46 |
f9d790a69517924bbd6d8395aea26be9e72e920b | 9,475 | py | Python | humpday/objectives/classic.py | MDCHAMP/humpday | 45e2cea95ae951d991ebc6c1e98314cc8c726f25 | [
"MIT"
] | 53 | 2021-02-13T01:17:02.000Z | 2022-03-16T10:07:29.000Z | humpday/objectives/classic.py | MDCHAMP/humpday | 45e2cea95ae951d991ebc6c1e98314cc8c726f25 | [
"MIT"
] | 16 | 2021-02-13T17:42:06.000Z | 2022-03-06T10:08:50.000Z | humpday/objectives/classic.py | MDCHAMP/humpday | 45e2cea95ae951d991ebc6c1e98314cc8c726f25 | [
"MIT"
] | 12 | 2020-12-09T03:16:22.000Z | 2022-02-23T09:34:00.000Z | import numpy as np
import math
# Some test objective functions to help guide optimizer choices
# -------------------------------------------------------------
#
# We'll use DEAP's set of groovy benchmarks, and landscapes, swarmpackagepy also
#
# See pretty pictures at https://deap.readthedocs.io/en/master/api/benchmar... | 34.9631 | 136 | 0.640633 | import numpy as np
import math
from humpday.objectives.deapobjectives import schwefel, schaffer, bohachevsky, griewank, rastrigin, shekel, rosenbrock
# Some test objective functions to help guide optimizer choices
# -------------------------------------------------------------
#
# We'll use DEAP's set of groovy benchm... | 0 | 0 | 0 | 0 | 0 | 4,902 | 0 | 194 | 643 |
4bf1ae882642f3041e24b1449475aac20972541d | 4,388 | py | Python | SIM/cvbridge_build_ws/src/ros_enet/src/detector.py | dlfdn9392/autonomous_driving_car_project | dc07a9e949be4bbb37c8726357ee596f74eec3da | [
"MIT"
] | 3 | 2022-02-12T08:51:37.000Z | 2022-03-21T04:30:08.000Z | SIM/cvbridge_build_ws/src/ros_enet/src/detector.py | dlfdn9392/autonomous_driving_car_project | dc07a9e949be4bbb37c8726357ee596f74eec3da | [
"MIT"
] | null | null | null | SIM/cvbridge_build_ws/src/ros_enet/src/detector.py | dlfdn9392/autonomous_driving_car_project | dc07a9e949be4bbb37c8726357ee596f74eec3da | [
"MIT"
] | 2 | 2021-10-09T08:26:19.000Z | 2022-03-09T12:44:00.000Z | #!/usr/bin/env python3
#### ros import
import rospy
from rospkg import RosPack
# python import
package = RosPack()
img_size = (480, 360)
if __name__ == "__main__":
# Initialize node
rospy.init_node("detector_manager_node")
dm = DetectorManager()
| 38.156522 | 134 | 0.645624 | #!/usr/bin/env python3
#### ros import
import rospy
import std_msgs.msg
from rospkg import RosPack
from std_msgs.msg import UInt8
from std_msgs.msg import Float32MultiArray #c
from sensor_msgs.msg import Image
from geometry_msgs.msg import Polygon, Point32
import cv2
from cv_bridge import CvBridge, CvBridgeError
# py... | 0 | 0 | 0 | 3,814 | 0 | 0 | 0 | 40 | 268 |
9c59cbd4c8733988e53305f4267a10fe2ea2df39 | 324 | py | Python | juegotruco/juegotruco/urls.py | germanferrero/truco | b073f1cbb6c44b00a3b6651e7dda0f3a419a9710 | [
"MIT"
] | null | null | null | juegotruco/juegotruco/urls.py | germanferrero/truco | b073f1cbb6c44b00a3b6651e7dda0f3a419a9710 | [
"MIT"
] | null | null | null | juegotruco/juegotruco/urls.py | germanferrero/truco | b073f1cbb6c44b00a3b6651e7dda0f3a419a9710 | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
url(r'^truco/', include('truco.urls', namespace="truco")),
url(r'^usuarios/', include('usuarios.urls', namespace="usuarios"))... | 27 | 71 | 0.685185 | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
url(r'^truco/', include('truco.urls', namespace="truco")),
url(r'^usuarios/', include('usuarios.urls', namespace="usuarios"))... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
783a5ff947b88f8438dd0c957fdf50140a48a0dd | 1,277 | py | Python | Smach/executive_smach_tutorials/scripts/usecase_01/executive_step_02.py | OxRAMSociety/RobotArm | 8a402ac06e23b4447d59a0d1d0e3065da6a2591a | [
"MIT"
] | 3 | 2021-12-30T21:56:58.000Z | 2022-02-20T11:19:12.000Z | Smach/executive_smach_tutorials/scripts/usecase_01/executive_step_02.py | OxRAMSociety/RobotArm | 8a402ac06e23b4447d59a0d1d0e3065da6a2591a | [
"MIT"
] | 10 | 2021-11-13T21:18:33.000Z | 2022-03-11T23:11:23.000Z | Smach/executive_smach_tutorials/scripts/usecase_01/executive_step_02.py | OxRAMSociety/RobotArm | 8a402ac06e23b4447d59a0d1d0e3065da6a2591a | [
"MIT"
] | 2 | 2022-02-06T11:24:43.000Z | 2022-02-09T20:13:40.000Z | #!/usr/bin/env python3
"""
Description:
Usage:
$> roslaunch turtle_nodes.launch
$> ./executive_step_02.py
Output:
[INFO] : State machine starting in initial state 'RESET' with userdata:
[]
[INFO] : State machine transitioning 'RESET':'succeeded'-->'SPAWN'
[INFO] : State machine te... | 24.09434 | 81 | 0.643696 | #!/usr/bin/env python3
"""
Description:
Usage:
$> roslaunch turtle_nodes.launch
$> ./executive_step_02.py
Output:
[INFO] : State machine starting in initial state 'RESET' with userdata:
[]
[INFO] : State machine transitioning 'RESET':'succeeded'-->'SPAWN'
[INFO] : State machine te... | 0 | 0 | 0 | 0 | 0 | 696 | 0 | 16 | 159 |
311f9e2d29caacb6a49a3c6660fb6c0e9015e8f5 | 4,068 | py | Python | predict.py | fzbio/GILoop | c4845a9f5c5bf8654640f823786f4e4dd6576169 | [
"MIT"
] | 1 | 2022-03-07T19:16:25.000Z | 2022-03-07T19:16:25.000Z | predict.py | fzbio/GILoop | c4845a9f5c5bf8654640f823786f4e4dd6576169 | [
"MIT"
] | null | null | null | predict.py | fzbio/GILoop | c4845a9f5c5bf8654640f823786f4e4dd6576169 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import os
from hickit.reader import get_headers, get_chrom_sizes
import tensorflow as tf
import json
import gc
from sklearn.metrics import average_precision_score
def run_output_predictions(run_id, model_stage, threshold, target_dataset_name, target_assembly, chroms, output_path... | 47.302326 | 124 | 0.622173 | import pandas as pd
import numpy as np
import os
from hickit.reader import get_headers, get_chrom_sizes
import tensorflow as tf
import json
import tensorflow_addons as tfa
from utils import *
import gc
from sklearn.metrics import f1_score, average_precision_score
def run_output_predictions(run_id, model_stage, thresh... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 44 |
d158e24c09e1ef821cbfa90a4530d19a3e56e9e9 | 7,941 | py | Python | tests/test__pipeline.py | kevinmooreiii/old-elstruct | c1aa3dd0c34626e6887e1c903de2a9b977ef4163 | [
"Apache-2.0"
] | null | null | null | tests/test__pipeline.py | kevinmooreiii/old-elstruct | c1aa3dd0c34626e6887e1c903de2a9b977ef4163 | [
"Apache-2.0"
] | null | null | null | tests/test__pipeline.py | kevinmooreiii/old-elstruct | c1aa3dd0c34626e6887e1c903de2a9b977ef4163 | [
"Apache-2.0"
] | null | null | null | """ test elstruct writer/run/reader pipelines
"""
import numpy
import automol
import elstruct
SCRIPT_DCT = {
'cfour2': None,
'gaussian09': None,
'gaussian16': None,
'molpro2015': None,
'mrcc2018': None,
'nwchem6': None,
'orca4': None,
'psi4': "#!/usr/bin/env bash\n"
"psi4 -... | 34.982379 | 71 | 0.501574 | """ test elstruct writer/run/reader pipelines
"""
import warnings
import tempfile
import numpy
import automol
import elstruct
SCRIPT_DCT = {
'cfour2': None,
'gaussian09': None,
'gaussian16': None,
'molpro2015': None,
'mrcc2018': None,
'nwchem6': None,
'orca4': None,
'psi4': "#!/usr/bin... | 0 | 0 | 0 | 0 | 0 | 1,268 | 0 | -12 | 67 |
5c0c594de1d8ed9bde7a2cc16d5e17047639c00f | 564 | py | Python | setup.py | Savahi/tnn | 21cd0c0e1827b159ccfb8668495b25f3c9486c75 | [
"MIT"
] | null | null | null | setup.py | Savahi/tnn | 21cd0c0e1827b159ccfb8668495b25f3c9486c75 | [
"MIT"
] | null | null | null | setup.py | Savahi/tnn | 21cd0c0e1827b159ccfb8668495b25f3c9486c75 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name = 'tnn',
version = '0.0.4',
description = 'Tensorflow Neural Network Framework for Algorithmic Traders',
url = 'http://github.com/Savahi/tnn',
author = 'Savahi',
author_email = 'sh@tradingene.ru',
license = 'MIT',
classifiers=[
'Development Status :: 3 - Alpha',
... | 26.857143 | 80 | 0.675532 | from setuptools import setup
setup(
name = 'tnn',
version = '0.0.4',
description = 'Tensorflow Neural Network Framework for Algorithmic Traders',
url = 'http://github.com/Savahi/tnn',
author = 'Savahi',
author_email = 'sh@tradingene.ru',
license = 'MIT',
classifiers=[
'Development Status :: 3 - Alpha',
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1a220f455056de8d29d4fdc05194bbd2b99d0167 | 3,083 | py | Python | src/syncremote/models.py | litedesk/litedesk-webserver-provision | 1576b9d3e5e2e64d1136d276767c2710cfb1938f | [
"Apache-2.0"
] | 1 | 2016-01-18T08:19:22.000Z | 2016-01-18T08:19:22.000Z | src/syncremote/models.py | litedesk/litedesk-webserver-provision | 1576b9d3e5e2e64d1136d276767c2710cfb1938f | [
"Apache-2.0"
] | null | null | null | src/syncremote/models.py | litedesk/litedesk-webserver-provision | 1576b9d3e5e2e64d1136d276767c2710cfb1938f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
| 33.150538 | 93 | 0.695102 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
from django.db import models
class Synchronizable(models.Model):
SYNCHRONIZABLE_ATTRIBUTES_MAP = {}
last_remote_read = models.DateTimeField(null=True, editable=False)
last_remote_save = models.DateTimeField(null=True, editable=False)
last... | 0 | 1,043 | 0 | 1,924 | 0 | 0 | 0 | 1 | 68 |
7e94be0b426059a0b5f80191330dd01d9cefa8e8 | 2,371 | py | Python | lib/python3.10/site-packages/integrations/trac/zulip_trac_config.py | FHIR/zulip-archive | b1f69a091f74b613d74ebb558eed30415c0a9245 | [
"MIT"
] | 1 | 2020-05-25T11:52:31.000Z | 2020-05-25T11:52:31.000Z | lib/python3.10/site-packages/integrations/trac/zulip_trac_config.py | FHIR/zulip-archive | b1f69a091f74b613d74ebb558eed30415c0a9245 | [
"MIT"
] | 6 | 2020-03-24T16:39:54.000Z | 2021-04-30T20:46:43.000Z | api/integrations/trac/zulip_trac_config.py | erinis-eligro/zulip-outcasts | 51153a6ce219370aee79bfe462f6e4fb956993d9 | [
"Apache-2.0"
] | 3 | 2019-01-26T21:40:16.000Z | 2019-02-24T20:16:26.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2012 Zulip, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 45.596154 | 81 | 0.770561 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 Zulip, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify,... | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
842efcd09eed67da59176d84a717ccdb5c52f087 | 1,102 | py | Python | ibsng/handler/invoice/update_invoice_profile.py | ParspooyeshFanavar/pyibsng | d48bcf4f25e3f23461528bf0ff8870cc3d537444 | [
"MIT"
] | 6 | 2018-03-06T10:16:36.000Z | 2021-12-05T12:43:10.000Z | ibsng/handler/invoice/update_invoice_profile.py | ParspooyeshFanavar/pyibsng | d48bcf4f25e3f23461528bf0ff8870cc3d537444 | [
"MIT"
] | 3 | 2018-03-06T10:27:08.000Z | 2022-01-02T15:21:27.000Z | ibsng/handler/invoice/update_invoice_profile.py | ParspooyeshFanavar/pyibsng | d48bcf4f25e3f23461528bf0ff8870cc3d537444 | [
"MIT"
] | 3 | 2018-01-06T16:28:31.000Z | 2018-09-17T19:47:19.000Z | """Update invoice profile API method."""
| 29 | 49 | 0.615245 | """Update invoice profile API method."""
from ibsng.handler.handler import Handler
class updateInvoiceProfile(Handler):
"""Update invoice profile method class."""
def control(self):
"""Validate inputs after setup method.
:return: None
:rtype: None
"""
self.is_valid(se... | 0 | 0 | 0 | 995 | 0 | 0 | 0 | 20 | 45 |
684058cc65facf1d2b555fd05e7c6fb109db2485 | 1,655 | py | Python | tests/test_crl_client.py | MatthiasValvekens/certvalidator | 246c5075ecdb6d50b14c93fdc97a9d0470f84821 | [
"MIT"
] | 4 | 2020-11-11T13:59:05.000Z | 2022-03-13T14:06:10.000Z | tests/test_crl_client.py | MatthiasValvekens/certvalidator | 246c5075ecdb6d50b14c93fdc97a9d0470f84821 | [
"MIT"
] | 1 | 2020-11-11T11:29:37.000Z | 2020-11-11T11:29:37.000Z | tests/test_crl_client.py | MatthiasValvekens/certvalidator | 246c5075ecdb6d50b14c93fdc97a9d0470f84821 | [
"MIT"
] | 2 | 2020-11-11T10:33:32.000Z | 2022-03-13T14:06:11.000Z | # coding: utf-8
import os
tests_root = os.path.dirname(__file__)
fixtures_dir = os.path.join(tests_root, 'fixtures')
| 34.479167 | 78 | 0.714199 | # coding: utf-8
import unittest
import os
from asn1crypto import x509, pem
from pyhanko_certvalidator.fetchers import aiohttp_fetchers, requests_fetchers
from pyhanko_certvalidator.context import ValidationContext
from pyhanko_certvalidator.validate import verify_crl
from .constants import TEST_REQUEST_TIMEOUT
tests... | 0 | 0 | 1,110 | 34 | 0 | 0 | 0 | 154 | 238 |
35f5fbc2ecf336a27b90553bf6eced3f2cfbd38f | 9,157 | py | Python | pypibatch/main.py | newvicx/pybatch | 28065d70f5b970669fbb9174415dcd84477a99d2 | [
"MIT"
] | null | null | null | pypibatch/main.py | newvicx/pybatch | 28065d70f5b970669fbb9174415dcd84477a99d2 | [
"MIT"
] | null | null | null | pypibatch/main.py | newvicx/pybatch | 28065d70f5b970669fbb9174415dcd84477a99d2 | [
"MIT"
] | null | null | null | import os
import sys
import clr
import pandas as pd
PISDKHOME = os.getenv("PISDKHOME")
sys.path.append(PISDKHOME)
clr.AddReference("OSIsoft.PISDK")
UnitBatches = pd.DataFrame
SubBatches = pd.DataFrame
| 36.051181 | 107 | 0.584362 | import os
import sys
from datetime import datetime
from typing import List, Tuple, Union
import clr
import pandas as pd
PISDKHOME = os.getenv("PISDKHOME")
sys.path.append(PISDKHOME)
clr.AddReference("OSIsoft.PISDK")
from PISDK import PISDK, PISubBatch, PIUnitBatch
UnitBatches = pd.DataFrame
SubBatches = pd.DataFra... | 0 | 0 | 0 | 8,763 | 0 | 0 | 0 | 51 | 136 |
2909cd233acf8a536e5a3e44f665d30c6eec060f | 6,762 | py | Python | apps/Am241_Analysis.py | sweigart/pygama | 3c5fe4c69230814933b2de879b9a305ff0d4ad5e | [
"Apache-2.0"
] | 13 | 2019-05-01T01:37:30.000Z | 2022-03-18T08:52:19.000Z | apps/Am241_Analysis.py | sweigart/pygama | 3c5fe4c69230814933b2de879b9a305ff0d4ad5e | [
"Apache-2.0"
] | 111 | 2019-03-25T00:50:48.000Z | 2022-03-30T17:13:43.000Z | apps/Am241_Analysis.py | sweigart/pygama | 3c5fe4c69230814933b2de879b9a305ff0d4ad5e | [
"Apache-2.0"
] | 52 | 2019-01-24T21:05:04.000Z | 2022-03-07T23:37:55.000Z | #!/usr/bin/env python3.7
"""""
This is a script to fit the 60keV, 99keV and 103keV lines of an 241Am scan.
This script is based on the pygama version from December 2019 and is a bit outdated.
An update will be done soon
You need to have done a Calibration before and the output must be in the ds.calDB file
The fu... | 30.459459 | 158 | 0.586217 | #!/usr/bin/env python3.7
import numpy as np
import pandas as pd
import tinydb as db
import matplotlib.pyplot as plt
from scipy.integrate import simps
from pygama import DataSet
import pygama.utils as pgu
import pygama.analysis.histograms as pgh
import pygama.analysis.peak_fitting as pga
from numpy import diff
"""""... | 0 | 0 | 0 | 0 | 0 | 5,880 | 0 | 66 | 243 |
9064b8f312956e4226f1f506cb810d923706df75 | 15,765 | py | Python | xask.py | s3h10r/say | 8302ba0bc41b9debd1852f8c0ac6d25a7aaa3b9a | [
"MIT"
] | 2 | 2020-10-18T09:52:20.000Z | 2021-09-27T09:23:33.000Z | xask.py | s3h10r/say | 8302ba0bc41b9debd1852f8c0ac6d25a7aaa3b9a | [
"MIT"
] | null | null | null | xask.py | s3h10r/say | 8302ba0bc41b9debd1852f8c0ac6d25a7aaa3b9a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
**experimental** a graphical retro-style version of `ask` - because we can. :D
asks a yes/no question via audio (text-to-speech).
returncode reflects answer in common unix-style (0 == yes/ok, 1 == nope)
Usage:
xask [<msg>] [--yes=<reply_yes>] [--no=<reply_no>] [--engine=<tts-engine>]
[... | 38.639706 | 192 | 0.597843 | #!/usr/bin/env python3
"""
**experimental** a graphical retro-style version of `ask` - because we can. :D
asks a yes/no question via audio (text-to-speech).
returncode reflects answer in common unix-style (0 == yes/ok, 1 == nope)
Usage:
xask [<msg>] [--yes=<reply_yes>] [--no=<reply_no>] [--engine=<tts-engine>]
[... | 0 | 0 | 0 | 464 | 0 | 2,553 | 0 | 54 | 163 |
699a7caa0cd3ef8b77366228cf23f5bb5950aef4 | 2,717 | py | Python | Day 77/OldKeypadInForeignLanguage.py | sandeep-krishna/100DaysOfCode | af4594fb6933e4281d298fa921311ccc07295a7c | [
"MIT"
] | null | null | null | Day 77/OldKeypadInForeignLanguage.py | sandeep-krishna/100DaysOfCode | af4594fb6933e4281d298fa921311ccc07295a7c | [
"MIT"
] | null | null | null | Day 77/OldKeypadInForeignLanguage.py | sandeep-krishna/100DaysOfCode | af4594fb6933e4281d298fa921311ccc07295a7c | [
"MIT"
] | null | null | null | '''
Some people remain old fashioned and John is one of them. He doesn't like the new smart phones with full keypads and still uses the old keypads which require you to tap a key multiple times to type a single letter. For example, if the keyboard has two keys, one with the letters "adef" and the other one with the l... | 41.8 | 451 | 0.753773 | '''
Some people remain old fashioned and John is one of them. He doesn't like the new smart phones with full keypads and still uses the old keypads which require you to tap a key multiple times to type a single letter. For example, if the keyboard has two keys, one with the letters "adef" and the other one with the l... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1f34da9829da433908eee4db9139797f08e10d81 | 202 | py | Python | source/settings.py | ElPapi42/hexagonal-microservice | 675f6588c9b150712eb5f4c290c7a3f81b273573 | [
"MIT"
] | null | null | null | source/settings.py | ElPapi42/hexagonal-microservice | 675f6588c9b150712eb5f4c290c7a3f81b273573 | [
"MIT"
] | null | null | null | source/settings.py | ElPapi42/hexagonal-microservice | 675f6588c9b150712eb5f4c290c7a3f81b273573 | [
"MIT"
] | null | null | null | import os
import pathlib
from dotenv import load_dotenv
# Load .env vars
load_dotenv(pathlib.Path('.').parent/'.env')
MONGO_URL = os.getenv('MONGO_URL')
MONGO_DATABASE = os.getenv('MONGO_DATABASE')
| 16.833333 | 44 | 0.752475 | import os
import pathlib
from dotenv import load_dotenv
# Load .env vars
load_dotenv(pathlib.Path('.').parent/'.env')
MONGO_URL = os.getenv('MONGO_URL')
MONGO_DATABASE = os.getenv('MONGO_DATABASE')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |