hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5a0531b69c6cbf0f210c586a6b15fb30c2ec2fe2 | 564 | py | Python | leetcode/12.IntegerToRoman/soln.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | leetcode/12.IntegerToRoman/soln.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | leetcode/12.IntegerToRoman/soln.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | class Solution:
def intToRoman(self, num: int) -> str:
romanDict = [(1, 'I'), (4, 'IV'), (5, 'V'), (9, 'IX'), (10, 'X'), (40, 'XL'), (50, 'L'), (90, 'XC'), (100, 'C'), (400, 'CD'), (500, 'D'), (900, 'CM'), (1000, 'M')]
l = len(romanDict)-1
n = num
res = ""
while n > 0 and l >... | 33.176471 | 171 | 0.379433 |
5f8a84bb8821c3a787403f788b484ef572f34f6c | 6,136 | py | Python | Virtual-Part/src/predict_server.py | louisliuwei/pynq_car | 9ebcc8e4515d1b419907170ca3aaa3bf3dab1edf | [
"MIT"
] | null | null | null | Virtual-Part/src/predict_server.py | louisliuwei/pynq_car | 9ebcc8e4515d1b419907170ca3aaa3bf3dab1edf | [
"MIT"
] | null | null | null | Virtual-Part/src/predict_server.py | louisliuwei/pynq_car | 9ebcc8e4515d1b419907170ca3aaa3bf3dab1edf | [
"MIT"
] | null | null | null | '''
@Author: Sauron Wu
@GitHub: wutianze
@Email: 1369130123qq@gmail.com
@Date: 2019-09-23 10:12:28
@LastEditors: Please set LastEditors
@LastEditTime: 2019-10-28 13:55:07
@Description:
'''
#!/usr/bin/env python
'''
Predict Server
Create a server to accept image inputs and run them against a trained neural network.
Thi... | 32.294737 | 116 | 0.599087 |
05cebbe2d17d050ced3cff7234e50eda67a51b40 | 9,961 | py | Python | docs/conf.py | vfxetc/sgevents | dcb9d71f11dcbeb6aa2847743416915e1a3f7eb3 | [
"BSD-3-Clause"
] | 2 | 2017-09-27T00:11:33.000Z | 2019-07-19T01:20:23.000Z | docs/conf.py | vfxetc/sgevents | dcb9d71f11dcbeb6aa2847743416915e1a3f7eb3 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | vfxetc/sgevents | dcb9d71f11dcbeb6aa2847743416915e1a3f7eb3 | [
"BSD-3-Clause"
] | 2 | 2017-07-04T18:55:48.000Z | 2019-07-19T01:20:25.000Z | # -*- coding: utf-8 -*-
#
# sgevents documentation build configuration file, created by
# sphinx-quickstart on Thu Jul 2 10:31:08 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | 31.128125 | 86 | 0.714988 |
41183189ea2ec2277ccc0d71a5bedec30bb8241f | 2,550 | py | Python | models/parser.py | pbreaux/LupSeat2.0 | 508902f5d932134d8ef2607a72b21b70db6e16f1 | [
"MIT"
] | null | null | null | models/parser.py | pbreaux/LupSeat2.0 | 508902f5d932134d8ef2607a72b21b70db6e16f1 | [
"MIT"
] | null | null | null | models/parser.py | pbreaux/LupSeat2.0 | 508902f5d932134d8ef2607a72b21b70db6e16f1 | [
"MIT"
] | null | null | null | import argparse
import string
import time
def parse_args():
parser = argparse.ArgumentParser(description="Assign seats to students automatically.")
parser.add_argument("--student", help="CSV file containing student list", default="student.csv")
parser.add_argument("--seats", help="Yaml file containing roo... | 52.040816 | 101 | 0.629804 |
2f7ee2da52148c04bfba6098871b5178de066f44 | 1,456 | py | Python | tests/body_test.py | JesusFreke/fscad | 0f79ec27f9141b8735e2f66efdb7dc705fd1a574 | [
"Apache-2.0"
] | 35 | 2019-02-19T08:26:52.000Z | 2022-03-17T06:05:24.000Z | tests/body_test.py | JesusFreke/fscad | 0f79ec27f9141b8735e2f66efdb7dc705fd1a574 | [
"Apache-2.0"
] | 3 | 2019-10-19T06:15:00.000Z | 2021-12-03T06:29:57.000Z | tests/body_test.py | JesusFreke/fscad | 0f79ec27f9141b8735e2f66efdb7dc705fd1a574 | [
"Apache-2.0"
] | 3 | 2019-03-31T00:11:01.000Z | 2020-03-26T21:29:57.000Z | # Copyright 2019 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, soft... | 32.355556 | 109 | 0.662775 |
76ce12ac6d292508269644033a2cc76eb53f9db6 | 26,028 | py | Python | lib/python3.9/site-packages/django/db/backends/sqlite3/base.py | HumbleSmarts/University-Management-System | 5da07c4cf0e9c1d30ab76e4428f010757ffe876a | [
"MIT"
] | 169 | 2022-01-04T06:46:48.000Z | 2022-03-31T07:17:59.000Z | lib/python3.9/site-packages/django/db/backends/sqlite3/base.py | HumbleSmarts/University-Management-System | 5da07c4cf0e9c1d30ab76e4428f010757ffe876a | [
"MIT"
] | 212 | 2022-01-04T09:46:05.000Z | 2022-03-31T23:18:08.000Z | lib/python3.9/site-packages/django/db/backends/sqlite3/base.py | HumbleSmarts/University-Management-System | 5da07c4cf0e9c1d30ab76e4428f010757ffe876a | [
"MIT"
] | 86 | 2022-01-04T06:32:30.000Z | 2022-03-30T13:05:51.000Z | """
SQLite backend for the sqlite3 module in the standard library.
"""
import datetime
import decimal
import functools
import hashlib
import math
import operator
import random
import re
import statistics
import warnings
from itertools import chain
from sqlite3 import dbapi2 as Database
from django.core.exceptions impo... | 41.845659 | 112 | 0.62913 |
fd4d6a63d870e60e930dc58c2ca9b74b2f6cb332 | 11,646 | py | Python | tests/observatory/dags/telescopes/test_mag.py | bmkramer/observatory-platform | 0f1e439df386d255b521730eea9dc396831842cd | [
"Apache-2.0"
] | null | null | null | tests/observatory/dags/telescopes/test_mag.py | bmkramer/observatory-platform | 0f1e439df386d255b521730eea9dc396831842cd | [
"Apache-2.0"
] | null | null | null | tests/observatory/dags/telescopes/test_mag.py | bmkramer/observatory-platform | 0f1e439df386d255b521730eea9dc396831842cd | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Curtin University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 44.450382 | 120 | 0.634553 |
13f3934f964c4b4467fc75ddf539a5a7df2e216f | 3,505 | py | Python | tests/components/binary_sensor/test_zwave.py | adolfoeliazat/voidhomecontrol | 6d733253811c553912e46e24debec818b28b0688 | [
"Apache-2.0"
] | 1 | 2020-08-14T15:01:33.000Z | 2020-08-14T15:01:33.000Z | tests/components/binary_sensor/test_zwave.py | adolfoeliazat/voidhomecontrol | 6d733253811c553912e46e24debec818b28b0688 | [
"Apache-2.0"
] | null | null | null | tests/components/binary_sensor/test_zwave.py | adolfoeliazat/voidhomecontrol | 6d733253811c553912e46e24debec818b28b0688 | [
"Apache-2.0"
] | 1 | 2020-08-26T20:54:14.000Z | 2020-08-26T20:54:14.000Z | """Test Z-Wave binary sensors."""
import asyncio
import datetime
from unittest.mock import patch
from homeassistant.components.zwave import const
from homeassistant.components.binary_sensor import zwave
from tests.mock.zwave import (
MockNode, MockValue, MockEntityValues, value_changed)
def test_get_device_det... | 33.701923 | 71 | 0.7301 |
614da788156dc56b2a28995c47f3afd341adb2a1 | 7,412 | py | Python | utils/qualisysClient.py | ABonnefoy/solopython | ec49e924c977f9a91697e9d5c21da73c55a55fb1 | [
"BSD-2-Clause"
] | null | null | null | utils/qualisysClient.py | ABonnefoy/solopython | ec49e924c977f9a91697e9d5c21da73c55a55fb1 | [
"BSD-2-Clause"
] | null | null | null | utils/qualisysClient.py | ABonnefoy/solopython | ec49e924c977f9a91697e9d5c21da73c55a55fb1 | [
"BSD-2-Clause"
] | 6 | 2020-04-22T14:32:24.000Z | 2021-07-26T12:44:44.000Z | """
This client connects to a Qualisys (motion capture) server with an asyncronous subprocess and expose 6d position and velocity of a given body
Thomas FLAYOLS - LAAS CNRS
"""
import asyncio
from multiprocessing import Process, Lock
from multiprocessing.sharedctypes import Value, Array
from ctypes import c_double
im... | 45.753086 | 141 | 0.630734 |
64cad630846af187bd0d64a88158b8ed601afdc2 | 687 | py | Python | smart assistance bot/giphy.py | ThomasKoscheck/Telegrambots | 74a7be4826f9736a36e8120e8f28baad2eba16e8 | [
"MIT"
] | 2 | 2017-09-13T14:46:29.000Z | 2021-02-11T09:03:45.000Z | smart assistance bot/giphy.py | ThomasKoscheck/Telegrambots | 74a7be4826f9736a36e8120e8f28baad2eba16e8 | [
"MIT"
] | null | null | null | smart assistance bot/giphy.py | ThomasKoscheck/Telegrambots | 74a7be4826f9736a36e8120e8f28baad2eba16e8 | [
"MIT"
] | null | null | null | # https://github.com/shaunduncan/giphypop
from giphypop import translate
import urllib
import os
def downloadGif(searchterm, chat_id):
try:
os.system('mkdir tmp/' + str(chat_id))
img = translate(searchterm.encode('utf-8'), api_key='dc6zaTOxFJmzC') #api_key is the open public beta key
... | 34.35 | 121 | 0.6754 |
e8e1821fd4ad417bdc48ca50c86a86ab6ab19379 | 2,877 | py | Python | Lab4/Part 2/mrjob_matrixmult2.py | KwekuYamoah/Parallel-and-Distributed-Computing | e5b53e3b5591e4f8be65dceeba4921171dc5be49 | [
"MIT"
] | null | null | null | Lab4/Part 2/mrjob_matrixmult2.py | KwekuYamoah/Parallel-and-Distributed-Computing | e5b53e3b5591e4f8be65dceeba4921171dc5be49 | [
"MIT"
] | null | null | null | Lab4/Part 2/mrjob_matrixmult2.py | KwekuYamoah/Parallel-and-Distributed-Computing | e5b53e3b5591e4f8be65dceeba4921171dc5be49 | [
"MIT"
] | null | null | null | """
@author: Kweku Andoh Yamoah
@id: 71712022
@version: 1.0.0
"""
from mrjob.job import MRJob
from matrix_dimensions import getDimensions
import math
import re
import os
import time
WORD_RE = re.compile(r"[\w']+")
matA = getDimensions("matrixA.txt")
matB = getDimensions("matrixB.txt")
i = int(matA[0])
j = int(matA... | 24.589744 | 95 | 0.547793 |
dd4abd82bf58099c2882c10d6e9ca4a5fe088f06 | 7,548 | py | Python | cnichallenge_stub/cnichallenge_stub.py | aichung/cnichallenge_stub | bf1acc98c3cbe69ced691d56b3549a826351e1c0 | [
"MIT"
] | null | null | null | cnichallenge_stub/cnichallenge_stub.py | aichung/cnichallenge_stub | bf1acc98c3cbe69ced691d56b3549a826351e1c0 | [
"MIT"
] | null | null | null | cnichallenge_stub/cnichallenge_stub.py | aichung/cnichallenge_stub | bf1acc98c3cbe69ced691d56b3549a826351e1c0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# cnichallenge_stub ds ChRIS plugin app
#
# (c) 2016-2019 Fetal-Neonatal Neuroimaging & Developmental Science Center
# Boston Children's Hospital
#
# http://childrenshospital.org/FNNDSC/
# dev@babyM... | 40.363636 | 344 | 0.529544 |
d8bfb195d8339d3219294f410e2a5f7c0f9f5041 | 219 | py | Python | test/tests/46.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:28:45.000Z | 2020-02-06T14:28:45.000Z | test/tests/46.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | test/tests/46.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:29:00.000Z | 2020-02-06T14:29:00.000Z | # Metaclass test:
class M(type):
a = 1
class C(object):
__metaclass__ = M
b = 2
o = C()
o.c = 3
print M.a
print C.b
print C.a
print o.c
print o.b
try:
print o.a
except AttributeError, e:
print e
| 9.954545 | 25 | 0.593607 |
23bfa8bed8a0b2569ce0f8276ae0e6ede2abb7c1 | 3,067 | py | Python | azure/mgmt/network/v2017_11_01/models/vpn_client_configuration.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2017_11_01/models/vpn_client_configuration.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2017_11_01/models/vpn_client_configuration.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# C... | 52.87931 | 209 | 0.716335 |
bc2cd10f02c3663b66621d496d92a1c611a770cd | 619 | py | Python | pS6.py | TrentFranks/ssNMR-Topspin-Python | 95f99dc66bc665493d81d075088486f55ccae964 | [
"MIT"
] | 3 | 2016-08-24T12:01:15.000Z | 2021-12-02T21:45:34.000Z | pS6.py | TrentFranks/ssNMR-Topspin-Python | 95f99dc66bc665493d81d075088486f55ccae964 | [
"MIT"
] | null | null | null | pS6.py | TrentFranks/ssNMR-Topspin-Python | 95f99dc66bc665493d81d075088486f55ccae964 | [
"MIT"
] | null | null | null | """
Computes various amplitudes
Arguments:
-dB:interact with db instead of watts
-qt:Do not open initial pulse window
W.T. Franks FMP Berlin
"""
import sys
from sys import argv
sys.path.append(root.UtilPath.getTopspinHome()+ '/exp/stan/nmr/py/BioPY/modules/')
import Setup, Help, SelPul
import TS_Version as Ver
cmds... | 19.967742 | 82 | 0.617124 |
16ac2946adb7a3ac0bf9f8776b0bbb9f7ac253a3 | 2,847 | py | Python | Network Simulations/Assignment 2/SW/receiver.py | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | null | null | null | Network Simulations/Assignment 2/SW/receiver.py | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | null | null | null | Network Simulations/Assignment 2/SW/receiver.py | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | 1 | 2021-08-06T14:39:53.000Z | 2021-08-06T14:39:53.000Z | import time
from frameHelper import Frame
# Define Receiver class to handle data receiving
class Receiver:
def __init__(self, connection, name:str, senderAddress:int, receiverAddress:int, file:str):
# get the client/receiver connection and other informations (name, data file name)
self.connection ... | 36.974026 | 121 | 0.550404 |
32b645bb9ac8dd18027db1dafe1c073456e4004d | 4,760 | py | Python | venvCorona/Lib/site-packages/dash_html_components/Rt.py | tarikkranda/CoronaDash | 2591c1543153217fda3b3b2f8d647b87562b5f66 | [
"MIT"
] | 2 | 2020-04-11T19:28:30.000Z | 2020-05-04T03:16:20.000Z | venv/lib/python3.7/site-packages/dash_html_components/Rt.py | thaiscaldeira/ccinsight | 94efc5d68234950687d13151b8878bbdeef53eb3 | [
"BSD-3-Clause"
] | null | null | null | venv/lib/python3.7/site-packages/dash_html_components/Rt.py | thaiscaldeira/ccinsight | 94efc5d68234950687d13151b8878bbdeef53eb3 | [
"BSD-3-Clause"
] | 1 | 2022-03-22T18:23:06.000Z | 2022-03-22T18:23:06.000Z | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class Rt(Component):
"""A Rt component.
Rt is a wrapper for the <rt> HTML5 element.
For detailed attribute info see:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt
Keyword arguments:
- chil... | 74.375 | 586 | 0.736345 |
cc51c4342fbc5e4ef1c3cd3b74d0b01f731cd5a5 | 3,239 | py | Python | dumbfs.py | paulc/citcuitpython-spiflash | 89459ebba1933a6086e23fa919d067244d425587 | [
"MIT"
] | null | null | null | dumbfs.py | paulc/citcuitpython-spiflash | 89459ebba1933a6086e23fa919d067244d425587 | [
"MIT"
] | null | null | null | dumbfs.py | paulc/citcuitpython-spiflash | 89459ebba1933a6086e23fa919d067244d425587 | [
"MIT"
] | null | null | null |
###
### WIP - NOT WORKING
###
import struct
HEADER = "8s24sIII20x" # Magic, Label, Blocksize, NBlocks, FAT Blocks
HEADER_LEN = 64
FAT_ENTRY = "64sI30H" # Name, Length, Direct Blocks (x30)
MAGIC = "DUMBFS01"
EMPTY = 0
SYS_BLOCK = 1
DATA_BLOCK = 2
class DumbFS:
def __init__(self,blockdev,de... | 26.120968 | 103 | 0.589688 |
d3759eb1a598a89db6e0426e5b8bb3e0e86c0620 | 4,171 | py | Python | example/tutorial_mnist_float16.py | awesome-archive/tensorlayer | 120a79f957926475b6f3db02da71a269f8130771 | [
"Apache-2.0"
] | null | null | null | example/tutorial_mnist_float16.py | awesome-archive/tensorlayer | 120a79f957926475b6f3db02da71a269f8130771 | [
"Apache-2.0"
] | null | null | null | example/tutorial_mnist_float16.py | awesome-archive/tensorlayer | 120a79f957926475b6f3db02da71a269f8130771 | [
"Apache-2.0"
] | 1 | 2018-03-12T23:57:57.000Z | 2018-03-12T23:57:57.000Z | #! /usr/bin/python
# -*- coding: utf-8 -*-
import time
import tensorflow as tf
import tensorlayer as tl
from tensorlayer.layers import *
D_TYPE = tf.float16 # tf.float32 tf.float16
tl.layers.D_TYPE = D_TYPE # define global dtype in tl.layers
X_train, y_train, X_val, y_val, X_test, y_test = \
tl.f... | 36.587719 | 119 | 0.641093 |
4a11350e30ab396f3e3e1f0b0244409c7ed17619 | 3,160 | py | Python | src/tools/md2amiga/marko/ext/footnote.py | dMajoIT/aqb | 7d9bc71f8bdc64a6edc49fec6815b42bb3050fda | [
"MIT"
] | 161 | 2018-08-20T07:42:44.000Z | 2022-03-31T03:17:44.000Z | src/tools/md2amiga/marko/ext/footnote.py | dMajoIT/aqb | 7d9bc71f8bdc64a6edc49fec6815b42bb3050fda | [
"MIT"
] | 102 | 2018-10-15T01:19:06.000Z | 2022-03-11T13:37:00.000Z | src/tools/md2amiga/marko/ext/footnote.py | dMajoIT/aqb | 7d9bc71f8bdc64a6edc49fec6815b42bb3050fda | [
"MIT"
] | 39 | 2019-04-07T08:13:01.000Z | 2022-02-01T15:40:59.000Z | """
Footnotes extension
~~~~~~~~~~~~~~~~~~~
Enable footnotes parsing and renderering in Marko.
Usage::
from marko import Markdown
text = 'Foo[^1]\\n\\n[^1]: This is a footnote.\\n'
markdown = Markdown(extensions=['footnote'])
print(markdown(text))
"""
import re
from marko import block, inline, help... | 27.964602 | 79 | 0.596835 |
f610cecc389264a36fadf3c5badfd844fa5739a0 | 25,953 | py | Python | test/test_html_linter.py | gtback/html-linter | a50c1abc3cb3f9f6e603fabd38150d917f7e654f | [
"Apache-2.0"
] | 38 | 2015-02-05T13:17:10.000Z | 2021-12-16T23:06:12.000Z | test/test_html_linter.py | gtback/html-linter | a50c1abc3cb3f9f6e603fabd38150d917f7e654f | [
"Apache-2.0"
] | 5 | 2015-07-30T12:21:32.000Z | 2017-04-26T12:28:50.000Z | test/test_html_linter.py | gtback/html-linter | a50c1abc3cb3f9f6e603fabd38150d917f7e654f | [
"Apache-2.0"
] | 8 | 2016-07-26T21:57:11.000Z | 2021-03-10T15:31:13.000Z | # Copyright 2014 Deezer (http://www.deezer.com)
#
# 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.110132 | 80 | 0.558741 |
c8560b1f739144540a22399c5538c33fca04b5ef | 62 | py | Python | cplxmodule/cplxmodule/nn/relevance/extensions/real/__init__.py | veya2ztn/mltool | 4ed151152845ebe3de128e1f53c478581c1492e4 | [
"IJG"
] | 86 | 2019-04-25T06:23:40.000Z | 2022-03-31T07:33:03.000Z | cplxmodule/cplxmodule/nn/relevance/extensions/real/__init__.py | veya2ztn/mltool | 4ed151152845ebe3de128e1f53c478581c1492e4 | [
"IJG"
] | 20 | 2020-04-14T12:51:21.000Z | 2022-01-08T11:33:03.000Z | cplxmodule/cplxmodule/nn/relevance/extensions/real/__init__.py | veya2ztn/mltool | 4ed151152845ebe3de128e1f53c478581c1492e4 | [
"IJG"
] | 27 | 2019-04-26T13:48:01.000Z | 2022-03-07T07:33:02.000Z | from .ell_zero import LinearL0
from .lasso import LinearLASSO
| 20.666667 | 30 | 0.83871 |
c27daeb1236ca1909550f7bc02974a2b355d7520 | 779 | py | Python | starboard/converters.py | Flame442/Trusty-cogs | d7611f6d6739e0f344d04936f7af9cfea3fa426f | [
"MIT"
] | 1 | 2021-10-05T07:19:57.000Z | 2021-10-05T07:19:57.000Z | starboard/converters.py | Flame442/Trusty-cogs | d7611f6d6739e0f344d04936f7af9cfea3fa426f | [
"MIT"
] | null | null | null | starboard/converters.py | Flame442/Trusty-cogs | d7611f6d6739e0f344d04936f7af9cfea3fa426f | [
"MIT"
] | null | null | null | from discord.ext.commands.converter import Converter
from discord.ext.commands.errors import BadArgument
from redbot.core import commands
from redbot.core.i18n import Translator
from .starboard_entry import StarboardEntry
_ = Translator("Starboard", __file__)
class StarboardExists(Converter):
async def convert(... | 35.409091 | 92 | 0.706033 |
82b44494fea7b00c6e2a4b44c863b88f996abdb1 | 15,564 | py | Python | scripts/parse_times.py | schinmayee/fluid-sim-lb | 25b774bc426e9a53d386d11ca993343550016ecc | [
"BSD-3-Clause"
] | 2 | 2018-06-11T20:42:24.000Z | 2019-10-12T04:40:10.000Z | scripts/parse_times.py | schinmayee/fluid-sim-lb | 25b774bc426e9a53d386d11ca993343550016ecc | [
"BSD-3-Clause"
] | null | null | null | scripts/parse_times.py | schinmayee/fluid-sim-lb | 25b774bc426e9a53d386d11ca993343550016ecc | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Script to generate a timeline and stats per partition and worker from
controller log file:
# It uses input-statement-id to mark the beginning of an iteration.
# Total iteration time for ith iteration = T for the next stage with
input-statement-id minus T for the current stage with input-state... | 43.966102 | 95 | 0.597212 |
d6e7a09799e772f509845b9eb8430ea669ebefd3 | 2,973 | py | Python | raccoon/saleae.py | dkirkby/raccoon | 1946492d609f9040de735fc715070253ffc63a4c | [
"MIT"
] | null | null | null | raccoon/saleae.py | dkirkby/raccoon | 1946492d609f9040de735fc715070253ffc63a4c | [
"MIT"
] | 2 | 2020-08-24T16:04:14.000Z | 2020-08-24T17:08:34.000Z | raccoon/saleae.py | dkirkby/raccoon | 1946492d609f9040de735fc715070253ffc63a4c | [
"MIT"
] | null | null | null | """Support functions for the Saleae family of logic analyzers
"""
import struct
from pathlib import Path
import numpy as np
def load_analog_binary_v1(filename):
"""Load analog traces stored in the binary format by Logic 1.2.0+
The format is documented at
https://support.saleae.com/faq/technical-faq/data... | 44.373134 | 121 | 0.636731 |
72982ae0901b4e0a80a822904d12306de77f58f8 | 40,951 | py | Python | jax/experimental/jax2tf/tests/jax2tf_limitations.py | ahmedjawedaj/jax | f7009ed1072bf48ea6ba9d6d2ce573ce0ce13377 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/experimental/jax2tf/tests/jax2tf_limitations.py | ahmedjawedaj/jax | f7009ed1072bf48ea6ba9d6d2ce573ce0ce13377 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/experimental/jax2tf/tests/jax2tf_limitations.py | ahmedjawedaj/jax | f7009ed1072bf48ea6ba9d6d2ce573ce0ce13377 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # 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, ... | 36.271922 | 137 | 0.606603 |
56805a4cf78a8b973fce967b15e712604cb42c97 | 25,632 | py | Python | example/tutorial_ptb_lstm_state_is_tuple.py | awesome-archive/tensorlayer | 120a79f957926475b6f3db02da71a269f8130771 | [
"Apache-2.0"
] | null | null | null | example/tutorial_ptb_lstm_state_is_tuple.py | awesome-archive/tensorlayer | 120a79f957926475b6f3db02da71a269f8130771 | [
"Apache-2.0"
] | null | null | null | example/tutorial_ptb_lstm_state_is_tuple.py | awesome-archive/tensorlayer | 120a79f957926475b6f3db02da71a269f8130771 | [
"Apache-2.0"
] | 1 | 2018-03-12T23:57:57.000Z | 2018-03-12T23:57:57.000Z | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""Example of Synced sequence input and output.
This is a reimpmentation of the TensorFlow official PTB example in :
tensorflow/models/rnn/ptb
The batch_size can be seem as how many concurrent computations.\n
As the following example shows, the first batch learn the sequence... | 42.08867 | 188 | 0.643922 |
00787f4b903280f0a88c16b9dff5d2c3c50e3e6a | 1,031 | py | Python | kubernetes/test/test_extensions_v1beta1_scale_spec.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | 2 | 2020-06-21T08:03:18.000Z | 2020-06-21T09:53:29.000Z | kubernetes/test/test_extensions_v1beta1_scale_spec.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_extensions_v1beta1_scale_spec.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | 1 | 2020-12-10T07:28:08.000Z | 2020-12-10T07:28:08.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.16
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import... | 25.775 | 124 | 0.742968 |
2bef3b78963672dd9b47e7ae0deaf92aecd3d1f2 | 7,172 | py | Python | validators/parcats/_line.py | wwwidonja/changed_plotly | 1bda35a438539a97c84a3ab3952e95e8848467bd | [
"MIT"
] | null | null | null | validators/parcats/_line.py | wwwidonja/changed_plotly | 1bda35a438539a97c84a3ab3952e95e8848467bd | [
"MIT"
] | null | null | null | validators/parcats/_line.py | wwwidonja/changed_plotly | 1bda35a438539a97c84a3ab3952e95e8848467bd | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class LineValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="line", parent_name="parcats", **kwargs):
super(LineValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data_... | 50.507042 | 76 | 0.54908 |
279a8f4081e3602502d7afb459ba6c1ac5d1c6af | 486 | py | Python | usaspending_api/etl/management/commands/update_file_c_linkages.py | truthiswill/usaspending-api | bd7d915442e2ec94cc830c480ceeffd4479be6c0 | [
"CC0-1.0"
] | null | null | null | usaspending_api/etl/management/commands/update_file_c_linkages.py | truthiswill/usaspending-api | bd7d915442e2ec94cc830c480ceeffd4479be6c0 | [
"CC0-1.0"
] | 1 | 2021-11-15T17:53:27.000Z | 2021-11-15T17:53:27.000Z | usaspending_api/etl/management/commands/update_file_c_linkages.py | truthiswill/usaspending-api | bd7d915442e2ec94cc830c480ceeffd4479be6c0 | [
"CC0-1.0"
] | null | null | null | from django.core.management.base import BaseCommand
from django.db import transaction
from usaspending_api.common.helpers.etl_helpers import update_c_to_d_linkages
class Command(BaseCommand):
LINKAGE_TYPES = ['contract', 'assistance']
ETL_SQL_FILE_PATH = 'usaspending_api/etl/management/sql/'
def handle... | 28.588235 | 77 | 0.736626 |
664994fdc3cf821f7e6258a206707cd852dc90a6 | 17,155 | py | Python | tools/python/boutiques/importer.py | shots47s/boutiques | 831f937a6b1491af63a800786967e4d9bca1e262 | [
"MIT"
] | null | null | null | tools/python/boutiques/importer.py | shots47s/boutiques | 831f937a6b1491af63a800786967e4d9bca1e262 | [
"MIT"
] | null | null | null | tools/python/boutiques/importer.py | shots47s/boutiques | 831f937a6b1491af63a800786967e4d9bca1e262 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from argparse import ArgumentParser
from jsonschema import ValidationError
from boutiques.validator import validate_descriptor
from boutiques.util.utils import loadJson
from boutiques.logger import raise_error
import boutiques
import yaml
import simplejson as json
import os
import os.path as op
... | 42.462871 | 80 | 0.514719 |
7cbf601b51e45724d0327e9a5e8f1fad7ddea6c2 | 185 | py | Python | agentnet/display/__init__.py | mraihan19/AgentNet | 240b7ac351d5c7a156a6c9c25432d5a7afffe3cc | [
"MIT"
] | 337 | 2016-04-20T09:34:06.000Z | 2022-03-23T10:09:15.000Z | agentnet/display/__init__.py | 17minutes/AgentNet | a0df28f6110f0e492240e0264f8ccce6cde18f99 | [
"MIT"
] | 58 | 2016-04-04T10:21:10.000Z | 2017-08-09T07:47:37.000Z | agentnet/display/__init__.py | 17minutes/AgentNet | a0df28f6110f0e492240e0264f8ccce6cde18f99 | [
"MIT"
] | 88 | 2016-04-28T01:18:11.000Z | 2021-12-05T02:48:28.000Z | """
Auxiliary functions used to visualize agent learning and policy
"""
from __future__ import division, print_function, absolute_import
from .metrics import *
from .sessions import *
| 23.125 | 64 | 0.794595 |
f3acee9d31ba13e3a43678346252052e3800ae55 | 4,435 | py | Python | mellow/core.py | unsonnet/mellow | 130cadbf3e44108bcff311889ce6c8d95fb914ab | [
"Apache-2.0"
] | null | null | null | mellow/core.py | unsonnet/mellow | 130cadbf3e44108bcff311889ce6c8d95fb914ab | [
"Apache-2.0"
] | null | null | null | mellow/core.py | unsonnet/mellow | 130cadbf3e44108bcff311889ce6c8d95fb914ab | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import warnings
import jax.numpy as np
import jax.ops as jo
import mellow.factory as factory
import mellow.ops as mo
class Network(object):
"""Homogenous feedforward neural network."""
def __init__(self, inp, out, params, act):
"""Inits Network.
Deduces the structu... | 31.013986 | 85 | 0.573168 |
d8ad81b488924c24a8823af59e06c958989fef34 | 794 | py | Python | migrations/versions/2e68eacc6cc7_new_fields_in_u_user_model.py | SDahirSalman/MicroblogEdits | 6a089c837e6feccb7fffaa3c60e06d438ed5e47e | [
"MIT"
] | null | null | null | migrations/versions/2e68eacc6cc7_new_fields_in_u_user_model.py | SDahirSalman/MicroblogEdits | 6a089c837e6feccb7fffaa3c60e06d438ed5e47e | [
"MIT"
] | null | null | null | migrations/versions/2e68eacc6cc7_new_fields_in_u_user_model.py | SDahirSalman/MicroblogEdits | 6a089c837e6feccb7fffaa3c60e06d438ed5e47e | [
"MIT"
] | null | null | null | """new fields in u user model
Revision ID: 2e68eacc6cc7
Revises: 780739b227a7
Create Date: 2021-04-11 00:08:29.684653
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2e68eacc6cc7'
down_revision = '780739b227a7'
branch_labels = None
depends_on = None
def upgr... | 25.612903 | 86 | 0.690176 |
7f210c046e91dc490060939d0fdabd0e323b1fa4 | 619 | py | Python | utils.py | ds-praveenkumar/deeplearning | 02c903c1750fe3d659b061dd7ba501a61ff39550 | [
"MIT"
] | null | null | null | utils.py | ds-praveenkumar/deeplearning | 02c903c1750fe3d659b061dd7ba501a61ff39550 | [
"MIT"
] | null | null | null | utils.py | ds-praveenkumar/deeplearning | 02c903c1750fe3d659b061dd7ba501a61ff39550 | [
"MIT"
] | null | null | null | import torch
device = torch.device( "cuda" if torch.cuda.is_available() else "cpu")
def get_device():
""" checks if the device is running CUDA or CPU """
print('Using device:', device)
print()
#Additional Info when using cuda
if device.type == 'cuda':
print(torch.cuda.get_device_name(0))
... | 28.136364 | 82 | 0.609047 |
51c57d8bd646754238c2062d5bdc8e35fafdb47a | 2,924 | py | Python | gramclone/views.py | rowenarono95/Instagram-Clone | c5a97f9a0d5cbbd8488320fc18764f869a08bf2c | [
"MIT"
] | 1 | 2020-11-20T06:52:56.000Z | 2020-11-20T06:52:56.000Z | gramclone/views.py | rowenarono95/Instagram-Clone | c5a97f9a0d5cbbd8488320fc18764f869a08bf2c | [
"MIT"
] | null | null | null | gramclone/views.py | rowenarono95/Instagram-Clone | c5a97f9a0d5cbbd8488320fc18764f869a08bf2c | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect
from django.http import HttpResponse, Http404,HttpResponseRedirect
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from .models import Post, Profile, Comments
from .forms import NewPostForm,UserUpdateForm,ProfileUpdateFo... | 34 | 91 | 0.659371 |
ea1c1249c70e294db956ba291a408f3863f6b27f | 4,382 | py | Python | main.py | Eliomar-Julian/SteamPromotion | d1f50cf4fc6d482e064685b6db6eae288d180be2 | [
"MIT"
] | 6 | 2020-10-04T19:20:05.000Z | 2020-11-10T20:45:57.000Z | main.py | Eliomar-Julian/SteamPromotion | d1f50cf4fc6d482e064685b6db6eae288d180be2 | [
"MIT"
] | 1 | 2020-11-11T04:34:18.000Z | 2020-11-11T04:34:18.000Z | main.py | Eliomar-Julian/SteamPromotion | d1f50cf4fc6d482e064685b6db6eae288d180be2 | [
"MIT"
] | 4 | 2020-10-04T18:03:31.000Z | 2020-11-11T20:04:26.000Z | import requests
from bs4 import BeautifulSoup
import sqlite3
import re
import threading
from os import system
from time import sleep
##DB
con = sqlite3.connect("ourdata.db")
cur = con.cursor()
cur.execute("CREATE TABLE IF NOT EXISTS ourgames(gamename TEXT, gameurl TEXT, gameactualprice TEXT, gametrigger TEXT)")
co... | 48.153846 | 292 | 0.629621 |
de5f33478f7795815cee385c3e8aa21685323a56 | 642 | py | Python | SortingAlgorithm/StraightInsertionSort.py | weaponsX/SortingAlgorithmForPython3 | 8b5e1dd3aaf30b74c53ff643a225024ef8fbac13 | [
"Apache-2.0"
] | null | null | null | SortingAlgorithm/StraightInsertionSort.py | weaponsX/SortingAlgorithmForPython3 | 8b5e1dd3aaf30b74c53ff643a225024ef8fbac13 | [
"Apache-2.0"
] | null | null | null | SortingAlgorithm/StraightInsertionSort.py | weaponsX/SortingAlgorithmForPython3 | 8b5e1dd3aaf30b74c53ff643a225024ef8fbac13 | [
"Apache-2.0"
] | null | null | null | # 插入排序-直接插入排序
"""插入排序是稳定的
时间复杂度:O(n^2)"""
def insertSort(numbers):
n = len(numbers)
for i in range(1, n):
# 如果当前值小于前一个元素,则将当前值作为一个临时变量存储,将前一个元素后移一位
if numbers[i] < numbers[i-1]:
# 设置当前值前一个元素的标识
j = i - 1
x = numbers[i]
numbers[i] = numbers[j]
... | 20.0625 | 64 | 0.496885 |
b2a011d05f06338c2973c3bde1eafb8a68923c77 | 952 | py | Python | .history/my_classes/FirstClassFunctions/function_introspection_20210705153908.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FirstClassFunctions/function_introspection_20210705153908.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FirstClassFunctions/function_introspection_20210705153908.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """Function Introspection
Functions are first class objects
They have attributes __doc__ __annotations__
We can attach our own attributes
def my_func(a, b):
return a + b
my_func.category = 'math'
my_func.sub_category = 'arithmetic'
print(my_func.category) # math
print(my_func.sub_cate... | 35.259259 | 526 | 0.698529 |
3a7831d4636acdeaf2ef7254cdbbb6abc6cace81 | 398 | py | Python | HM_2/Ex2_1.py | NaychukAnastasiya/goiteens-python3-naychuk | a79d0af238a15f58a822bb5d8e4d48227d4a7bc1 | [
"MIT"
] | null | null | null | HM_2/Ex2_1.py | NaychukAnastasiya/goiteens-python3-naychuk | a79d0af238a15f58a822bb5d8e4d48227d4a7bc1 | [
"MIT"
] | null | null | null | HM_2/Ex2_1.py | NaychukAnastasiya/goiteens-python3-naychuk | a79d0af238a15f58a822bb5d8e4d48227d4a7bc1 | [
"MIT"
] | null | null | null | # 1. Користувач хоче вибрати гру. Він вводить з клавітуари текст "2D" або "3D".
# Якщо користувач ввів "2D" вивести на консоль "Terraria", якщо "3D" - "Minecraft".
print("To choose game you have to enter 2D or 3D: ")
game_chosen = input()
if game_chosen == "2D":
print("Terraria")
elif game_chosen == "3D":
... | 36.181818 | 84 | 0.660804 |
d23758db54163d90c85728f8e8cbd677447f041d | 1,767 | py | Python | telegram_gcloner/handlers/get_help.py | nodirhajiev/CloneBot | 4165a1d3d71867335707277c85a2db3defb2ccc8 | [
"MIT"
] | 1 | 2021-12-10T15:22:45.000Z | 2021-12-10T15:22:45.000Z | telegram_gcloner/handlers/get_help.py | nodirhajiev/CloneBot | 4165a1d3d71867335707277c85a2db3defb2ccc8 | [
"MIT"
] | null | null | null | telegram_gcloner/handlers/get_help.py | nodirhajiev/CloneBot | 4165a1d3d71867335707277c85a2db3defb2ccc8 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import logging
from telegram.ext import Dispatcher, CommandHandler
from utils.config_loader import config
from utils.callback import callback_delete_message
from utils.restricted import restricted
logger = logging.getLogger(__name__)
def init(dispatcher: Dispatcher):
... | 43.097561 | 116 | 0.651387 |
a34983c503a2862ca3311d17f5ccb02f70eea3e1 | 325 | py | Python | app/logger.py | said-abidi/simtodo | e44aba14f92b7e2ce819486450016a49b48f728a | [
"MIT"
] | 2 | 2017-12-11T21:50:58.000Z | 2017-12-13T09:03:56.000Z | app/logger.py | said-abidi/simtodo | e44aba14f92b7e2ce819486450016a49b48f728a | [
"MIT"
] | 3 | 2017-12-11T21:47:52.000Z | 2017-12-13T21:54:39.000Z | app/logger.py | said-abidi/simtodo | e44aba14f92b7e2ce819486450016a49b48f728a | [
"MIT"
] | 1 | 2017-12-20T14:40:55.000Z | 2017-12-20T14:40:55.000Z | """
Custom logger for simtodo
"""
from __future__ import print_function
import sys
import config
def log(message):
"""
Log message in alfred debugger
Use the log_error params to log in stderr, as alfred is using stdout for his filtering
"""
if config.DEBUG == 1:
print(message, file=sys.std... | 20.3125 | 90 | 0.692308 |
bab678a13870b933d7ff3c25c4eee47752433ca8 | 2,068 | py | Python | operators/MatMul.py | MaajidKhan/ONNX-1.6.0-OP-Library | df26621fa225485849853f5e11180600be71d11d | [
"MIT"
] | null | null | null | operators/MatMul.py | MaajidKhan/ONNX-1.6.0-OP-Library | df26621fa225485849853f5e11180600be71d11d | [
"MIT"
] | null | null | null | operators/MatMul.py | MaajidKhan/ONNX-1.6.0-OP-Library | df26621fa225485849853f5e11180600be71d11d | [
"MIT"
] | null | null | null | #MatMul
import onnx
from onnx import helper
from onnx import numpy_helper
from onnx import AttributeProto, TensorProto, GraphProto
import numpy as np
from Compare_output import compare
# Create one Input (ValueInfoProto)
a = helper.make_tensor_value_info('a', TensorProto.FLOAT, [3, 4])
b = helper.make_tensor_value_inf... | 25.85 | 80 | 0.724371 |
c4067764070c3fa3aab4e77640ad1e7434457cff | 6,113 | py | Python | src/programy/clients/restful/flask/google/client.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | null | null | null | src/programy/clients/restful/flask/google/client.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | null | null | null | src/programy/clients/restful/flask/google/client.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | 4 | 2019-04-01T15:42:23.000Z | 2020-11-05T08:14:27.000Z | """
Copyright (c) 2016-2019 Keith Sterling http://www.keithsterling.com
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, m... | 38.20625 | 120 | 0.681826 |
7a0b6fc3e514f2faa9b39078e79e16adaf034e70 | 68,377 | py | Python | sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 44.487313 | 155 | 0.671439 |
2fe68cf94f7d4a0cbf2cd172cfb398477d6335a8 | 9,196 | py | Python | datacampus/datacampus/prac/views.py | gusdn3477/DataCampus | 15490ba96aa4ceabe3c2e3e0d977d4bbebe534aa | [
"MIT"
] | null | null | null | datacampus/datacampus/prac/views.py | gusdn3477/DataCampus | 15490ba96aa4ceabe3c2e3e0d977d4bbebe534aa | [
"MIT"
] | null | null | null | datacampus/datacampus/prac/views.py | gusdn3477/DataCampus | 15490ba96aa4ceabe3c2e3e0d977d4bbebe534aa | [
"MIT"
] | null | null | null | import numpy as np
import osmnx as ox, networkx as nx, geopandas as gpd, matplotlib.pyplot as plt
import seaborn as sns
import folium
import folium.plugins
import pandas as pd
from folium import plugins
from folium.plugins import MarkerCluster, HeatMap
import branca.colormap as cm
import json
import urllib.request
from... | 38.476987 | 154 | 0.570248 |
8daaa76486bba9c6931a51bcef49dbf424e5916e | 1,662 | py | Python | setup.py | troytoman/pyhole | a35816e75e2be08e6000008b604737fff9b04ac6 | [
"Apache-2.0"
] | null | null | null | setup.py | troytoman/pyhole | a35816e75e2be08e6000008b604737fff9b04ac6 | [
"Apache-2.0"
] | null | null | null | setup.py | troytoman/pyhole | a35816e75e2be08e6000008b604737fff9b04ac6 | [
"Apache-2.0"
] | 1 | 2020-04-13T17:24:53.000Z | 2020-04-13T17:24:53.000Z | # Copyright 2011-2015 Josh Kearney
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 29.157895 | 76 | 0.638387 |
ffa3af809da37f32b340e678f4d1038ebf5bcfcd | 4,732 | py | Python | tests/evolver.py | changhoonhahn/centralMS | 39b4509ea99e47ab5cf1f9be8775d53eee6de80f | [
"MIT"
] | 1 | 2018-05-30T23:43:52.000Z | 2018-05-30T23:43:52.000Z | tests/evolver.py | changhoonhahn/centralMS | 39b4509ea99e47ab5cf1f9be8775d53eee6de80f | [
"MIT"
] | 2 | 2017-04-24T22:58:40.000Z | 2017-04-24T22:59:28.000Z | tests/evolver.py | changhoonhahn/centralMS | 39b4509ea99e47ab5cf1f9be8775d53eee6de80f | [
"MIT"
] | null | null | null | '''
'''
import time
import numpy as np
# -- centralms --
from centralms import util as UT
from centralms import catalog as Cat
from centralms import evolver as Evo
from centralms import observables as Obvs
# -- plotting --
import corner as DFM
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.rcParams['... | 35.848485 | 130 | 0.595097 |
e3823586a37e4497fffc6f96afae2c1f6e852d16 | 1,855 | py | Python | src/workflows/server_update/__init__.py | turnbros/paul | 42699b4d13386b39f60a4aacede64dc4d1415ea6 | [
"CC-BY-4.0"
] | null | null | null | src/workflows/server_update/__init__.py | turnbros/paul | 42699b4d13386b39f60a4aacede64dc4d1415ea6 | [
"CC-BY-4.0"
] | null | null | null | src/workflows/server_update/__init__.py | turnbros/paul | 42699b4d13386b39f60a4aacede64dc4d1415ea6 | [
"CC-BY-4.0"
] | 1 | 2022-01-10T19:51:38.000Z | 2022-01-10T19:51:38.000Z | import logging
from ..worker import TemporalWorker
logging.basicConfig(level=logging.INFO)
class Workflow(TemporalWorker):
name = "server_test"
async def worker_workflow(self, payload: dict):
logging.info("Log from worker_workflow")
return f"Hello, I'm gonna update some shit!....maybe"... | 28.984375 | 100 | 0.735849 |
4f60b834eb9595e03d24330cb412d664f5534bb6 | 5,911 | py | Python | shanhe/iaas/actions/image.py | shanhe-nsccjn/shanhe-sdk-python | efead12f08d93a7ebb986d137da9fbfc7a43ad02 | [
"Apache-2.0"
] | null | null | null | shanhe/iaas/actions/image.py | shanhe-nsccjn/shanhe-sdk-python | efead12f08d93a7ebb986d137da9fbfc7a43ad02 | [
"Apache-2.0"
] | null | null | null | shanhe/iaas/actions/image.py | shanhe-nsccjn/shanhe-sdk-python | efead12f08d93a7ebb986d137da9fbfc7a43ad02 | [
"Apache-2.0"
] | null | null | null | # =========================================================================
# Copyright 2021-present ShanHe, Inc.
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the Licens... | 46.912698 | 96 | 0.496194 |
6a6f0bc0839c5f1adc0bc67c9b6a7c74473e54ab | 2,130 | py | Python | examples/2-benchmark/n2.py | KMCzajkowski/pyscf | e8af41d910cc0d3963655120c0b689590ad978e7 | [
"BSD-2-Clause"
] | null | null | null | examples/2-benchmark/n2.py | KMCzajkowski/pyscf | e8af41d910cc0d3963655120c0b689590ad978e7 | [
"BSD-2-Clause"
] | null | null | null | examples/2-benchmark/n2.py | KMCzajkowski/pyscf | e8af41d910cc0d3963655120c0b689590ad978e7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import time
import re
import numpy
from pyscf import lib
from pyscf import gto, scf, dft, mcscf, mp, cc, lo
def sort_mo(casscf, idx, mo_coeff):
mol = casscf.mol
corth = lo.orth.orth_ao(mol)
casorb = corth[:,idx]
nmo = mo_coeff.shape[1]
ncore = casscf.ncore
ncas ... | 27.662338 | 80 | 0.579812 |
416d382d2e9c9cd5fbeeafc1cc3bc83f61b364da | 3,576 | py | Python | src/functions/skill/models.py | milancermak/alexa-math-skill | 5e8fd5114a11528a2f754c161cc0d5b958aace3a | [
"Apache-2.0"
] | null | null | null | src/functions/skill/models.py | milancermak/alexa-math-skill | 5e8fd5114a11528a2f754c161cc0d5b958aace3a | [
"Apache-2.0"
] | null | null | null | src/functions/skill/models.py | milancermak/alexa-math-skill | 5e8fd5114a11528a2f754c161cc0d5b958aace3a | [
"Apache-2.0"
] | null | null | null | import enum
import time
from typing import Optional
import attr
asdict = attr.asdict # for a cleaner interface
# How many seconds in between launch requests should a session be kept?
# If the period is greater, a new clean session should be launched,
# ignoring any old choices the user made.
STALE_SESSION_THRESHOLD... | 31.928571 | 87 | 0.602069 |
2d66d3a6182f1b0ebfecefc6e2c0c8f63e6fbdf1 | 2,028 | py | Python | pcv_book/searchdemo.py | douglasgoodwin/PCV | f48a271946a912992abcbba234263aef3430161d | [
"BSD-2-Clause"
] | 1,551 | 2015-01-01T00:16:25.000Z | 2022-03-30T06:51:05.000Z | pcv_book/searchdemo.py | douglasgoodwin/PCV | f48a271946a912992abcbba234263aef3430161d | [
"BSD-2-Clause"
] | 20 | 2015-05-08T08:45:24.000Z | 2021-12-07T06:57:41.000Z | pcv_book/searchdemo.py | douglasgoodwin/PCV | f48a271946a912992abcbba234263aef3430161d | [
"BSD-2-Clause"
] | 665 | 2015-01-01T15:51:42.000Z | 2022-03-30T08:39:15.000Z | import cherrypy, os, urllib, pickle
from numpy import *
import imagesearch
class SearchDemo:
def __init__(self):
# load list of images
f = open('webimlist.txt')
self.imlist = f.readlines()
f.close()
self.nbr_images = len(self.imlist)
self.ndx = range(self.nbr_i... | 29.823529 | 102 | 0.468935 |
55df8783f989164062166568e8be187e6d8fda1d | 126 | py | Python | mylambdatatoo/__init__.py | urenajose/Lambdata-Too-SaraW | 8e5e3680c79788b60a740f0783cdf53bd1967fda | [
"MIT"
] | null | null | null | mylambdatatoo/__init__.py | urenajose/Lambdata-Too-SaraW | 8e5e3680c79788b60a740f0783cdf53bd1967fda | [
"MIT"
] | null | null | null | mylambdatatoo/__init__.py | urenajose/Lambdata-Too-SaraW | 8e5e3680c79788b60a740f0783cdf53bd1967fda | [
"MIT"
] | null | null | null | """Nothing to see here."""
from .ds_utilities import *
__version__ = '0.0.6'
my_string = 'This is my_sting from __init__.py' | 21 | 47 | 0.706349 |
f1d38bf185325a38ca27ae68572f6e19f2e80e5f | 2,361 | py | Python | airflow/providers/amazon/aws/operators/sagemaker_endpoint_config.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 1 | 2019-05-07T06:46:55.000Z | 2019-05-07T06:46:55.000Z | airflow/providers/amazon/aws/operators/sagemaker_endpoint_config.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 7 | 2021-06-28T20:24:56.000Z | 2022-02-26T02:01:36.000Z | airflow/providers/amazon/aws/operators/sagemaker_endpoint_config.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 1 | 2019-06-15T08:38:53.000Z | 2019-06-15T08:38:53.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 36.323077 | 105 | 0.694197 |
b46c412ced26cec0542c7b5a3cf5941534e5363a | 585 | py | Python | tests/data23/recipe-577920.py | JohannesBuchner/pystrict3 | f442a89ac6a23f4323daed8ef829d8e9e1197f90 | [
"BSD-2-Clause"
] | 1 | 2020-06-05T08:53:26.000Z | 2020-06-05T08:53:26.000Z | tests/data23/recipe-577920.py | JohannesBuchner/pystrict3 | f442a89ac6a23f4323daed8ef829d8e9e1197f90 | [
"BSD-2-Clause"
] | 1 | 2020-06-04T13:47:19.000Z | 2020-06-04T13:47:57.000Z | tests/data23/recipe-577920.py | JohannesBuchner/pystrict3 | f442a89ac6a23f4323daed8ef829d8e9e1197f90 | [
"BSD-2-Clause"
] | 1 | 2020-11-07T17:02:46.000Z | 2020-11-07T17:02:46.000Z | '''
@author: Yoav Glazner
'''
def block(code):
code = 'def anon(*args, **kw):\n'+'\n'.join(
"\t\t%s" % line for line in code.split('\n') if line.strip())
env = {}
exec(code, env)
return env['anon'] #@UndefinedVariable suppressed
if __name__ == '__main__':
from threading impor... | 18.870968 | 81 | 0.499145 |
c13823e18186800a68edbfd83f5e0be891808392 | 1,020 | py | Python | cli/tests/pcluster/cli_commands/test_pcluster_update.py | gkao123/aws-parallelcluster | e46b91d5a6d8d8ba39e43188e19fdb7525313473 | [
"Apache-2.0"
] | null | null | null | cli/tests/pcluster/cli_commands/test_pcluster_update.py | gkao123/aws-parallelcluster | e46b91d5a6d8d8ba39e43188e19fdb7525313473 | [
"Apache-2.0"
] | null | null | null | cli/tests/pcluster/cli_commands/test_pcluster_update.py | gkao123/aws-parallelcluster | e46b91d5a6d8d8ba39e43188e19fdb7525313473 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
# with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file accom... | 36.428571 | 119 | 0.728431 |
39ed7b63720c42f139708a2f7f65635344d1ece5 | 16,599 | py | Python | pirates/inventory/InventoryUIConsumableItem.py | ksmit799/POTCO-PS | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 8 | 2017-01-24T04:33:29.000Z | 2020-11-01T08:36:24.000Z | pirates/inventory/InventoryUIConsumableItem.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 1 | 2017-03-02T18:05:17.000Z | 2017-03-14T06:47:10.000Z | pirates/inventory/InventoryUIConsumableItem.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 11 | 2017-03-02T18:46:07.000Z | 2020-11-01T08:36:26.000Z | from direct.gui.DirectGui import *
from panda3d.core import *
from pirates.piratesgui import GuiPanel, PiratesGuiGlobals
from pirates.piratesbase import PiratesGlobals
from pirates.piratesbase import PLocalizer
from pirates.piratesbase import Freebooter
from otp.otpbase import OTPLocalizer
from pirates.inventory.Invent... | 46.626404 | 432 | 0.642268 |
fb636b0f78e0a2273039d1e3bae403fb1e965fc0 | 455 | py | Python | misc/scripts/memsort.py | georgikoemdzhiev/godot | 5dac35a300504bfa193e98102eac727b287323ea | [
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | 152 | 2015-01-05T21:23:07.000Z | 2022-02-17T14:44:13.000Z | misc/scripts/memsort.py | georgikoemdzhiev/godot | 5dac35a300504bfa193e98102eac727b287323ea | [
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | 38 | 2021-07-29T01:15:35.000Z | 2022-03-20T01:01:28.000Z | misc/scripts/memsort.py | georgikoemdzhiev/godot | 5dac35a300504bfa193e98102eac727b287323ea | [
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | 25 | 2015-01-19T13:49:32.000Z | 2020-04-18T10:05:09.000Z |
import sys
arg = "memdump.txt"
if (len(sys.argv) > 1):
arg = sys.argv[1]
f = open(arg, "rb")
l = f.readline()
sum = {}
cnt = {}
while(l != ""):
s = l.split("-")
amount = int(s[1])
what = s[2]
if (what in sum):
sum[what] += amount
cnt[what] += 1
else:
sum[what] ... | 12.638889 | 65 | 0.448352 |
b48a4b3d6c2cc415edc555eadd09b1fbb2c058c3 | 6,720 | py | Python | interaction_prediction/DataPrep/raw_features.py | david9dragon9/AIR | cbcb7cb74f4280596ede9d998f75f20c272843bd | [
"Apache-2.0"
] | 16 | 2021-06-20T17:01:46.000Z | 2021-12-16T19:04:42.000Z | interaction_prediction/DataPrep/raw_features.py | david9dragon9/AIR | cbcb7cb74f4280596ede9d998f75f20c272843bd | [
"Apache-2.0"
] | 1 | 2022-03-03T08:49:40.000Z | 2022-03-04T03:24:09.000Z | interaction_prediction/DataPrep/raw_features.py | david9dragon9/AIR | cbcb7cb74f4280596ede9d998f75f20c272843bd | [
"Apache-2.0"
] | 4 | 2021-08-18T13:36:42.000Z | 2022-03-04T06:03:44.000Z | import math
import os
import uuid
import time
from matplotlib import cm
import matplotlib.animation as animation
import matplotlib.pyplot as plt
import numpy as np
from IPython.display import HTML
import itertools
import tensorflow as tf
from google.protobuf import text_format
from waymo_open_dataset.metrics.ops imp... | 43.636364 | 75 | 0.690476 |
bda8b342be2b5875732f1af7c195f8c5219de67b | 3,866 | py | Python | src/dirbs/config/amnesty.py | a-wakeel/DIRBS-Core | a80563c6dee0695f6be62c37abdcb702f174b717 | [
"PostgreSQL",
"Unlicense"
] | 19 | 2018-09-16T10:59:23.000Z | 2022-01-12T09:37:41.000Z | src/dirbs/config/amnesty.py | dirbs/DIRBS-Core | a80563c6dee0695f6be62c37abdcb702f174b717 | [
"PostgreSQL",
"Unlicense"
] | 5 | 2020-03-25T14:12:24.000Z | 2021-06-22T06:35:19.000Z | src/dirbs/config/amnesty.py | a-wakeel/DIRBS-Core | a80563c6dee0695f6be62c37abdcb702f174b717 | [
"PostgreSQL",
"Unlicense"
] | 19 | 2018-10-11T06:29:53.000Z | 2021-11-18T05:44:42.000Z | """
DIRBS Core amnesty configuration section parser.
Copyright (c) 2018-2021 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the
limitations in the disclaimer below) provided that the following conditions are ... | 53.694444 | 118 | 0.75194 |
af687592afff88a5aebfb5087492d0ffedd577a3 | 4,428 | py | Python | app/recipe/test/test_ingredients_api.py | clicktravel-chris/recipe-app-api | a2423f79f4b7618ff0f82096b989292120a7c426 | [
"MIT"
] | null | null | null | app/recipe/test/test_ingredients_api.py | clicktravel-chris/recipe-app-api | a2423f79f4b7618ff0f82096b989292120a7c426 | [
"MIT"
] | null | null | null | app/recipe/test/test_ingredients_api.py | clicktravel-chris/recipe-app-api | a2423f79f4b7618ff0f82096b989292120a7c426 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Ingredient, Recipe
from recipe.serializers import IngredientSerializer
INGREDIENTS_URL = reverse('recip... | 34.061538 | 78 | 0.657633 |
3b328514580c6a34a7bbd5502e6f65df6d5afb5f | 8,466 | py | Python | src/examplePlugins/link_shot_to_sequence.py | guncys/ShotgunEvents | b0f36b604ee7be2da069605dba564c22200606e2 | [
"MIT"
] | null | null | null | src/examplePlugins/link_shot_to_sequence.py | guncys/ShotgunEvents | b0f36b604ee7be2da069605dba564c22200606e2 | [
"MIT"
] | 1 | 2020-09-23T17:47:28.000Z | 2020-09-23T17:47:28.000Z | src/examplePlugins/link_shot_to_sequence.py | Speared/shotgunEvents | cb185dfa02c249574efffa292b35d52e1a0a06e5 | [
"MIT"
] | null | null | null | # Copyright 2018 Autodesk, Inc. All rights reserved.
#
# Use of this software is subject to the terms of the Autodesk license agreement
# provided at the time of installation or download, or which otherwise accompanies
# this software in either electronic or hard copy form.
#
# See docs folder for detailed usage info... | 34.555102 | 96 | 0.613985 |
e6aec4b6a4e2f2414802b79885a709706e3bcc1e | 14,983 | py | Python | ironic_neutron_plugin/tests/unit/test_plugin.py | rackerlabs/ironic-neutron-plugin | 7b3e19840048bc49d846362b84973c2f2b03b05e | [
"Apache-2.0"
] | 10 | 2015-01-21T22:04:40.000Z | 2017-06-29T06:55:45.000Z | ironic_neutron_plugin/tests/unit/test_plugin.py | rackerlabs/ironic-neutron-plugin | 7b3e19840048bc49d846362b84973c2f2b03b05e | [
"Apache-2.0"
] | null | null | null | ironic_neutron_plugin/tests/unit/test_plugin.py | rackerlabs/ironic-neutron-plugin | 7b3e19840048bc49d846362b84973c2f2b03b05e | [
"Apache-2.0"
] | 8 | 2015-01-30T16:40:30.000Z | 2020-07-23T06:06:53.000Z | # Copyright (c) 2014 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 37.740554 | 79 | 0.607088 |
1804c7e3646dc40c7d533fc60aa31a922194e848 | 1,266 | py | Python | cuckoo/komand_cuckoo/actions/view_machine/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | cuckoo/komand_cuckoo/actions/view_machine/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | cuckoo/komand_cuckoo/actions/view_machine/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
from .schema import ViewMachineInput, ViewMachineOutput
# Custom imports below
import json
import requests
class ViewMachine(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='view_machine',
description='Returns details on the ana... | 30.142857 | 101 | 0.559242 |
b5e32ba715210991ce9e93f0cdee19372358da60 | 3,872 | py | Python | h2o-py/tests/testdir_algos/stackedensemble/pyunit_stackedensemble_levelone_frame.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 6,098 | 2015-05-22T02:46:12.000Z | 2022-03-31T16:54:51.000Z | h2o-py/tests/testdir_algos/stackedensemble/pyunit_stackedensemble_levelone_frame.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2,517 | 2015-05-23T02:10:54.000Z | 2022-03-30T17:03:39.000Z | h2o-py/tests/testdir_algos/stackedensemble/pyunit_stackedensemble_levelone_frame.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2,199 | 2015-05-22T04:09:55.000Z | 2022-03-28T22:20:45.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import print_function
import h2o
import sys
sys.path.insert(1,"../../../") # allow us to run this standalone
from h2o.estimators.random_forest import H2ORandomForestEstimator
from h2o.estimators.gbm import H2OGradientBoostingEstimator
from h2o.estimato... | 39.111111 | 151 | 0.688791 |
a4232ca2ebf786fb555e48453377a1e6aa494635 | 13,619 | py | Python | pandas/compat/numpy/function.py | blueenvelope31/pandas | 6e1f41b45a0d08f662b794ed98695b8595f39023 | [
"BSD-3-Clause"
] | 4 | 2021-03-02T19:57:18.000Z | 2021-06-20T19:23:57.000Z | pandas/compat/numpy/function.py | 16umm001/pandas | a2e599499667b256bc5b8b13a75f0601eccfd432 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/compat/numpy/function.py | 16umm001/pandas | a2e599499667b256bc5b8b13a75f0601eccfd432 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-05-04T15:41:25.000Z | 2021-05-04T15:41:25.000Z | """
For compatibility with numpy libraries, pandas functions or
methods have to accept '*args' and '**kwargs' parameters to
accommodate numpy arguments that are not actually used or
respected in the pandas implementation.
To ensure that users do not abuse these parameters, validation
is performed in 'validators.py' to... | 35.466146 | 79 | 0.652397 |
eee2584e05d8bdc1f229c593f1ce4c5bf747697e | 50 | py | Python | summa/exception/textrank_runtime_error.py | pblankley/textrank | 7d833f3ddefc410fbd728042cf41e1acbc34a4fe | [
"MIT"
] | 1,177 | 2015-03-31T02:43:57.000Z | 2022-03-27T07:02:28.000Z | summa/exception/textrank_runtime_error.py | pblankley/textrank | 7d833f3ddefc410fbd728042cf41e1acbc34a4fe | [
"MIT"
] | 57 | 2015-07-03T02:06:12.000Z | 2021-12-28T19:47:25.000Z | summa/exception/textrank_runtime_error.py | pblankley/textrank | 7d833f3ddefc410fbd728042cf41e1acbc34a4fe | [
"MIT"
] | 273 | 2015-12-11T13:39:58.000Z | 2022-03-27T07:02:33.000Z | class TextrankRuntimeError(RuntimeError):
pass | 25 | 41 | 0.82 |
7718704dc87176ad0a43c9d3efa96c2f71e7cc8f | 9,610 | py | Python | qspectra/dynamics/zofe.py | marwahaha/QSpectra | 328a4f78af1473d65c011eb99b903c7f0ef1db32 | [
"BSD-2-Clause"
] | 14 | 2018-02-01T03:06:26.000Z | 2021-09-16T02:50:31.000Z | qspectra/dynamics/zofe.py | whaley-group-berkeley/qspectra | f0f971ea26c4595a9c7bd4ee98e31e9ba63451c6 | [
"BSD-2-Clause"
] | 5 | 2018-01-02T20:33:14.000Z | 2021-11-12T23:59:20.000Z | qspectra/dynamics/zofe.py | whaley-group-berkeley/qspectra | f0f971ea26c4595a9c7bd4ee98e31e9ba63451c6 | [
"BSD-2-Clause"
] | 7 | 2018-04-19T05:08:41.000Z | 2021-09-16T01:45:24.000Z | import numpy as np
from ..bath import PseudomodeBath
from .base import DynamicalModel, SystemOperator
from .liouville_space import matrix_to_ket_vec
class ZOFESpaceOperator(SystemOperator):
"""
Parameters
----------
operator : np.ndarray
Matrix representation of the operator in the Hilbert su... | 40.893617 | 100 | 0.620395 |
673a497dd49b9fffe7185b280c91aa2378ab3d78 | 99,587 | py | Python | lib/python3.6/site-packages/matplotlib/transforms.py | srakrn/2017-204111 | 1660d8bc3ce9238dda622a058043a2922e7aca40 | [
"MIT"
] | 5 | 2017-11-15T10:33:42.000Z | 2021-11-16T02:21:31.000Z | matplotlib/transforms.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 2 | 2017-10-28T03:30:26.000Z | 2017-10-28T03:31:00.000Z | matplotlib/transforms.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 6 | 2017-11-30T00:34:20.000Z | 2021-05-20T02:58:02.000Z | """
matplotlib includes a framework for arbitrary geometric
transformations that is used determine the final position of all
elements drawn on the canvas.
Transforms are composed into trees of :class:`TransformNode` objects
whose actual value depends on their children. When the contents of
children change, their pare... | 33.758305 | 94 | 0.589906 |
785662538c7f9adef21d0725cdba26baf7bafcba | 81 | py | Python | tests/parser/query.21.test.py | veltri/DLV2 | 944aaef803aa75e7ec51d7e0c2b0d964687fdd0e | [
"Apache-2.0"
] | null | null | null | tests/parser/query.21.test.py | veltri/DLV2 | 944aaef803aa75e7ec51d7e0c2b0d964687fdd0e | [
"Apache-2.0"
] | null | null | null | tests/parser/query.21.test.py | veltri/DLV2 | 944aaef803aa75e7ec51d7e0c2b0d964687fdd0e | [
"Apache-2.0"
] | null | null | null | input = """
b | c.
b ? %not b ?
"""
output = """
b | c.
b ? %not b ?
"""
| 7.363636 | 13 | 0.308642 |
3f0016583d52113dcda2bdfedb368f67d008a118 | 8,125 | py | Python | twikwak17/phases/phase7.py | shaypal5/gender_augmented_twitter_network | 3a33feb4dfdb9413201d7844a15ecacf21ef9ba0 | [
"MIT"
] | null | null | null | twikwak17/phases/phase7.py | shaypal5/gender_augmented_twitter_network | 3a33feb4dfdb9413201d7844a15ecacf21ef9ba0 | [
"MIT"
] | null | null | null | twikwak17/phases/phase7.py | shaypal5/gender_augmented_twitter_network | 3a33feb4dfdb9413201d7844a15ecacf21ef9ba0 | [
"MIT"
] | null | null | null | """Phase 7 of the twikwak17 dataset generation process."""
import re
import gc
import time
import gzip
# import zipfile
from contextlib import ExitStack
from twikwak17.shared import (
qprint,
seconds_to_duration_str,
phase_output_report_fpath,
set_output_report_file_handle,
create_timestamped_rep... | 33.995816 | 78 | 0.605415 |
9dc43ae1f8a9c841c8ac838220868e3a3f0d6722 | 3,439 | py | Python | aiida/orm/implementation/sqlalchemy/convert.py | pranavmodx/aiida-core | 0edbbf82dfb97ab130914d1674a6f2217eba5971 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | aiida/orm/implementation/sqlalchemy/convert.py | pranavmodx/aiida-core | 0edbbf82dfb97ab130914d1674a6f2217eba5971 | [
"BSD-2-Clause",
"MIT"
] | 2 | 2019-03-06T11:23:42.000Z | 2020-03-09T09:34:07.000Z | aiida/orm/implementation/sqlalchemy/convert.py | lorisercole/aiida-core | 84c2098318bf234641219e55795726f99dc25a16 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 31.263636 | 113 | 0.63187 |
eddbfe19619d72f4fcfd85542da665c1698a7c1f | 1,230 | py | Python | vjezba7/zadatak1.py | vmilkovic/racunarski-i-robotski-vid | c18283f129c60c75b053e746c282f5583079e9d2 | [
"MIT"
] | null | null | null | vjezba7/zadatak1.py | vmilkovic/racunarski-i-robotski-vid | c18283f129c60c75b053e746c282f5583079e9d2 | [
"MIT"
] | null | null | null | vjezba7/zadatak1.py | vmilkovic/racunarski-i-robotski-vid | c18283f129c60c75b053e746c282f5583079e9d2 | [
"MIT"
] | null | null | null | # Napišite program koji će na slici detektirati lice i oči. Preuzmite sliku s licem i primijenite Viola & Jones algoritam baziran radu: link na rad. Za pomoć koristite dokumentaciju OpenCV: https://docs.opencv.org/3.4/db/d28/tutorial_cascade_classifier.html.
import cv2 as cv
face_cascade = cv.CascadeClassifier(
"... | 37.272727 | 259 | 0.634146 |
cde401a490ee36e6eba0374532007bc6df9eaed9 | 814 | py | Python | jacotei_api_v1/model/OfferResponse.py | jacotei/jacotei-api-sdk-python3 | 7987d7ca13e4f99168301692a5e2a856e5b46d91 | [
"MIT"
] | null | null | null | jacotei_api_v1/model/OfferResponse.py | jacotei/jacotei-api-sdk-python3 | 7987d7ca13e4f99168301692a5e2a856e5b46d91 | [
"MIT"
] | 2 | 2016-06-15T19:08:20.000Z | 2016-06-15T19:09:35.000Z | jacotei_api_v1/model/OfferResponse.py | jacotei/jacotei-api-sdk-python3 | 7987d7ca13e4f99168301692a5e2a856e5b46d91 | [
"MIT"
] | 3 | 2016-06-15T18:38:19.000Z | 2018-03-25T20:18:09.000Z | #!/usr/bin/env python
class OfferResponse:
def __init__(self):
self.swaggerTypes = {
'accepted_offers_count': 'int',
'total_offers_count': 'int',
'offers_rejected': 'list[OfferRejected]'
}
self.attributeMap = {
'accepted_offers... | 23.941176 | 59 | 0.544226 |
8e4d2a9bda651dda45503940da4c6e9d664c8445 | 3,408 | py | Python | src/atlas_cnv.py | zhouyangwang/AtlasCNV | 4094259e74f4eef2a3e962658c059b546cf2d5cd | [
"BSD-3-Clause"
] | null | null | null | src/atlas_cnv.py | zhouyangwang/AtlasCNV | 4094259e74f4eef2a3e962658c059b546cf2d5cd | [
"BSD-3-Clause"
] | null | null | null | src/atlas_cnv.py | zhouyangwang/AtlasCNV | 4094259e74f4eef2a3e962658c059b546cf2d5cd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
# --------------------------------------------------------------------------------
# main atlas_cnv.pl v0, Sep 11, 2018. Ted Chiang
# Copyright 2016-2018, Baylor College of Medicine Human Genome Sequencing Center.
# All rights reserved.
# This is python3 version of atlas_cnv written by wangzy@haplox... | 46.054054 | 162 | 0.658157 |
27a808175a67c5bde85ef4bcdb0e92f72bca626c | 998 | py | Python | Examples/DtmfSignalAnalysis.py | marko-kr/PyDmtf | bc56ca4b1ec0a63780222925b70bf68df76f201d | [
"MIT"
] | null | null | null | Examples/DtmfSignalAnalysis.py | marko-kr/PyDmtf | bc56ca4b1ec0a63780222925b70bf68df76f201d | [
"MIT"
] | null | null | null | Examples/DtmfSignalAnalysis.py | marko-kr/PyDmtf | bc56ca4b1ec0a63780222925b70bf68df76f201d | [
"MIT"
] | null | null | null | import numpy as np
import wave
import matplotlib.pyplot as plt
from Dtmf import freq_amp, sort_freq_amp, detect_dtmf
# Show time and freq domain representation of the given signal
# Print the most significant frequencies by amplitude
# Print the detected DTMF signal
def main():
fname = "../Resources/1.wav"
w... | 27.722222 | 64 | 0.680361 |
b2961a6db4d9c7a0663d5212ba4954ced6520acf | 1,409 | py | Python | web/api/py/codechecker_api_shared/setup.py | hyker/codechecker | 8ddb9bd1aa037d4499a2be8d35e9c1d470163baf | [
"Apache-2.0"
] | 1 | 2021-04-08T16:51:45.000Z | 2021-04-08T16:51:45.000Z | web/api/py/codechecker_api_shared/setup.py | hyker/codechecker | 8ddb9bd1aa037d4499a2be8d35e9c1d470163baf | [
"Apache-2.0"
] | 1 | 2021-11-30T10:43:49.000Z | 2021-11-30T10:43:49.000Z | web/api/py/codechecker_api_shared/setup.py | hyker/codechecker | 8ddb9bd1aa037d4499a2be8d35e9c1d470163baf | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
# io.open is needed for projects that support Python 2.7
# Python 3 only projects can skip this import
from io import open
# Get the long description from the README file
with open('README.md', encoding='utf-8', errors="ignore") as f:
long_description = f.read()
api_ve... | 30.630435 | 80 | 0.660752 |
b9833c4a58a09619af64f829fdf713d008a1c16c | 2,767 | py | Python | thorpy/miscgui/constants.py | YannThorimbert/ThorPy-1.4.2 | 25df805a0ec0cf54c31db5d4fda473880b19e336 | [
"MIT"
] | null | null | null | thorpy/miscgui/constants.py | YannThorimbert/ThorPy-1.4.2 | 25df805a0ec0cf54c31db5d4fda473880b19e336 | [
"MIT"
] | null | null | null | thorpy/miscgui/constants.py | YannThorimbert/ThorPy-1.4.2 | 25df805a0ec0cf54c31db5d4fda473880b19e336 | [
"MIT"
] | null | null | null | """
This module defines constant variables used by the GUI. These variable should
never be modified by user.
Variables defining the style or theme of the GUI can be found in:
- style.py
- painterstyle.py
"""
import pygame.event as pygame_event
from pygame.font import get_fonts
from pygame.locals import USEREVE... | 25.385321 | 102 | 0.730755 |
eab72e9e847e5931ab422ac8510c516cfb02b81b | 24,592 | py | Python | espnet/nets/pytorch_backend/e2e_asr_transformer.py | lumaku/espnet | 4752982875310a2a3bcb1634a8b15b7ccda75547 | [
"Apache-2.0"
] | 5 | 2020-10-26T11:28:04.000Z | 2021-12-17T07:49:11.000Z | espnet/nets/pytorch_backend/e2e_asr_transformer.py | lumaku/espnet | 4752982875310a2a3bcb1634a8b15b7ccda75547 | [
"Apache-2.0"
] | null | null | null | espnet/nets/pytorch_backend/e2e_asr_transformer.py | lumaku/espnet | 4752982875310a2a3bcb1634a8b15b7ccda75547 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Shigeki Karita
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""Transformer speech recognition model (pytorch)."""
from argparse import Namespace
from distutils.util import strtobool
import logging
import math
import numpy
import torch
from espnet.nets.asr_interface import ASRInterfac... | 38.605965 | 88 | 0.560548 |
672597bebb2060bf6424546bf3a40d6cb1996fa4 | 4,615 | py | Python | tests/gameboard/conftest.py | aplatkouski/tic-tac-toe | d5dc8f5c1f75226989326163a18505e6d88a8f49 | [
"MIT"
] | null | null | null | tests/gameboard/conftest.py | aplatkouski/tic-tac-toe | d5dc8f5c1f75226989326163a18505e6d88a8f49 | [
"MIT"
] | null | null | null | tests/gameboard/conftest.py | aplatkouski/tic-tac-toe | d5dc8f5c1f75226989326163a18505e6d88a8f49 | [
"MIT"
] | 1 | 2020-08-25T12:51:53.000Z | 2020-08-25T12:51:53.000Z | from __future__ import annotations
from typing import cast
from typing import TYPE_CHECKING
import pytest # type: ignore
from ap_games.ap_collections import Cell
from ap_games.ap_collections import Coordinate
from ap_games.ap_constants import EMPTY
from ap_games.ap_constants import O_MARK
from ap_games.ap_constants... | 24.945946 | 79 | 0.672589 |
af26ba07a9929efb71dc3e4e64d10e7e7f3a2f80 | 3,913 | py | Python | train.py | ralfeger/language-identification | 80c79423389207f197911d7b0eb78143f25f44b6 | [
"BSD-2-Clause"
] | null | null | null | train.py | ralfeger/language-identification | 80c79423389207f197911d7b0eb78143f25f44b6 | [
"BSD-2-Clause"
] | null | null | null | train.py | ralfeger/language-identification | 80c79423389207f197911d7b0eb78143f25f44b6 | [
"BSD-2-Clause"
] | null | null | null | """
:author:
Paul Bethge (bethge@zkm.de)
2021
:License:
This package is published under Simplified BSD License.
"""
import os
import shutil
import argparse
from datetime import datetime
from yaml import load
import tensorflow as tf
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.models import load... | 31.813008 | 97 | 0.744442 |
c120a0b163b624d9d1ad3a946563a3d8011116a7 | 2,443 | py | Python | submissions/Parkinson/vacuum2.py | dysomni/aima-python | c67104e50007ec5ac2a9aa37f0cb972cb6315528 | [
"MIT"
] | null | null | null | submissions/Parkinson/vacuum2.py | dysomni/aima-python | c67104e50007ec5ac2a9aa37f0cb972cb6315528 | [
"MIT"
] | null | null | null | submissions/Parkinson/vacuum2.py | dysomni/aima-python | c67104e50007ec5ac2a9aa37f0cb972cb6315528 | [
"MIT"
] | 1 | 2018-08-23T19:27:23.000Z | 2018-08-23T19:27:23.000Z | import agents as ag
def HW2Agent() -> object:
def program(percept):
bump, status = percept
if status == 'Dirty':
action = 'Suck'
else:
lastBump, lastStatus, = program.oldPercepts[-1]
if program.count == 0:
if bump == 'Bump':
... | 31.727273 | 60 | 0.388047 |
63ecba799f46d0f5eac9d4b36eb31927284fc7e6 | 12,384 | py | Python | app/models/product.py | AlexEpstein1/316Amazon | 75820b3cdd2d511826ade78b6c5739ac93c04a62 | [
"MIT"
] | null | null | null | app/models/product.py | AlexEpstein1/316Amazon | 75820b3cdd2d511826ade78b6c5739ac93c04a62 | [
"MIT"
] | null | null | null | app/models/product.py | AlexEpstein1/316Amazon | 75820b3cdd2d511826ade78b6c5739ac93c04a62 | [
"MIT"
] | 1 | 2022-03-22T00:22:16.000Z | 2022-03-22T00:22:16.000Z | from flask import current_app as app
from flask_login import current_user
from sqlalchemy import exc
class Product:
def __init__(self, id, name, cat_name, description, image_file, available):
self.id = id
self.name = name
self.cat_name = cat_name
self.description = description
... | 35.181818 | 130 | 0.544654 |
8aed18f6d6eb876b616ba6e235f5efdbfc6f58f8 | 3,284 | py | Python | git_auto_svn.py | airtimemedia/depot_tools | 697cb664f2306718b2b9645b41e1d5bd7ae5766c | [
"BSD-3-Clause"
] | 1 | 2016-07-09T02:40:59.000Z | 2016-07-09T02:40:59.000Z | git_auto_svn.py | airtimemedia/depot_tools | 697cb664f2306718b2b9645b41e1d5bd7ae5766c | [
"BSD-3-Clause"
] | null | null | null | git_auto_svn.py | airtimemedia/depot_tools | 697cb664f2306718b2b9645b41e1d5bd7ae5766c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# 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.
"""Performs all git-svn setup steps necessary for 'git svn dcommit' to work.
Assumes that trunk of the svn remote maps to master of th... | 32.196078 | 80 | 0.700365 |
49aeab441844bb46122ec98d7c9b0fea5f073335 | 3,951 | py | Python | q2_shogun/_shogun.py | nbokulich/q2-shogun | dee1f734ad845161cdf69f80d0c3494bcb966b51 | [
"BSD-3-Clause"
] | null | null | null | q2_shogun/_shogun.py | nbokulich/q2-shogun | dee1f734ad845161cdf69f80d0c3494bcb966b51 | [
"BSD-3-Clause"
] | null | null | null | q2_shogun/_shogun.py | nbokulich/q2-shogun | dee1f734ad845161cdf69f80d0c3494bcb966b51 | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2018-2020, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 37.990385 | 78 | 0.587952 |
4c4449acce7ebc6581dcfd7bab26c493622a9072 | 1,255 | py | Python | scripts/mac-osx-build/2_notarise_package.py | kevindurston21/YANOM-Note-O-Matic | c61845791bccfc043759eaa91e189d31d7276ae2 | [
"MIT"
] | 7 | 2021-03-01T18:32:26.000Z | 2022-02-05T22:45:33.000Z | scripts/mac-osx-build/2_notarise_package.py | kevindurston21/YANOM-Note-O-Matic | c61845791bccfc043759eaa91e189d31d7276ae2 | [
"MIT"
] | 50 | 2021-02-28T17:36:49.000Z | 2022-03-08T20:09:04.000Z | scripts/mac-osx-build/2_notarise_package.py | kevindurston21/YANOM-Note-O-Matic | c61845791bccfc043759eaa91e189d31d7276ae2 | [
"MIT"
] | 3 | 2021-06-17T23:55:23.000Z | 2021-08-09T10:29:54.000Z | import os
import subprocess
import zipfile
import secrets
VERSION = '1.6.0'
NOTARISE_ZIP_FILENAME = f'yanom-v{VERSION}'
def main():
create_zip_of_yanom()
submit_for_notarisation()
print('Check notarisation submission details above. NOTE THE RequestUUID:')
print('run "xcrun altool --notarization-inf... | 33.918919 | 147 | 0.733865 |
e5493688d36d7fe2553b67dc033b8e2f6d7c6586 | 2,225 | py | Python | snappy/grovepi/pygrovepi/grove_air_quality_sensor.py | gerald-yang/ubuntu-iotivity-demo | 17e799e209442bbefb2df846e329c802ee5255f7 | [
"Apache-2.0"
] | 7 | 2016-03-07T02:07:21.000Z | 2022-01-21T02:22:41.000Z | snappy/grovepi/pygrovepi/grove_air_quality_sensor.py | gerald-yang/ubuntu-iotivity-demo | 17e799e209442bbefb2df846e329c802ee5255f7 | [
"Apache-2.0"
] | null | null | null | snappy/grovepi/pygrovepi/grove_air_quality_sensor.py | gerald-yang/ubuntu-iotivity-demo | 17e799e209442bbefb2df846e329c802ee5255f7 | [
"Apache-2.0"
] | 8 | 2016-06-14T06:01:11.000Z | 2020-04-22T09:21:44.000Z | #!/usr/bin/env python
#
# GrovePi Example for using the Grove Air Quality Sensor (http://www.seeedstudio.com/wiki/Grove_-_Air_Quality_Sensor)
#
# The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
#
# Have a question about this examp... | 34.230769 | 139 | 0.739775 |
ea4cc5c3d6a58eb5255f499689007831ca733120 | 2,209 | py | Python | lib/surface/resource_manager/folders/update.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/resource_manager/folders/update.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/resource_manager/folders/update.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2016 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... | 35.629032 | 80 | 0.743775 |
46a1f02d1e1a0dfdcd633ac8d6cdeaa24a85d04a | 200 | py | Python | doc/examples/example03.py | vinceatbluelabs/config_resolver | 6de95833d037629405c649ba8dbc6a9ced064393 | [
"MIT"
] | null | null | null | doc/examples/example03.py | vinceatbluelabs/config_resolver | 6de95833d037629405c649ba8dbc6a9ced064393 | [
"MIT"
] | null | null | null | doc/examples/example03.py | vinceatbluelabs/config_resolver | 6de95833d037629405c649ba8dbc6a9ced064393 | [
"MIT"
] | null | null | null | import logging
from config_resolver import get_config
logging.basicConfig(level=logging.DEBUG)
cfg = get_config("bird_feeder", "acmecorp", {"version": "1.0"}).config
print(cfg.get('section', 'var'))
| 28.571429 | 70 | 0.755 |
9f39bf33622c47d14d946f43096fcfceeac59ac6 | 4,266 | py | Python | python/calculator.py | apoorvapacharne/Darsy | 41199d0bc486b76a75deb3efd498722582fb4ce3 | [
"MIT"
] | null | null | null | python/calculator.py | apoorvapacharne/Darsy | 41199d0bc486b76a75deb3efd498722582fb4ce3 | [
"MIT"
] | null | null | null | python/calculator.py | apoorvapacharne/Darsy | 41199d0bc486b76a75deb3efd498722582fb4ce3 | [
"MIT"
] | null | null | null | import ply.lex as lex
import ply.yacc as yacc
import math
def text_to_num(text):
num_words = {}
units = [
"zero", "one", "two", "three", "four", "five", "six", "seven", "eight",
"nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen",
"sixteen", "seventeen", "eighteen"... | 34.682927 | 137 | 0.58767 |
a41880791e00070dee4367fa46bbd19c7181eeea | 221,123 | py | Python | all_functions/configs/Links_site/pubs_acs_org.py | Heroku-elasa/-heroku-buildpack-python-ieee-new | 06ec2fda04d9e478ed2506400e460489b0ca91ab | [
"MIT"
] | null | null | null | all_functions/configs/Links_site/pubs_acs_org.py | Heroku-elasa/-heroku-buildpack-python-ieee-new | 06ec2fda04d9e478ed2506400e460489b0ca91ab | [
"MIT"
] | 15 | 2021-03-18T20:23:25.000Z | 2022-03-11T23:16:16.000Z | all_functions/configs/Links_site/pubs_acs_org.py | Heroku-elasa/heroku-buildpack-python-ieee-new | 06ec2fda04d9e478ed2506400e460489b0ca91ab | [
"MIT"
] | 1 | 2017-03-04T16:48:55.000Z | 2017-03-04T16:48:55.000Z | #!/usr/bin/python
#----------------------------------------------------------------------
#
# Author: Laszlo Nagy
#
# Copyright: (c) 2005 by Szoftver Messias Bt.
# Licence: BSD style
#
#
#----------------------------------------------------------------------
# from __future__ import with_statement
# from goo... | 48.174946 | 319 | 0.466532 |
9d5d5bab08090173b41635c9de2321b53db62979 | 57 | py | Python | isup/__init__.py | amureki/isup | e7dcb98d1b67b0411f69461b2587734f747e416f | [
"MIT"
] | 5 | 2015-05-12T08:45:21.000Z | 2018-06-23T13:09:38.000Z | isup/__init__.py | amureki/isup | e7dcb98d1b67b0411f69461b2587734f747e416f | [
"MIT"
] | 1 | 2016-09-13T23:08:54.000Z | 2016-11-06T16:31:03.000Z | isup/__init__.py | amureki/isup | e7dcb98d1b67b0411f69461b2587734f747e416f | [
"MIT"
] | 2 | 2015-11-16T02:17:12.000Z | 2018-09-24T07:14:25.000Z | __author__ = 'Rustem Sayargaliev'
__version__ = '1.0.1'
| 14.25 | 33 | 0.719298 |
aa1aedc16d0dcdb9fa1062ea2abad64203ccb0c7 | 9,161 | py | Python | python/cuml/test/test_preproc_utils.py | Nyrio/cuml | 4d069915b9d12fa8b301d1c5e4bb4abe5198d1a4 | [
"Apache-2.0"
] | 1 | 2021-05-12T02:51:08.000Z | 2021-05-12T02:51:08.000Z | python/cuml/test/test_preproc_utils.py | garrisonhess/cuml | a0b4553be114a6c6d701e57a84757c8e2dfa14d0 | [
"Apache-2.0"
] | null | null | null | python/cuml/test/test_preproc_utils.py | garrisonhess/cuml | a0b4553be114a6c6d701e57a84757c8e2dfa14d0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020-2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 34.182836 | 74 | 0.633774 |
bdc615955aa406567db09fb4bbe4c43a712c36f6 | 2,406 | py | Python | smsdemo/httpserver/handler.py | team-telnyx/telnyx-sms-demo-server | 52f8187adaa4fe178986c6a313a39d7883612f38 | [
"MIT"
] | null | null | null | smsdemo/httpserver/handler.py | team-telnyx/telnyx-sms-demo-server | 52f8187adaa4fe178986c6a313a39d7883612f38 | [
"MIT"
] | null | null | null | smsdemo/httpserver/handler.py | team-telnyx/telnyx-sms-demo-server | 52f8187adaa4fe178986c6a313a39d7883612f38 | [
"MIT"
] | 6 | 2018-01-01T18:53:08.000Z | 2019-04-15T15:17:52.000Z | """
Simple SMS Echo Server.
The server inherits from http.server.BaseHTTPRequestHandler and implements a
POST handler.
The webhook signature is verified before Validation is performed on the
integrity of the message before echoing the message back to the sender.
"""
import http.server
import json
import logging
impo... | 31.657895 | 76 | 0.633832 |
06b3598464f9907e2e1f99414d87a7717842a34a | 7,319 | py | Python | dfttopif/drivers.py | jgaff/pif-dft | 0fcc136560973f0f99cd257108cdfbc497207e4f | [
"Apache-2.0"
] | null | null | null | dfttopif/drivers.py | jgaff/pif-dft | 0fcc136560973f0f99cd257108cdfbc497207e4f | [
"Apache-2.0"
] | null | null | null | dfttopif/drivers.py | jgaff/pif-dft | 0fcc136560973f0f99cd257108cdfbc497207e4f | [
"Apache-2.0"
] | null | null | null | import os
import uuid
import tarfile
import shutil
from dfttopif.parsers import VaspParser
from dfttopif.parsers import PwscfParser
from dfttopif.parsers.base import InvalidIngesterException
from pypif.obj import *
import json
def _add_quality_report(parser, pif, inline=True):
import tarfile
# if the parser ... | 31.277778 | 116 | 0.625222 |
3ace49ca1349b69e553baaf14969f69a53329810 | 1,132 | py | Python | benchmarking/plotting/plot.py | ParsaVahidi/Deep-Reinforcent-Learning-for-openAI-car-racing-game | 1e104d0a6473a772aac7c09a1234bdfa961f40ed | [
"MIT"
] | null | null | null | benchmarking/plotting/plot.py | ParsaVahidi/Deep-Reinforcent-Learning-for-openAI-car-racing-game | 1e104d0a6473a772aac7c09a1234bdfa961f40ed | [
"MIT"
] | null | null | null | benchmarking/plotting/plot.py | ParsaVahidi/Deep-Reinforcent-Learning-for-openAI-car-racing-game | 1e104d0a6473a772aac7c09a1234bdfa961f40ed | [
"MIT"
] | 1 | 2022-02-04T21:29:28.000Z | 2022-02-04T21:29:28.000Z | import matplotlib.pyplot as plt
import numpy as np
import os
print(os.environ['PATH'])
plt.rc('text', usetex=True)
plt.rc('font', family='serif')
algos = ['hc', 'a3c', 'ddpg', 'ddqn', 'dqn', 'ppo']
bar_labels = ['hard-coded', 'A3C', 'DDPG', 'DDQN', 'DQN', 'PPO']
colors = ['orangered', 'forestgreen', 'royalblue', 'dark... | 28.3 | 88 | 0.638693 |
ae069e6b0cd45d7cff69c705a6e8929e58343202 | 8,398 | py | Python | functions/source/AssetModelUpdater/createSitewiseResources.py | jieatelement/quickstart-aws-industrial-machine-connectivity | ca6af4dcbf795ce4a91adcbec4b206147ab26bfa | [
"Apache-2.0"
] | null | null | null | functions/source/AssetModelUpdater/createSitewiseResources.py | jieatelement/quickstart-aws-industrial-machine-connectivity | ca6af4dcbf795ce4a91adcbec4b206147ab26bfa | [
"Apache-2.0"
] | null | null | null | functions/source/AssetModelUpdater/createSitewiseResources.py | jieatelement/quickstart-aws-industrial-machine-connectivity | ca6af4dcbf795ce4a91adcbec4b206147ab26bfa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import collections.abc
from datetime import date, datetime
import json
import logging
import os
import re
import sys
import tempfile
import time
import boto3
from boto3.dynamodb.conditions import Key
from botocore.exceptions import ClientError
from sitewiseUtils import SitewiseUtils
log = logg... | 32.677043 | 102 | 0.591093 |
45f5162fd0afc1db7062b2418ba02578339c6955 | 14,721 | py | Python | Code/JavaWrappers/parse_doxy_html.py | kazuyaujihara/rdkit | 06027dcd05674787b61f27ba46ec0d42a6037540 | [
"BSD-3-Clause"
] | 1,609 | 2015-01-05T02:41:13.000Z | 2022-03-30T21:57:24.000Z | Code/JavaWrappers/parse_doxy_html.py | kazuyaujihara/rdkit | 06027dcd05674787b61f27ba46ec0d42a6037540 | [
"BSD-3-Clause"
] | 3,412 | 2015-01-06T12:13:33.000Z | 2022-03-31T17:25:41.000Z | Code/JavaWrappers/parse_doxy_html.py | bp-kelley/rdkit | e0de7c9622ce73894b1e7d9568532f6d5638058a | [
"BSD-3-Clause"
] | 811 | 2015-01-11T03:33:48.000Z | 2022-03-28T11:57:49.000Z | #! /usr/bin/python
# parse_doxy_html.py
""""Parse Doxygen-generated html files to get out stuff we want for Javadocs
Most code here works on doxytext: this is text taken from Doxygen-generated html created by
processing the C++ code. That html is viewed with Firefox and the appropriate pieces (now starting at
"Detai... | 31.122622 | 216 | 0.676584 |
75c08ec1e3988a11c4b97458643516eae68e6f11 | 1,491 | py | Python | Node/Deployer/Deployer.py | ADanayi/openCOT | fb1263e3d5f9c70d92403cc60cef80b005b8720b | [
"MIT"
] | 7 | 2018-12-30T03:42:41.000Z | 2020-09-30T09:02:46.000Z | Node/Deployer/Deployer.py | ADanayi/openCOT | fb1263e3d5f9c70d92403cc60cef80b005b8720b | [
"MIT"
] | null | null | null | Node/Deployer/Deployer.py | ADanayi/openCOT | fb1263e3d5f9c70d92403cc60cef80b005b8720b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 22 21:06:27 2018
@author: root
"""
import docker
import shutil
import os
class Deployer:
def __init__(self, buildPath, basePath):
self.client = docker.from_env()
self.client.containers.prune()
self.buildPath = buildPath... | 29.235294 | 71 | 0.568746 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.