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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3b2433b810599805288a87224cb1bcc869430798 | 2,302 | py | Python | download_recordings/source/get_spectrum_names.py | PCH-Engineering/pch-cloud | 9b0f774c6f15e8ee02f8311b4965816d04d73edd | [
"MIT"
] | null | null | null | download_recordings/source/get_spectrum_names.py | PCH-Engineering/pch-cloud | 9b0f774c6f15e8ee02f8311b4965816d04d73edd | [
"MIT"
] | null | null | null | download_recordings/source/get_spectrum_names.py | PCH-Engineering/pch-cloud | 9b0f774c6f15e8ee02f8311b4965816d04d73edd | [
"MIT"
] | 1 | 2020-12-03T17:53:14.000Z | 2020-12-03T17:53:14.000Z | # import pchcloud api
import usermanager
import timerecording
import device
import pprint
import json
from datetime import datetime, timedelta
import os
from pathlib import Path
parentdir = Path(__file__).parents[1]
pp = pprint.PrettyPrinter(indent=4)
if __name__ == "__main__":
# gets all time recordings fr... | 32.422535 | 150 | 0.638575 | # import pchcloud api
import usermanager
import timerecording
import device
import pprint
import json
from datetime import datetime, timedelta
import dateutil.parser
import os
from pathlib import Path
parentdir = Path(__file__).parents[1]
pp = pprint.PrettyPrinter(indent=4)
if __name__ == "__main__":
# ge... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 23 |
d271bee57de53ffbc2a1d3f37c2435aaca3dcafb | 421 | py | Python | Nails segmentation/config.py | Vrushank264/Image-Segmentation-PyTorch | 1777ce554332e79a2c93067fa19fb512c0e463ec | [
"MIT"
] | null | null | null | Nails segmentation/config.py | Vrushank264/Image-Segmentation-PyTorch | 1777ce554332e79a2c93067fa19fb512c0e463ec | [
"MIT"
] | null | null | null | Nails segmentation/config.py | Vrushank264/Image-Segmentation-PyTorch | 1777ce554332e79a2c93067fa19fb512c0e463ec | [
"MIT"
] | null | null | null | import torch
IMAGE_DIR = 'E:/Computer Vision/Segmentation/Data/Train/Images'
MASK_DIR = 'E:/Computer Vision/Segmentation/Data/Train/labels'
VALID_IMAGE_DIR = 'E:/Computer Vision/Segmentation/Data/Validation/Images'
VALID_MASK_DIR = 'E:/Computer Vision/Segmentation/Data/Validation/labels'
MODEL_SAVE_DIR = 'E:/Com... | 38.272727 | 75 | 0.771971 | import torch
IMAGE_DIR = 'E:/Computer Vision/Segmentation/Data/Train/Images'
MASK_DIR = 'E:/Computer Vision/Segmentation/Data/Train/labels'
VALID_IMAGE_DIR = 'E:/Computer Vision/Segmentation/Data/Validation/Images'
VALID_MASK_DIR = 'E:/Computer Vision/Segmentation/Data/Validation/labels'
MODEL_SAVE_DIR = 'E:/Com... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e9354da65bce905929c7e30e8d029033ec612dd2 | 2,430 | bzl | Python | tools/bazel_compat.bzl | marcin-kozinski/dagger | 3342e55365c41bc63aaec77cab3214bd9efb32af | [
"Apache-2.0"
] | 17,481 | 2015-01-01T03:47:42.000Z | 2022-03-31T22:30:34.000Z | tools/bazel_compat.bzl | marcin-kozinski/dagger | 3342e55365c41bc63aaec77cab3214bd9efb32af | [
"Apache-2.0"
] | 1,982 | 2015-01-01T18:16:55.000Z | 2022-03-31T18:35:19.000Z | tools/bazel_compat.bzl | marcin-kozinski/dagger | 3342e55365c41bc63aaec77cab3214bd9efb32af | [
"Apache-2.0"
] | 2,552 | 2015-01-03T15:58:02.000Z | 2022-03-30T11:10:08.000Z | # Copyright (C) 202 The Dagger Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 36.818182 | 90 | 0.690535 | # Copyright (C) 202 The Dagger Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 0 | 0 | 0 | 0 | 0 | 68 | 0 | 0 | 23 |
e5e25d26d2611f295464d0b5dc788af2d5a30c89 | 3,097 | py | Python | mnist_keras.py | awbuana/basic-ALPR | 54aba811bba5c8c288cc52242f82f09fce3b87a1 | [
"CNRI-Python"
] | null | null | null | mnist_keras.py | awbuana/basic-ALPR | 54aba811bba5c8c288cc52242f82f09fce3b87a1 | [
"CNRI-Python"
] | null | null | null | mnist_keras.py | awbuana/basic-ALPR | 54aba811bba5c8c288cc52242f82f09fce3b87a1 | [
"CNRI-Python"
] | null | null | null | import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
import time
start_time = time.time()
batch_size = 20
num_classes = 10
epochs = 20
# input image dimensions... | 32.260417 | 71 | 0.672263 | import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
import cv2
import numpy as np
import time
start_time = time.time()
batch_size = 20
num_classes = 10... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -5 | 46 |
d33a5b9f1a60b2f9241c597d64795b2abd1d63ae | 834 | py | Python | examples/successive_run.py | rickyHong/Gate-Quantum-gpu-repl | 165533d4cc41989555dafca0e7a03f8ddef02e98 | [
"Apache-2.0"
] | 32 | 2019-06-04T04:52:04.000Z | 2021-06-19T12:09:20.000Z | examples/successive_run.py | rickyHong/Gate-Quantum-gpu-repl | 165533d4cc41989555dafca0e7a03f8ddef02e98 | [
"Apache-2.0"
] | 2 | 2019-01-03T03:59:48.000Z | 2019-01-04T00:36:46.000Z | examples/successive_run.py | shinmorino/qgate_sandbox | b8a7da1475c7f43c1050e8f2e10806a3cfe748e3 | [
"Apache-2.0"
] | 7 | 2019-06-14T08:46:49.000Z | 2021-07-15T10:23:24.000Z | import qgate
# creating simulator instance
sim = qgate.simulator.cpu()
# creating quantum registers that represent qubits.
qregs = new_qregs(3)
qreg0, qreg1, qreg2 = qregs
print('1 qubit')
sim.run(H(qreg0))
qgate.dump(sim.qubits)
print('2 qubits')
sim.run(X(qreg1))
qgate.dump(sim.qubits)
print('3 qubits')
sim.run(... | 20.341463 | 51 | 0.708633 | import qgate
from qgate.script import *
# creating simulator instance
sim = qgate.simulator.cpu()
# creating quantum registers that represent qubits.
qregs = new_qregs(3)
qreg0, qreg1, qreg2 = qregs
print('1 qubit')
sim.run(H(qreg0))
qgate.dump(sim.qubits)
print('2 qubits')
sim.run(X(qreg1))
qgate.dump(sim.qubits)
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 22 |
99be90013a8329e44cd4542f497044618555d9e1 | 15,038 | py | Python | orquesta/tests/unit/base.py | batk0/orquesta | f03f3f2f3820bf111a9277f4f6c5d6c83a89d004 | [
"Apache-2.0"
] | null | null | null | orquesta/tests/unit/base.py | batk0/orquesta | f03f3f2f3820bf111a9277f4f6c5d6c83a89d004 | [
"Apache-2.0"
] | null | null | null | orquesta/tests/unit/base.py | batk0/orquesta | f03f3f2f3820bf111a9277f4f6c5d6c83a89d004 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 36.857843 | 99 | 0.644966 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 0 | 7,957 | 0 | 5,928 | 0 | 0 | 0 | 131 | 471 |
5a368164322fce6f50cdfa9287519291164999e1 | 2,342 | py | Python | Sprint_3/data_playground.py | bcgbr5/CS4320_SWEngineering | 043cbc3fd8eaa13600d25a3135dc28160416e131 | [
"MIT"
] | null | null | null | Sprint_3/data_playground.py | bcgbr5/CS4320_SWEngineering | 043cbc3fd8eaa13600d25a3135dc28160416e131 | [
"MIT"
] | null | null | null | Sprint_3/data_playground.py | bcgbr5/CS4320_SWEngineering | 043cbc3fd8eaa13600d25a3135dc28160416e131 | [
"MIT"
] | null | null | null | #Assignment 12 : Basic Data Analysis
# Basic demonstration manipulating publicly available datasets
# Simply run with your latitude and longitude to get the last day_count
# days of weather at the trail_count nearest Mountian Bike trails to your location
# within distance miles of your location
import requests, tim... | 55.761905 | 204 | 0.653715 | #Assignment 12 : Basic Data Analysis
# Basic demonstration manipulating publicly available datasets
# Simply run with your latitude and longitude to get the last day_count
# days of weather at the trail_count nearest Mountian Bike trails to your location
# within distance miles of your location
import requests,time... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 |
ed1eb3847de4b0043a5d59d2e89ac417a5945b72 | 2,197 | py | Python | app.py | imranariffin/ruspeakr-api | 367872162e6cceea19de6a84f52d8f4013262c4f | [
"Unlicense"
] | null | null | null | app.py | imranariffin/ruspeakr-api | 367872162e6cceea19de6a84f52d8f4013262c4f | [
"Unlicense"
] | null | null | null | app.py | imranariffin/ruspeakr-api | 367872162e6cceea19de6a84f52d8f4013262c4f | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from sys import argv
import bottle
bottle.debug(True)
# --------------------------------------------- #
# speakrs api:
# ready:
# GET /speakrs
# todo:
# POST /me/set-speech-title
# GET /speakr?id=id
# --------------------------------------------- #
... | 23.37234 | 121 | 0.597633 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from sys import argv
import bottle
from bottle import default_app, request, route, response, get
from pymongo import MongoClient
import json
import api
bottle.debug(True)
def enable_cors(fn):
def _enable_cors(*args, **kwargs):
# set CORS headers
resp... | 0 | 758 | 0 | 0 | 0 | 507 | 0 | 29 | 319 |
772e76e64a0a17085bdfc3f960eaa2f7fc8176f0 | 1,908 | py | Python | data-structures/python_priority_queue_heap.py | Prashant47/algorithms | 352c33fdfb91d8ba06bb3f6a8cbe5465ed5ae3e7 | [
"MIT"
] | null | null | null | data-structures/python_priority_queue_heap.py | Prashant47/algorithms | 352c33fdfb91d8ba06bb3f6a8cbe5465ed5ae3e7 | [
"MIT"
] | null | null | null | data-structures/python_priority_queue_heap.py | Prashant47/algorithms | 352c33fdfb91d8ba06bb3f6a8cbe5465ed5ae3e7 | [
"MIT"
] | null | null | null | """ min oriented priority queue implemented with binary heap array based implementation """
if __name__ == "__main__":
heapq = HeapPriorityQueue()
heapq.add(3,4)
heapq.add(8,21)
heapq.add(2,3)
heapq.add(4,5)
print(heapq.min())
| 28.058824 | 91 | 0.555556 | """ min oriented priority queue implemented with binary heap array based implementation """
from python_priority_queue import PriorityQueueBase
class HeapPriorityQueue(PriorityQueueBase):
def _parent(self,j):
return (j - 1) // 2
def _left(self,j):
return 2*j + 1
def _right(self,j):
... | 0 | 0 | 0 | 1,581 | 0 | 0 | 0 | 30 | 45 |
63384792606aaadb4362ef698f7ce071b6a3935e | 14,376 | py | Python | pox/openflow/spanning_forest.py | reyreaud-l/pox | c6f25fcf5f36689818ebf24ce43d2e943fc0cdbb | [
"Apache-2.0"
] | 5 | 2015-03-11T01:32:10.000Z | 2020-12-10T13:18:47.000Z | pox/openflow/spanning_forest.py | reyreaud-l/pox | c6f25fcf5f36689818ebf24ce43d2e943fc0cdbb | [
"Apache-2.0"
] | 1 | 2019-12-23T07:50:41.000Z | 2019-12-23T07:50:41.000Z | pox/openflow/spanning_forest.py | reyreaud-l/pox | c6f25fcf5f36689818ebf24ce43d2e943fc0cdbb | [
"Apache-2.0"
] | 9 | 2015-04-21T04:22:20.000Z | 2021-10-31T22:57:05.000Z | # Copyright 2017 James McCauley
#
# 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... | 27.806576 | 80 | 0.634947 | # Copyright 2017 James McCauley
#
# 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... | 0 | 741 | 0 | 11,617 | 0 | 186 | 0 | 35 | 295 |
7fd723faf0181583da3a554ade11ba8a1781e5ac | 1,104 | py | Python | threelargest/program.py | mladuke/Algorithms | eab5d89c5f496b2849f0646dbfa3a4db93a0b391 | [
"MIT"
] | null | null | null | threelargest/program.py | mladuke/Algorithms | eab5d89c5f496b2849f0646dbfa3a4db93a0b391 | [
"MIT"
] | null | null | null | threelargest/program.py | mladuke/Algorithms | eab5d89c5f496b2849f0646dbfa3a4db93a0b391 | [
"MIT"
] | null | null | null | ''' # Copyright 2019 AlgoExpert, LLC. All rights reserved.
# O(n) time | O(1) space
def findThreeLargestNumbers(array):
threeLargest = [None, None, None]
for num in array:
print(num)
updateLargest(threeLargest, num)
print(threeLargest)
print("_______________")
return threeLargest
... | 30.666667 | 80 | 0.652174 | ''' # Copyright © 2019 AlgoExpert, LLC. All rights reserved.
# O(n) time | O(1) space
def findThreeLargestNumbers(array):
threeLargest = [None, None, None]
for num in array:
print(num)
updateLargest(threeLargest, num)
print(threeLargest)
print("_______________")
return threeLargest
... | 2 | 0 | 0 | 0 | 0 | 114 | 0 | 0 | 23 |
e022b910530304140d9c59c096e334d1ce19c513 | 472 | py | Python | sequential_pytorch/src/config/config_yelp.py | yixinwang/lidvae-public | 8a0a6a5873888ec68c67dd1802bc42294abe2330 | [
"MIT"
] | 1 | 2022-02-02T12:50:05.000Z | 2022-02-02T12:50:05.000Z | sequential_pytorch/src/config/config_yelp.py | yixinwang/lidvae-public | 8a0a6a5873888ec68c67dd1802bc42294abe2330 | [
"MIT"
] | null | null | null | sequential_pytorch/src/config/config_yelp.py | yixinwang/lidvae-public | 8a0a6a5873888ec68c67dd1802bc42294abe2330 | [
"MIT"
] | null | null | null |
params={
'enc_type': 'lstm',
'dec_type': 'lstm',
'nz': 32,
'ni': 512,
'enc_nh': 1024,
'dec_nh': 1024,
'dec_dropout_in': 0.5,
'dec_dropout_out': 0.5,
'batch_size': 32,
'epochs': 100,
'test_nepoch': 5,
'train_data': 'datasets/yelp_data/yelp.train.txt',
'val_data': 'dat... | 22.47619 | 54 | 0.580508 |
params={
'enc_type': 'lstm',
'dec_type': 'lstm',
'nz': 32,
'ni': 512,
'enc_nh': 1024,
'dec_nh': 1024,
'dec_dropout_in': 0.5,
'dec_dropout_out': 0.5,
'batch_size': 32,
'epochs': 100,
'test_nepoch': 5,
'train_data': 'datasets/yelp_data/yelp.train.txt',
'val_data': 'dat... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b57ffd6c28863c9be86cb4a4735db487cbb1f130 | 1,236 | py | Python | algorithms/code/hackerrank/piling_up/test_piling_up.py | altermarkive/interview-training | 6a13f5b2f466156ad5db0e25da0e601d2404b4c3 | [
"MIT"
] | null | null | null | algorithms/code/hackerrank/piling_up/test_piling_up.py | altermarkive/interview-training | 6a13f5b2f466156ad5db0e25da0e601d2404b4c3 | [
"MIT"
] | 1 | 2020-06-21T11:52:30.000Z | 2020-06-21T11:52:30.000Z | algorithms/code/hackerrank/piling_up/test_piling_up.py | altermarkive/training | 6a13f5b2f466156ad5db0e25da0e601d2404b4c3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# https://www.hackerrank.com/challenges/piling-up
# #python
if __name__ == '__main__': # pragma: no cover
main()
| 24.235294 | 70 | 0.574434 | #!/usr/bin/env python3
# https://www.hackerrank.com/challenges/piling-up
# #python
import collections
import io
import sys
import unittest
def check(cubes):
q = collections.deque(cubes)
previous = None
while q:
left = q[0]
right = q[-1]
if left < right:
current = q.pop... | 0 | 0 | 0 | 451 | 0 | 513 | 0 | -32 | 158 |
cac01ac92bcce0003f7a46c1075caf6b1abb2396 | 4,814 | py | Python | tests/sht3x/test_response_types.py | Sensirion/python-i2c-sht | 5c90df3efe2beb926a36b58850c8b75af8a57527 | [
"BSD-3-Clause"
] | 4 | 2020-09-21T02:00:51.000Z | 2021-10-16T16:01:54.000Z | tests/sht3x/test_response_types.py | Sensirion/python-i2c-sht | 5c90df3efe2beb926a36b58850c8b75af8a57527 | [
"BSD-3-Clause"
] | 2 | 2020-11-17T20:06:57.000Z | 2021-04-06T08:50:05.000Z | tests/sht3x/test_response_types.py | Sensirion/python-i2c-sht | 5c90df3efe2beb926a36b58850c8b75af8a57527 | [
"BSD-3-Clause"
] | 2 | 2021-02-16T17:23:06.000Z | 2021-03-25T15:04:13.000Z | # -*- coding: utf-8 -*-
# (c) Copyright 2020 Sensirion AG, Switzerland
from __future__ import absolute_import, division, print_function
| 37.317829 | 79 | 0.635438 | # -*- coding: utf-8 -*-
# (c) Copyright 2020 Sensirion AG, Switzerland
from __future__ import absolute_import, division, print_function
from sensirion_i2c_sht.sht3x import Sht3xTemperature, Sht3xHumidity, \
Sht3xStatusRegister
import pytest
@pytest.mark.parametrize("value", [
dict({'ticks': 0, 'degrees_celsi... | 0 | 4,496 | 0 | 0 | 0 | 0 | 0 | 65 | 113 |
bb358b4d44bfcc4fefe8b9fd32efa9b1db98c249 | 3,652 | py | Python | cache-simulator/cache_model_evaluation/StorageSystemTest.py | zdvresearch/fast15-paper-addons | 8001f658ba819202186bf84892f4718eefd021fe | [
"MIT"
] | null | null | null | cache-simulator/cache_model_evaluation/StorageSystemTest.py | zdvresearch/fast15-paper-addons | 8001f658ba819202186bf84892f4718eefd021fe | [
"MIT"
] | null | null | null | cache-simulator/cache_model_evaluation/StorageSystemTest.py | zdvresearch/fast15-paper-addons | 8001f658ba819202186bf84892f4718eefd021fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = 'meatz'
import sys
#from guppy import hpy
START_TIME = 0
USER_ID = 1
HOST_ID = 2
PROCESS_ID = 3
REQUEST = 4
PARAMS = 5
FILE_SIZE = 6
EXECUTION_TIME = 7
ADDITIONAL_INFO = 8
KB = 1024
MB = 1024 * KB
GB = 1024 * MB
TB = 1024 * GB
... | 21.868263 | 86 | 0.54655 | #!/usr/bin/env python
__author__ = 'meatz'
import os
import sys
import gzip
import json
import hashlib
import resource
import datetime
#from guppy import hpy
from CacheBuckets import CacheBuckets
from StorageSystem import StorageSystem
START_TIME = 0
USER_ID = 1
HOST_ID = 2
PROCESS_ID =... | 0 | 0 | 0 | 0 | 231 | 2,195 | 0 | -17 | 293 |
83845838ddd59cdef99fb6b77fbf8537bfabaf9d | 3,847 | py | Python | setup/cRIO/server.py | MichiganRobotX/wamv | 4612255e9e14a2d1324d8daeb2b7ddf7c187e8a0 | [
"BSD-3-Clause"
] | 1 | 2022-01-26T17:12:25.000Z | 2022-01-26T17:12:25.000Z | setup/cRIO/server.py | MichiganRobotX/wamv | 4612255e9e14a2d1324d8daeb2b7ddf7c187e8a0 | [
"BSD-3-Clause"
] | null | null | null | setup/cRIO/server.py | MichiganRobotX/wamv | 4612255e9e14a2d1324d8daeb2b7ddf7c187e8a0 | [
"BSD-3-Clause"
] | 2 | 2020-05-09T10:21:02.000Z | 2022-02-26T16:40:44.000Z | """ cRIO server requests
'acquire_raw_data'
"""
##Fuction to calculate heading based on 3 hydrophone's data
man = CRIOManager()
man.callback()
| 31.024194 | 117 | 0.59007 | """ cRIO server requests
'acquire_raw_data'
"""
import socket
import scipy
from scipy.fftpack import fft
import math as m
import numpy as np
def get_channels_from_bytes(bytes_data):
str_data = bytes_data.decode('utf-8')
str_list = str_data.split(',') # Or whatever separator
float_list = [float(s) for ... | 0 | 0 | 0 | 2,825 | 0 | 708 | 0 | -17 | 178 |
17f8a274b0dc7aad8c3b60109037a83f7d4ac2b0 | 5,868 | py | Python | pelix/src/test/python/tests/ipopo/test_provides.py | isandlaTech/cohorte-3rdparty | d39a1bf5d6d39550f8ee93770bcac55c5f098367 | [
"Apache-2.0"
] | 1 | 2017-03-04T14:40:11.000Z | 2017-03-04T14:40:11.000Z | pelix/src/test/python/tests/ipopo/test_provides.py | isandlaTech/cohorte-3rdparty | d39a1bf5d6d39550f8ee93770bcac55c5f098367 | [
"Apache-2.0"
] | null | null | null | pelix/src/test/python/tests/ipopo/test_provides.py | isandlaTech/cohorte-3rdparty | d39a1bf5d6d39550f8ee93770bcac55c5f098367 | [
"Apache-2.0"
] | 1 | 2019-08-23T06:43:58.000Z | 2019-08-23T06:43:58.000Z | #!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Tests the iPOPO @Provides decorator.
:author: Thomas Calmant
"""
# Tests
# Pelix
# Standard library
try:
import unittest2 as unittest
except ImportError:
import unittest
# -----------------------------------------------------------------------------... | 32.966292 | 80 | 0.575153 | #!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Tests the iPOPO @Provides decorator.
:author: Thomas Calmant
"""
# Tests
from tests.interfaces import IEchoService
from tests.ipopo import install_bundle, install_ipopo
# Pelix
from pelix.framework import FrameworkFactory, BundleContext
# Standard library
tr... | 0 | 0 | 0 | 5,019 | 0 | 0 | 0 | 90 | 89 |
0d7b8f4684879013e91a6c453bbd2f7a906ba756 | 308 | py | Python | blogging/admin.py | bl4ck5un/blog-flask | 5dfcf13d082787b98cb826cfb64133dbf47d94ac | [
"MIT"
] | null | null | null | blogging/admin.py | bl4ck5un/blog-flask | 5dfcf13d082787b98cb826cfb64133dbf47d94ac | [
"MIT"
] | null | null | null | blogging/admin.py | bl4ck5un/blog-flask | 5dfcf13d082787b98cb826cfb64133dbf47d94ac | [
"MIT"
] | null | null | null | from django.contrib import admin
from models import Article
from models import Tag
admin.site.register(Article, ArticleAdmin)
admin.site.register(Tag)
| 20.533333 | 42 | 0.737013 | from django.contrib import admin
from forms import ArticleForm
from models import Article
from models import Tag
class ArticleAdmin(admin.ModelAdmin):
form = ArticleForm
prepopulated_fields = {
'slug' : ('title', )
}
admin.site.register(Article, ArticleAdmin)
admin.site.register(Tag)
| 0 | 0 | 0 | 102 | 0 | 0 | 0 | 8 | 45 |
9907b6892acf85462265516ab91a0ca0a0d4c18b | 3,068 | py | Python | fishyWeight.py | aryanjalla/fishyWeightPredictor | 6e2f5cc3d590a4ba3a00c8866d32a38e5ee44956 | [
"MIT"
] | null | null | null | fishyWeight.py | aryanjalla/fishyWeightPredictor | 6e2f5cc3d590a4ba3a00c8866d32a38e5ee44956 | [
"MIT"
] | null | null | null | fishyWeight.py | aryanjalla/fishyWeightPredictor | 6e2f5cc3d590a4ba3a00c8866d32a38e5ee44956 | [
"MIT"
] | null | null | null | #importing all the necessary libraries
from sklearn import linear_model
import pandas as pd
import numpy as np
import tkinter as tk
af = pd.read_csv('fish.csv') #taking the dataset
print(af.head())
# # af = df[['Rank','Rating','Votes']]
# # print(af.head())
# # # plt.scatter(af['Blast Furnace Slag'], af.St... | 29.786408 | 81 | 0.60854 | #importing all the necessary libraries
import matplotlib.pyplot as plt
from sklearn import linear_model
import pandas as pd
import pylab as pl
import numpy as np
import tkinter as tk
import time
af = pd.read_csv('fish.csv') #taking the dataset
print(af.head())
# # af = df[['Rank','Rating','Votes']]
# # ... | 0 | 0 | 0 | 0 | 0 | 819 | 0 | -3 | 141 |
3c2467fd97717fe777a538861d95d1cfd9ebfcb8 | 8,222 | py | Python | tests/test_surgery_of_1c_storage.py | Kron1sant/surgery_of_1c_storage | da525dfce399940acf13ea77fad789bfad8e0d4c | [
"MIT"
] | null | null | null | tests/test_surgery_of_1c_storage.py | Kron1sant/surgery_of_1c_storage | da525dfce399940acf13ea77fad789bfad8e0d4c | [
"MIT"
] | null | null | null | tests/test_surgery_of_1c_storage.py | Kron1sant/surgery_of_1c_storage | da525dfce399940acf13ea77fad789bfad8e0d4c | [
"MIT"
] | null | null | null | import unittest
if __name__ == "__main__":
unittest.main()
| 44.443243 | 110 | 0.683532 | import unittest
from surgery_of_1c_storage.__main__ import SurgeryOf1CStorage
import tempfile
import os
import sys
from contextlib import contextmanager
from io import StringIO
class TestSurgeryOf1CStorage(unittest.TestCase):
"""Тест проходятся только при наличии развернутых тестовых баз на Postgres и MS SQL
... | 1,172 | 268 | 0 | 7,022 | 0 | 0 | 0 | 29 | 247 |
12a97cd8776ebed248436acb5735dd6079fe1dd6 | 193 | py | Python | Exercicios em python/Aulas python/listas2.py | GabrielSantos25/Python | 208eec0144587aa4e0aa7fa00da29ffa0478eac8 | [
"MIT"
] | null | null | null | Exercicios em python/Aulas python/listas2.py | GabrielSantos25/Python | 208eec0144587aa4e0aa7fa00da29ffa0478eac8 | [
"MIT"
] | null | null | null | Exercicios em python/Aulas python/listas2.py | GabrielSantos25/Python | 208eec0144587aa4e0aa7fa00da29ffa0478eac8 | [
"MIT"
] | null | null | null | lista = [['Joo', 18], ['Carla', 25], ['Maria', 30]]
# PARA Estrutura 1.
print(f'Lista completa: {lista}')
print(f'Lista com estrutura: {lista[0]}')
print(f'Lista com critrios: {lista[1][0]}') | 38.6 | 52 | 0.632124 | lista = [['João', 18], ['Carla', 25], ['Maria', 30]]
# PARA Estrutura 1.
print(f'Lista completa: {lista}')
print(f'Lista com estrutura: {lista[0]}')
print(f'Lista com critérios: {lista[1][0]}') | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8fe854fbd3c8398df14f705a5b071376c2457eac | 1,020 | py | Python | HomeCloud/urls.py | nikminer/HomeCloud | 7571e8002ef0919b382c3802d680421bd094d866 | [
"MIT"
] | null | null | null | HomeCloud/urls.py | nikminer/HomeCloud | 7571e8002ef0919b382c3802d680421bd094d866 | [
"MIT"
] | null | null | null | HomeCloud/urls.py | nikminer/HomeCloud | 7571e8002ef0919b382c3802d680421bd094d866 | [
"MIT"
] | null | null | null | from django.urls import path, re_path
from django.conf.urls import include
from HomeCloud import views
urlpatterns = [
#DaSH
path('',views.index,name="DaSH-Index"),
path('i18n/', include('django.conf.urls.i18n')),
path('cpuusage',views.getCPUpercent),
path('swapusage',views.getSwapmemory),
pat... | 35.172414 | 87 | 0.690196 | from django.contrib import admin
from django.urls import path, re_path
from django.conf.urls import include
from HomeCloud import views
import django.views.i18n
urlpatterns = [
#DaSH
path('',views.index,name="DaSH-Index"),
path('i18n/', include('django.conf.urls.i18n')),
path('cpuusage',views.getCPUpe... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 44 |
89dd73773c694cd4421517e523ed2bd90e463f53 | 645 | py | Python | example/txtly/delete-txtly.py | sourcery-ai-bot/kaleyra-python | 782333149e7f8673f383a5743f4ed06efb867d36 | [
"MIT"
] | 2 | 2020-11-21T18:10:46.000Z | 2021-09-21T19:28:03.000Z | example/txtly/delete-txtly.py | sourcery-ai-bot/kaleyra-python | 782333149e7f8673f383a5743f4ed06efb867d36 | [
"MIT"
] | 3 | 2021-11-11T15:04:46.000Z | 2021-11-11T15:15:47.000Z | example/txtly/delete-txtly.py | sourcery-ai-bot/kaleyra-python | 782333149e7f8673f383a5743f4ed06efb867d36 | [
"MIT"
] | 7 | 2019-08-05T18:46:22.000Z | 2021-11-15T16:49:34.000Z | #!/usr/bin/env python
from api.txtly.txtly_request import TxtlyRequest
__author__ = "Likhit Jain and Yashita P Jain"
__copyright__ = "Copyright 2019, Kaleyra"
__license__ = "MIT"
__version__ = "1.0"
__email__ = "support@kaleyra.com"
__status__ = "Production"
# The user can delete the created txtly links.
# If Txtly ... | 25.8 | 84 | 0.765891 | #!/usr/bin/env python
from api.txtly.txtly_request import TxtlyRequest
__author__ = "Likhit Jain and Yashita P Jain"
__copyright__ = "Copyright 2019, Kaleyra"
__license__ = "MIT"
__version__ = "1.0"
__email__ = "support@kaleyra.com"
__status__ = "Production"
# The user can delete the created txtly links.
# If Txtly ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4ffadec3ca2ac7a0d59c67eff15ba9c1b8a332d4 | 378 | py | Python | src/Python3/Q112898/exsample.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | src/Python3/Q112898/exsample.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | src/Python3/Q112898/exsample.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | # -*- coding: utf8 -*-
if __name__ == '__main__':
main()
| 21 | 72 | 0.547619 | # -*- coding: utf8 -*-
import matplotlib.pyplot as plt
def main() -> None:
source_Y1 = [['3', 'aaa'], ['2', 'bbb'], ['5', 'ccc'], ['4', 'ddd']]
source_Y1.sort()
print(source_Y1)
Y1, X1 = map(list, zip(*source_Y1))
print(X1)
print(Y1)
plt.bar(range(len(X1)), Y1, tick_label=X1, align="center... | 0 | 0 | 0 | 0 | 0 | 259 | 0 | 10 | 45 |
4b74d019081ddc408292a9ddb125c9276ecab3f6 | 810 | py | Python | SystemCode/meal/migrations/0001_initial.py | HJHjiahao/Intelligent_Reasoning_Systems-Practical_Module_Group11 | 70c66efffcace5ea87c0f29843c58b6f35270f7d | [
"MIT"
] | 1 | 2021-11-23T04:18:33.000Z | 2021-11-23T04:18:33.000Z | SystemCode/meal/migrations/0001_initial.py | HJHjiahao/Intelligent_Reasoning_Systems-Practical_Module_Group11 | 70c66efffcace5ea87c0f29843c58b6f35270f7d | [
"MIT"
] | null | null | null | SystemCode/meal/migrations/0001_initial.py | HJHjiahao/Intelligent_Reasoning_Systems-Practical_Module_Group11 | 70c66efffcace5ea87c0f29843c58b6f35270f7d | [
"MIT"
] | 2 | 2021-11-15T09:15:19.000Z | 2021-11-23T04:18:38.000Z | # Generated by Django 3.2 on 2021-11-16 15:45
| 30 | 118 | 0.540741 | # Generated by Django 3.2 on 2021-11-16 15:45
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Meal',
fields=[
('id', models... | 0 | 0 | 0 | 692 | 0 | 0 | 0 | 19 | 50 |
8dfafef3f94871cc8271f7f25511bfd34fa55fdb | 5,322 | py | Python | MQTT Client/MainFrame.py | InternetThings/mqtt-client | 4e1b204192fffb9740eddbcdabcdb6231f080b73 | [
"MIT"
] | 1 | 2016-03-17T12:45:02.000Z | 2016-03-17T12:45:02.000Z | MQTT Client/MainFrame.py | InternetThings/mqtt-client | 4e1b204192fffb9740eddbcdabcdb6231f080b73 | [
"MIT"
] | null | null | null | MQTT Client/MainFrame.py | InternetThings/mqtt-client | 4e1b204192fffb9740eddbcdabcdb6231f080b73 | [
"MIT"
] | null | null | null |
__author__ = 'Niels'
root = Tk()
app = App(root)
| 38.565217 | 109 | 0.647313 | from tkinter import *
import paho.mqtt.client as mqtt
__author__ = 'Niels'
class App:
def __init__(self, master):
self.frame = master
self.client = mqtt.Client()
self.client.on_connect = self.on_connect
self.client.on_subscribe = self.on_subscribe
self.client.on_message =... | 0 | 0 | 0 | 5,192 | 0 | 0 | 0 | 10 | 67 |
a8884f2dbaaab7673fae7c05830888c83cf50bc4 | 1,843 | py | Python | utils/proxy.py | MaiXiaochai/BellesPics | fcd8964d67a3b47999755e2278be8b44418ec482 | [
"Apache-2.0"
] | 1 | 2021-01-12T07:54:00.000Z | 2021-01-12T07:54:00.000Z | utils/proxy.py | MaiXiaochai/BellesPics | fcd8964d67a3b47999755e2278be8b44418ec482 | [
"Apache-2.0"
] | null | null | null | utils/proxy.py | MaiXiaochai/BellesPics | fcd8964d67a3b47999755e2278be8b44418ec482 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
--------------------------------------
@File : proxy.py
@Author : maixiaochai
@Email : maixiaochai@outlook.com
@CreatedOn : 2020/8/15 19:06
--------------------------------------
"""
| 26.710145 | 87 | 0.505155 | # -*- coding: utf-8 -*-
"""
--------------------------------------
@File : proxy.py
@Author : maixiaochai
@Email : maixiaochai@outlook.com
@CreatedOn : 2020/8/15 19:06
--------------------------------------
"""
from re import compile
import requests
from .web_handler import WebHandler
class BaseProx... | 0 | 0 | 0 | 1,515 | 0 | 0 | 0 | 9 | 90 |
9111c0ff7a32c1a3c86e14046cd7c327e038da35 | 616 | py | Python | Programmers/Level_3/2xn_tiling.py | Jeonhyunil/Dss8 | 775734a3d3c1d3c61524676eef9b87f9db6336a5 | [
"MIT"
] | null | null | null | Programmers/Level_3/2xn_tiling.py | Jeonhyunil/Dss8 | 775734a3d3c1d3c61524676eef9b87f9db6336a5 | [
"MIT"
] | null | null | null | Programmers/Level_3/2xn_tiling.py | Jeonhyunil/Dss8 | 775734a3d3c1d3c61524676eef9b87f9db6336a5 | [
"MIT"
] | null | null | null | """
2 1 . 2 n . 2 .
n , return solution .
n 60,000 .
, 1,000,000,007 return.
"""
| 21.241379 | 126 | 0.573052 | """
가로 길이가 2이고 세로의 길이가 1인 직사각형모양의 타일이 있습니다. 이 직사각형 타일을 이용하여 세로의 길이가 2이고 가로의 길이가 n인 바닥을 가득 채우려고 합니다. 타일을 채울 때는 다음과 같이 2가지 방법이 있습니다.
타일을 가로로 배치 하는 경우
타일을 세로로 배치 하는 경우
직사각형의 가로의 길이 n이 매개변수로 주어질 때, 이 직사각형을 채우는 방법의 수를 return 하는 solution 함수를 완성해주세요.
제한사항
가로의 길이 n은 60,000이하의 자연수 입니다.
경우의 수가 많아 질 수 있으므로, 경우의 수를 1,000,000,00... | 618 | 0 | 0 | 0 | 0 | 245 | 0 | 0 | 23 |
0c8a97fc2393c43c7f89795d15f0364d5177a168 | 207 | py | Python | kaggle_adcal_2021/model/sample.py | sinchir0/kaggle_adcal_2021 | 15eec5c3b99e98afc07c11c278230191379a1e30 | [
"MIT"
] | null | null | null | kaggle_adcal_2021/model/sample.py | sinchir0/kaggle_adcal_2021 | 15eec5c3b99e98afc07c11c278230191379a1e30 | [
"MIT"
] | null | null | null | kaggle_adcal_2021/model/sample.py | sinchir0/kaggle_adcal_2021 | 15eec5c3b99e98afc07c11c278230191379a1e30 | [
"MIT"
] | null | null | null | from logging import getLogger
logger = getLogger(__name__)
| 18.818182 | 55 | 0.743961 | from logging import getLogger
from kaggle_adcal_2021.utils.template import GokartTask
logger = getLogger(__name__)
class Sample(GokartTask):
def run(self) -> None:
self.dump("sample output")
| 0 | 0 | 0 | 66 | 0 | 0 | 0 | 34 | 46 |
79ceeff14ea8d5b125203905c51cc83e7086ba19 | 864 | py | Python | python/toy-problems/find_the_divisors.py | vinnyhoward/til | 8bb0055578220c4d83ddd12ac34bbb2fd3ae000e | [
"MIT"
] | null | null | null | python/toy-problems/find_the_divisors.py | vinnyhoward/til | 8bb0055578220c4d83ddd12ac34bbb2fd3ae000e | [
"MIT"
] | 32 | 2020-07-16T07:11:35.000Z | 2022-02-27T19:01:03.000Z | python/toy-problems/find_the_divisors.py | vinnyhoward/til | 8bb0055578220c4d83ddd12ac34bbb2fd3ae000e | [
"MIT"
] | null | null | null | # Find the divisors!
# Create a function named divisors/Divisors that takes an integer n > 1 and returns an array with all of the integer's
# divisors(except for 1 and the number itself), from smallest to largest. If the number is prime return the string
# '(integer) is prime' (null in C#) (use Either String a in Hask... | 24.685714 | 118 | 0.637731 | # Find the divisors!
# Create a function named divisors/Divisors that takes an integer n > 1 and returns an array with all of the integer's
# divisors(except for 1 and the number itself), from smallest to largest. If the number is prime return the string
# '(integer) is prime' (null in C#) (use Either String a in Hask... | 0 | 0 | 0 | 0 | 0 | 255 | 0 | 0 | 23 |
76fe4b016856ea75a4f45921b4d5a0782bff3c28 | 652 | py | Python | arviz/stats/__init__.py | n-kall/arviz | 0449cb6f582770f3350a6ecdbeafea77a5f7beaf | [
"Apache-2.0"
] | null | null | null | arviz/stats/__init__.py | n-kall/arviz | 0449cb6f582770f3350a6ecdbeafea77a5f7beaf | [
"Apache-2.0"
] | null | null | null | arviz/stats/__init__.py | n-kall/arviz | 0449cb6f582770f3350a6ecdbeafea77a5f7beaf | [
"Apache-2.0"
] | null | null | null | # pylint: disable=wildcard-import
"""Statistical tests and diagnostics for ArviZ."""
from .stats import _calculate_ics
__all__ = [
"apply_test_function",
"bfmi",
"compare",
"hdi",
"kde",
"loo",
"loo_pit",
"psislw",
"r2_samples",
"r2_score",
"summary",
"wa... | 18.628571 | 51 | 0.570552 | # pylint: disable=wildcard-import
"""Statistical tests and diagnostics for ArviZ."""
from .density_utils import *
from .diagnostics import *
from .stats import *
from .stats import _calculate_ics
from .stats_refitting import *
from .stats_utils import *
__all__ = [
"apply_test_function",
"bfmi",
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 115 |
c1ea5a3e3be66b63412f2be4d3a9b57c273b484c | 8,250 | py | Python | source/fab/tasks/fortran.py | bblay/fab | bbdac7bae20c5b8695a2d56945c9593b4fda9c74 | [
"BSD-3-Clause"
] | null | null | null | source/fab/tasks/fortran.py | bblay/fab | bbdac7bae20c5b8695a2d56945c9593b4fda9c74 | [
"BSD-3-Clause"
] | null | null | null | source/fab/tasks/fortran.py | bblay/fab | bbdac7bae20c5b8695a2d56945c9593b4fda9c74 | [
"BSD-3-Clause"
] | null | null | null | # (c) Crown copyright Met Office. All rights reserved.
# For further details please refer to the file COPYRIGHT
# which you should have received as part of this distribution
"""
Fortran language handling classes.
"""
import logging
logger = logging.getLogger(__name__)
# todo: a nicer recursion pattern?
| 39.663462 | 119 | 0.646182 | # (c) Crown copyright Met Office. All rights reserved.
# For further details please refer to the file COPYRIGHT
# which you should have received as part of this distribution
"""
Fortran language handling classes.
"""
import logging
from fparser.common.readfortran import FortranFileReader # type: ignore
from fparser.t... | 0 | 0 | 0 | 6,253 | 361 | 658 | 0 | 349 | 318 |
ca9cc52bf0f6cbaefd076df39920b2a3ad7819a5 | 167 | py | Python | 03 Basic Data Types/lists_3.py | gitter-badger/survival-python | c9c7f336ecd0b8196934386d334f53cd79cb7284 | [
"MIT"
] | 1 | 2020-12-19T04:41:50.000Z | 2020-12-19T04:41:50.000Z | 03 Basic Data Types/lists_3.py | gitter-badger/survival-python | c9c7f336ecd0b8196934386d334f53cd79cb7284 | [
"MIT"
] | null | null | null | 03 Basic Data Types/lists_3.py | gitter-badger/survival-python | c9c7f336ecd0b8196934386d334f53cd79cb7284 | [
"MIT"
] | 3 | 2020-01-08T00:34:24.000Z | 2021-07-08T23:06:52.000Z | # create an empty list
coding_languages = []
coding_languages.append('Python')
print(coding_languages)
coding_languages.append('JavaScript')
print(coding_languages)
| 18.555556 | 37 | 0.808383 | # create an empty list
coding_languages = []
coding_languages.append('Python')
print(coding_languages)
coding_languages.append('JavaScript')
print(coding_languages)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8f7aafe06e4209ca1cbe7d6bd8d7d19dae0c431f | 6,584 | py | Python | org/apache/helix/participant/DistClusterControllerElection.py | davzhang/helix-python-binding | 11a9ecf730bce07720e0b0bcf7f0ec1cd2b25878 | [
"Apache-2.0"
] | 3 | 2015-04-08T22:51:04.000Z | 2015-05-03T06:42:35.000Z | org/apache/helix/participant/DistClusterControllerElection.py | zzhang5/helix-python-binding | 11a9ecf730bce07720e0b0bcf7f0ec1cd2b25878 | [
"Apache-2.0"
] | null | null | null | org/apache/helix/participant/DistClusterControllerElection.py | zzhang5/helix-python-binding | 11a9ecf730bce07720e0b0bcf7f0ec1cd2b25878 | [
"Apache-2.0"
] | 1 | 2020-03-31T21:43:01.000Z | 2020-03-31T21:43:01.000Z | # package org.apache.helix.participant
#from org.apache.helix.participant import *
#from java.lang.management import ManagementFactory
#from org.apache.log4j import Logger
| 36.988764 | 193 | 0.626215 | # package org.apache.helix.participant
#from org.apache.helix.participant import *
#from java.lang.management import ManagementFactory
#from org.apache.log4j import Logger
from org.apache.helix.ControllerChangeListener import ControllerChangeListener
from org.apache.helix.HelixDataAccessor import HelixDataAccessor
from... | 0 | 0 | 0 | 5,501 | 0 | 0 | 0 | 598 | 309 |
bd533e7d2e035e0f9cb9ff22dc6516c899bf77bc | 2,457 | py | Python | 2018/12_subterranean_sustainability_test.py | pchudzik/adventofcode | e1d6521621f6ca90f9dc53cf3d1ed5b8c5c2b7d1 | [
"MIT"
] | null | null | null | 2018/12_subterranean_sustainability_test.py | pchudzik/adventofcode | e1d6521621f6ca90f9dc53cf3d1ed5b8c5c2b7d1 | [
"MIT"
] | null | null | null | 2018/12_subterranean_sustainability_test.py | pchudzik/adventofcode | e1d6521621f6ca90f9dc53cf3d1ed5b8c5c2b7d1 | [
"MIT"
] | null | null | null | import importlib
module = importlib.import_module("12_subterranean_sustainability")
parse = module.parse
state_value = module.state_value
| 27.3 | 83 | 0.297924 | import pytest
import importlib
module = importlib.import_module("12_subterranean_sustainability")
parse = module.parse
state_value = module.state_value
def test_parse_input(puzzle):
live_sates = [
"...##",
"..#..",
".#...",
".#.#.",
".#.##",
".##..",
".####... | 0 | 1,708 | 0 | 0 | 0 | 500 | 0 | -8 | 114 |
1394635bcf44d1dd66ebc9a02affef0027f748de | 2,157 | py | Python | install.py | everhide/do-tools | 2b794e281cb603a8bdd39ea37468c0f9e21611e7 | [
"MIT"
] | null | null | null | install.py | everhide/do-tools | 2b794e281cb603a8bdd39ea37468c0f9e21611e7 | [
"MIT"
] | null | null | null | install.py | everhide/do-tools | 2b794e281cb603a8bdd39ea37468c0f9e21611e7 | [
"MIT"
] | null | null | null | import sys
from os import environ, stat, chmod
from os.path import dirname, realpath
from os import remove
from shutil import copyfile
from pathlib import Path
def app_dir() -> str:
"""Get app dir."""
return environ.get('APP_DIR', dirname(realpath(__file__)))
def windows():
"""Prepare windows install.""... | 24.235955 | 73 | 0.5656 | import sys
from os import environ, stat, chmod
from os.path import dirname, realpath
from os import remove
from shutil import copyfile
from pathlib import Path
import subprocess
def app_dir() -> str:
"""Get app dir."""
return environ.get('APP_DIR', dirname(realpath(__file__)))
def windows():
"""Prepare ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -4 | 22 |
800f08680863fc0e6b7dae38435faaf11037be1f | 416 | py | Python | kkk1.py | K-P1/kp-learning-python | 67e63a53b93f269ba25d45f6811727382edf3fff | [
"bzip2-1.0.6"
] | null | null | null | kkk1.py | K-P1/kp-learning-python | 67e63a53b93f269ba25d45f6811727382edf3fff | [
"bzip2-1.0.6"
] | null | null | null | kkk1.py | K-P1/kp-learning-python | 67e63a53b93f269ba25d45f6811727382edf3fff | [
"bzip2-1.0.6"
] | null | null | null | from faker import Faker
fake = Faker("ar_SA")
print(fake.name())
print(fake.email())
print(fake.first_name())
print(fake.last_name())
print(fake.phone_number())
print(fake.address())
print(fake.text())
print(fake.name_male())
print(fake.name_female())
print(fake.job())
print(fake.word())
print(fake.w... | 18.086957 | 28 | 0.689904 | from faker import Faker
fake = Faker("ar_SA")
print(fake.name())
print(fake.email())
print(fake.first_name())
print(fake.last_name())
print(fake.phone_number())
print(fake.address())
print(fake.text())
print(fake.name_male())
print(fake.name_female())
print(fake.job())
print(fake.word())
print(fake.w... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
22c63937ba6ba44b80e03169638488a551db2de3 | 2,970 | py | Python | allennlp/tests/commands/fine_tune_test.py | seattleboy/allennlp | 6c87ff59c478c47ba03d4ac0ea693ac7b0fd80b6 | [
"Apache-2.0"
] | null | null | null | allennlp/tests/commands/fine_tune_test.py | seattleboy/allennlp | 6c87ff59c478c47ba03d4ac0ea693ac7b0fd80b6 | [
"Apache-2.0"
] | null | null | null | allennlp/tests/commands/fine_tune_test.py | seattleboy/allennlp | 6c87ff59c478c47ba03d4ac0ea693ac7b0fd80b6 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=invalid-name,no-self-use
| 45 | 114 | 0.668013 | # pylint: disable=invalid-name,no-self-use
import argparse
import os
from allennlp.common.testing import AllenNlpTestCase
from allennlp.commands.fine_tune import FineTune, fine_tune_model_from_file_paths, fine_tune_model_from_args
class TestFineTune(AllenNlpTestCase):
def setUp(self):
super().setUp()
... | 0 | 0 | 0 | 2,715 | 0 | 0 | 0 | 100 | 112 |
9957ee58dcbf80fefc4dc98771e556ce72a3ec67 | 1,763 | py | Python | naver_news.py | krevas/NER | ffdb726ac420efedb0025a90243f8ac11e289ef9 | [
"Apache-2.0"
] | 2 | 2021-02-18T07:51:23.000Z | 2021-07-07T04:35:14.000Z | naver_news.py | krevas/NER | ffdb726ac420efedb0025a90243f8ac11e289ef9 | [
"Apache-2.0"
] | null | null | null | naver_news.py | krevas/NER | ffdb726ac420efedb0025a90243f8ac11e289ef9 | [
"Apache-2.0"
] | null | null | null |
if __name__ == "__main__":
text=get_naver_news()
print(text) | 31.482143 | 154 | 0.559274 | import re
import random
import requests
from bs4 import BeautifulSoup
from datetime import datetime, timedelta
def get_soup_obj(url):
headers = {'User-Agent' : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36'}
res = requests.get(url, he... | 51 | 0 | 0 | 0 | 0 | 1,526 | 0 | 1 | 156 |
2d26b5688279294bac5d0c60f054d244c7d29c20 | 6,748 | py | Python | tests.py | Va1/python-smart-getenv | 180c3552505f113d5384dc97243ff9d52c472f3d | [
"Apache-2.0"
] | null | null | null | tests.py | Va1/python-smart-getenv | 180c3552505f113d5384dc97243ff9d52c472f3d | [
"Apache-2.0"
] | null | null | null | tests.py | Va1/python-smart-getenv | 180c3552505f113d5384dc97243ff9d52c472f3d | [
"Apache-2.0"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main()
| 38.56 | 118 | 0.624481 | import os
import unittest
from smart_getenv import getenv
class GetenvTests(unittest.TestCase):
"""
Tests for getenv.
"""
test_var_name = '__ENV_UTILS_TEST_VAR'
def setUp(self):
self.delete_test_var()
def tearDown(self):
self.delete_test_var()
def delete_test_var(self):... | 0 | 0 | 0 | 6,617 | 0 | 0 | 0 | -2 | 67 |
55e7c727a95bc428039cdd1104765ca618c84be2 | 2,301 | py | Python | tests/test_layers.py | mtreinish/retworkx | 4a8fadaa56c55fbb542926b134abdc32afcb4728 | [
"Apache-2.0"
] | 1 | 2019-09-18T01:55:17.000Z | 2019-09-18T01:55:17.000Z | tests/test_layers.py | mtreinish/retworkx | 4a8fadaa56c55fbb542926b134abdc32afcb4728 | [
"Apache-2.0"
] | 15 | 2020-01-24T21:02:07.000Z | 2020-03-16T19:43:23.000Z | tests/test_layers.py | mtreinish/retworkx | 4a8fadaa56c55fbb542926b134abdc32afcb4728 | [
"Apache-2.0"
] | 3 | 2020-02-10T16:17:35.000Z | 2020-06-05T06:50:24.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 38.35 | 75 | 0.606258 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 0 | 0 | 0 | 1,700 | 0 | 0 | 0 | -12 | 69 |
28991243a81ec1926271699ee95e01ca7f6b5f25 | 42 | py | Python | mmd/version.py | karthikramasamy/cmpe287 | 1315bda9c0e493cbc8bb63c5cffbe90d698b267b | [
"BSD-3-Clause"
] | null | null | null | mmd/version.py | karthikramasamy/cmpe287 | 1315bda9c0e493cbc8bb63c5cffbe90d698b267b | [
"BSD-3-Clause"
] | 3 | 2019-05-23T01:09:15.000Z | 2019-06-03T06:42:18.000Z | mmd/version.py | karthikramasamy/cmpe287 | 1315bda9c0e493cbc8bb63c5cffbe90d698b267b | [
"BSD-3-Clause"
] | null | null | null | # program version
PROGRAM_VERSION = '1.0'
| 14 | 23 | 0.738095 | # program version
PROGRAM_VERSION = '1.0'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0477b090a3e0cefbafa97088a62eab86e98365b6 | 721 | py | Python | Loading Examples/example_load_calcium_imaging.py | NevronasInc/RuthazerLab | 6f1dd28aea847dbdad996bcf47224dd61261e75d | [
"MIT"
] | null | null | null | Loading Examples/example_load_calcium_imaging.py | NevronasInc/RuthazerLab | 6f1dd28aea847dbdad996bcf47224dd61261e75d | [
"MIT"
] | null | null | null | Loading Examples/example_load_calcium_imaging.py | NevronasInc/RuthazerLab | 6f1dd28aea847dbdad996bcf47224dd61261e75d | [
"MIT"
] | null | null | null | from pynwb import NWBHDF5IO
io = NWBHDF5IO(r'C:\Users\knasi\Consulting\NWB project\Ed\Jack\Jack.nwb', 'r')
nwbfile = io.read()
# Accessing raw data (if they are saved on the NWB file)
print(nwbfile.acquisition)
photonSeries = nwbfile.acquisition['TwoPhotonSeries']
# Accessing processed data
print(nwbfile... | 32.772727 | 106 | 0.769764 | from pynwb import NWBHDF5IO
io = NWBHDF5IO(r'C:\Users\knasi\Consulting\NWB project\Ed\Jack\Jack.nwb', 'r')
nwbfile = io.read()
# Accessing raw data (if they are saved on the NWB file)
print(nwbfile.acquisition)
photonSeries = nwbfile.acquisition['TwoPhotonSeries']
# Accessing processed data
print(nwbfile... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e1e46146cf290d90f8ee3a47ba564f0e090ca472 | 2,679 | py | Python | test/python/test_topkv2.py | sreeni-k/ngraph-tf | 4280a49ecffb92bb1ffa8ea212b22e0db8729f6e | [
"Apache-2.0"
] | 1 | 2019-10-10T06:03:52.000Z | 2019-10-10T06:03:52.000Z | test/python/test_topkv2.py | sreeni-k/ngraph-tf | 4280a49ecffb92bb1ffa8ea212b22e0db8729f6e | [
"Apache-2.0"
] | null | null | null | test/python/test_topkv2.py | sreeni-k/ngraph-tf | 4280a49ecffb92bb1ffa8ea212b22e0db8729f6e | [
"Apache-2.0"
] | 1 | 2019-10-10T06:03:40.000Z | 2019-10-10T06:03:40.000Z | # ==============================================================================
# Copyright 2019 Intel 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.apa... | 33.911392 | 80 | 0.597238 | # ==============================================================================
# Copyright 2019 Intel 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.apa... | 0 | 457 | 0 | 1,192 | 0 | 0 | 0 | -1 | 114 |
311bc6c65cadd0e73f33d396ae82d5b7f1793df2 | 3,702 | py | Python | speech_translation/data_preparation/test.py | dubelbog/ba_st_fairseq | bbf84606fb3cd01eb28e6d77a7e1d6c1aa8d39bd | [
"MIT"
] | null | null | null | speech_translation/data_preparation/test.py | dubelbog/ba_st_fairseq | bbf84606fb3cd01eb28e6d77a7e1d6c1aa8d39bd | [
"MIT"
] | null | null | null | speech_translation/data_preparation/test.py | dubelbog/ba_st_fairseq | bbf84606fb3cd01eb28e6d77a7e1d6c1aa8d39bd | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
| 31.641026 | 81 | 0.632361 | import argparse
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
import numpy
import torch
def data_to_tensor_pair(data, device):
x = torch.tensor([x for x, y in data], device=device)
y = torch.tensor([y for x, y in data], device=device)
return x, y
def evaluate_model(model, x, y... | 0 | 0 | 0 | 0 | 0 | 3,431 | 0 | 6 | 226 |
97ab0da0b5e242b32fc843e60691de6d55ea8ad0 | 155 | py | Python | apps/weather/api_urls.py | azinamo/weatherapp | a71b5cd21b4c63e4eac58186f78dccb0c7f50871 | [
"MIT"
] | null | null | null | apps/weather/api_urls.py | azinamo/weatherapp | a71b5cd21b4c63e4eac58186f78dccb0c7f50871 | [
"MIT"
] | 6 | 2020-06-06T00:37:50.000Z | 2022-02-10T13:56:59.000Z | apps/weather/api_urls.py | azinamo/weatherapp | a71b5cd21b4c63e4eac58186f78dccb0c7f50871 | [
"MIT"
] | null | null | null | from django.urls import path
from . import api_views
urlpatterns = [
path('', api_views.WeatherIndexView.as_view(), name='weather_index'),
] | 22.142857 | 73 | 0.735484 | from django.urls import path, include
from . import api_views
urlpatterns = [
path('', api_views.WeatherIndexView.as_view(), name='weather_index'),
] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0 |
1f1056b66006187bd94110d0828c22c32b4e1e68 | 1,241 | py | Python | back/apps/spiders/api/serializers.py | Andrey-Omelyanuk/project-template | b45b1d0cd53174c493de43e17d8e682c500dc76c | [
"MIT"
] | null | null | null | back/apps/spiders/api/serializers.py | Andrey-Omelyanuk/project-template | b45b1d0cd53174c493de43e17d8e682c500dc76c | [
"MIT"
] | 1 | 2021-04-14T17:29:41.000Z | 2021-04-14T17:29:41.000Z | back/apps/spiders/api/serializers.py | Andrey-Omelyanuk/project-template | b45b1d0cd53174c493de43e17d8e682c500dc76c | [
"MIT"
] | 1 | 2021-04-13T12:41:32.000Z | 2021-04-13T12:41:32.000Z | # -*- coding: utf-8 -*-
| 26.404255 | 91 | 0.744561 | # -*- coding: utf-8 -*-
from rest_framework.serializers import ModelSerializer, PrimaryKeyRelatedField
from ..models import *
class SpiderSerializer(ModelSerializer):
class Meta:
model = Spider
fields = '__all__'
class SessionSerializer(ModelSerializer):
spider_id = PrimaryKeyRelatedField(source='spider', qu... | 0 | 0 | 0 | 970 | 0 | 0 | 0 | 58 | 182 |
5e2bec59704466b27c2d167037dd48f8d3409cc3 | 4,658 | py | Python | july/web.py | lepture/july | ce42a4f81e5d5da1f722aba1b4aa1e6711e9f66b | [
"BSD-3-Clause"
] | 8 | 2015-10-01T18:25:18.000Z | 2019-04-14T19:58:42.000Z | july/web.py | lepture/july | ce42a4f81e5d5da1f722aba1b4aa1e6711e9f66b | [
"BSD-3-Clause"
] | null | null | null | july/web.py | lepture/july | ce42a4f81e5d5da1f722aba1b4aa1e6711e9f66b | [
"BSD-3-Clause"
] | 7 | 2015-12-02T13:43:43.000Z | 2018-12-20T05:16:48.000Z |
#: initialize options
from .util import set_default_option
__all__ = ["JulyHandler", "ApiHandler", "init_options", "run_server"]
set_default_option('address', default='127.0.0.1', type=str,
help='run server at this address')
set_default_option('port', default=8000, type=int,
help='run ... | 32.347222 | 79 | 0.618076 | from tornado import web, escape
from .cache import cache
#: initialize options
from .util import set_default_option
__all__ = ["JulyHandler", "ApiHandler", "init_options", "run_server"]
class JulyHandler(web.RequestHandler):
"""July Handler
Subclass JulyHandler to make an app, it provides a way to organize... | 0 | 0 | 0 | 3,058 | 0 | 817 | 0 | 13 | 136 |
663e5ff8975c5de04ac3ebd6f63c9b892a4bc5bf | 5,125 | py | Python | Examples/Session07/html_render/run_html_render.py | Sharmila8/intropython2016 | a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479 | [
"Unlicense"
] | null | null | null | Examples/Session07/html_render/run_html_render.py | Sharmila8/intropython2016 | a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479 | [
"Unlicense"
] | null | null | null | Examples/Session07/html_render/run_html_render.py | Sharmila8/intropython2016 | a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
"""
a simple script can run and test your html rendering classes.
Uncomment the steps as you add to your rendering.
"""
from io import StringIO
# importing the html_rendering code with a short name for easy typing.
import html_render as hr
# reloading in case you are running this in iPython
#... | 22.777778 | 135 | 0.643902 | #!/usr/bin/env python
"""
a simple script can run and test your html rendering classes.
Uncomment the steps as you add to your rendering.
"""
from io import StringIO
# importing the html_rendering code with a short name for easy typing.
import html_render as hr
# reloading in case you are running this in iPython
#... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
22c8ef1ee637e1152e7a85c1f583ae13f78b2006 | 15,398 | py | Python | openstack_dashboard/dashboards/admin/system_config/views.py | kbujold/stx-horizon | a9454b7fe7ac74f76f0362b8c978673b89e5aa0c | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/system_config/views.py | kbujold/stx-horizon | a9454b7fe7ac74f76f0362b8c978673b89e5aa0c | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/system_config/views.py | kbujold/stx-horizon | a9454b7fe7ac74f76f0362b8c978673b89e5aa0c | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# vim: tabstop=4 shiftwidth=4 softtabstop=4
import logging
LOG = logging.getLogger(__name__)
######################################################
# SDN Controller Modal Views #
#########... | 34.995455 | 78 | 0.588648 | #
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# vim: tabstop=4 shiftwidth=4 softtabstop=4
import logging
from django.core.urlresolvers import reverse # noqa
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _
fro... | 0 | 0 | 0 | 13,310 | 0 | 0 | 0 | 871 | 681 |
d4c2a5ec12f00d2618d79f1600a5e0b7f82a9a09 | 2,197 | py | Python | sketchbook/testutils.py | futursolo/sketchbook | 4a036909272a34a44f13e2880d892e314edd6655 | [
"Apache-2.0"
] | 7 | 2017-04-16T00:06:10.000Z | 2022-01-19T18:26:14.000Z | sketchbook/testutils.py | futursolo/sketchbook | 4a036909272a34a44f13e2880d892e314edd6655 | [
"Apache-2.0"
] | 57 | 2017-05-16T05:51:03.000Z | 2022-03-28T03:15:52.000Z | sketchbook/testutils.py | futursolo/sketchbook | 4a036909272a34a44f13e2880d892e314edd6655 | [
"Apache-2.0"
] | 1 | 2021-11-29T00:50:38.000Z | 2021-11-29T00:50:38.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2021 Kaede Hoshikawa
#
# 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
... | 28.907895 | 76 | 0.630405 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2021 Kaede Hoshikawa
#
# 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
... | 0 | 583 | 0 | 711 | 0 | 0 | 0 | 0 | 73 |
02d8411920ef2f4db6cf955002d4f59c2c3dba58 | 998 | py | Python | tests/lib/test_mark.py | tgherzog/pyyaml | fd99a576af1d5639a74a8ee0fee1c9667455912f | [
"MIT"
] | 1,841 | 2015-01-20T03:21:02.000Z | 2022-03-31T18:50:45.000Z | tests/lib/test_mark.py | tgherzog/pyyaml | fd99a576af1d5639a74a8ee0fee1c9667455912f | [
"MIT"
] | 559 | 2015-01-23T14:38:08.000Z | 2022-03-29T15:27:05.000Z | tests/lib/test_mark.py | tgherzog/pyyaml | fd99a576af1d5639a74a8ee0fee1c9667455912f | [
"MIT"
] | 402 | 2015-02-06T22:13:25.000Z | 2022-03-30T03:13:33.000Z |
test_marks.unittest = ['.marks']
if __name__ == '__main__':
import test_appliance
test_appliance.run(globals())
| 29.352941 | 75 | 0.541082 |
import yaml
def test_marks(marks_filename, verbose=False):
with open(marks_filename, 'r') as file:
inputs = file.read().split('---\n')[1:]
for input in inputs:
index = 0
line = 0
column = 0
while input[index] != '*':
if input[index] == '\n':
... | 0 | 0 | 0 | 0 | 0 | 839 | 0 | -10 | 46 |
3e9bf3dc27663ec5866cd2e3ddc3de1accb9ad76 | 67 | py | Python | RunPythonScript_ConsoleApp/python_script.py | Prov-Matthias/run-python-script-with-csharp | 201e2309d998d4bbdc88a40d1eaf472304b973ff | [
"MIT"
] | null | null | null | RunPythonScript_ConsoleApp/python_script.py | Prov-Matthias/run-python-script-with-csharp | 201e2309d998d4bbdc88a40d1eaf472304b973ff | [
"MIT"
] | null | null | null | RunPythonScript_ConsoleApp/python_script.py | Prov-Matthias/run-python-script-with-csharp | 201e2309d998d4bbdc88a40d1eaf472304b973ff | [
"MIT"
] | null | null | null | import sys
a = int(sys.argv[1])
b = 10
print("Result: ", a*b)
| 6.7 | 22 | 0.552239 | import sys
a = int(sys.argv[1])
b = 10
print("Result: ", a*b)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b24047db7448c83eb9346a1d3f31b423cb424e19 | 7,959 | py | Python | azure/tests/test_magic.py | mbnshtck/Jupiter-Kql-Magic | 00f590b3859e56c3a675eebecfbe85d3ebf1bba2 | [
"MIT"
] | null | null | null | azure/tests/test_magic.py | mbnshtck/Jupiter-Kql-Magic | 00f590b3859e56c3a675eebecfbe85d3ebf1bba2 | [
"MIT"
] | null | null | null | azure/tests/test_magic.py | mbnshtck/Jupiter-Kql-Magic | 00f590b3859e56c3a675eebecfbe85d3ebf1bba2 | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
ip = get_ip... | 34.454545 | 182 | 0.657746 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
from nose i... | 0 | 5,074 | 0 | 0 | 0 | 626 | 0 | 41 | 636 |
8ad5c25f3c12202c1d30de8c5925e579147f71d2 | 30,182 | py | Python | pypureclient/flasharray/FA_2_5/api/network_interfaces_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_5/api/network_interfaces_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_5/api/network_interfaces_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.5
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
# python 2 and py... | 53.896429 | 1,397 | 0.659897 | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.5
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re
# pyth... | 0 | 0 | 0 | 29,731 | 0 | 0 | 0 | -11 | 90 |
aed0acf804269c595a66eac139c75e86d89d4172 | 25,379 | py | Python | nfdapi/nfdcore/views.py | kappu72/clevmetro-nfd | 584c638190eaa077d010a24fe7f209b1cbb3725d | [
"BSD-2-Clause"
] | 3 | 2018-02-11T21:18:11.000Z | 2019-01-19T06:58:58.000Z | nfdapi/nfdcore/views.py | kappu72/clevmetro-nfd | 584c638190eaa077d010a24fe7f209b1cbb3725d | [
"BSD-2-Clause"
] | 108 | 2018-02-02T15:42:39.000Z | 2019-01-21T13:22:55.000Z | nfdapi/nfdcore/views.py | kappu72/clevmetro-nfd | 584c638190eaa077d010a24fe7f209b1cbb3725d | [
"BSD-2-Clause"
] | 5 | 2018-02-02T11:52:48.000Z | 2022-03-01T16:09:09.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import namedtuple
import logging
logger = logging.getLogger(__name__)
FilterField = namedtuple("FilterField", [
"name",
"value",
"lookup"
])
FeatureTypeFormCategory = namedtuple("FeatureTypeFormCategory", [
"subtype",
... | 34.111559 | 86 | 0.654793 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import namedtuple
import logging
from django.core.exceptions import ObjectDoesNotExist
from django.db import connection
from django.http import Http404
from django_filters.rest_framework import DjangoFilterBackend
from django.utils.transl... | 0 | 4,327 | 0 | 16,882 | 349 | 0 | 0 | 690 | 1,194 |
f085a5aed6c933def030c0adb917f53b3b31dee8 | 7,180 | py | Python | test/test_multiprocessing_spawn.py | xiaohanhuang/pytorch | a31aea8eaa99a5ff72b5d002c206cd68d5467a5e | [
"Intel"
] | 183 | 2018-04-06T21:10:36.000Z | 2022-03-30T15:05:24.000Z | test/test_multiprocessing_spawn.py | xiaohanhuang/pytorch | a31aea8eaa99a5ff72b5d002c206cd68d5467a5e | [
"Intel"
] | 818 | 2020-02-07T02:36:44.000Z | 2022-03-31T23:49:44.000Z | test/test_multiprocessing_spawn.py | xiaohanhuang/pytorch | a31aea8eaa99a5ff72b5d002c206cd68d5467a5e | [
"Intel"
] | 58 | 2018-06-05T16:40:18.000Z | 2022-03-16T15:37:29.000Z | # Owner(s): ["module: multiprocessing"]
from torch.testing._internal.common_utils import (run_tests)
if __name__ == '__main__':
run_tests()
| 32.197309 | 130 | 0.659889 | # Owner(s): ["module: multiprocessing"]
import os
import random
import signal
import sys
import time
import unittest
from torch.testing._internal.common_utils import (TestCase, run_tests, IS_WINDOWS, NO_MULTIPROCESSING_SPAWN)
import torch.multiprocessing as mp
def test_success_func(i):
pass
def test_success_s... | 0 | 2,154 | 0 | 2,893 | 0 | 1,492 | 0 | 6 | 477 |
e05cc948a4cbb7c567e370551c7fa006975cbf1d | 1,136 | py | Python | problems/087.py | 6112/project-euler | b7478d14aa6defe347ab12178c7ffe90efdcb867 | [
"MIT"
] | null | null | null | problems/087.py | 6112/project-euler | b7478d14aa6defe347ab12178c7ffe90efdcb867 | [
"MIT"
] | null | null | null | problems/087.py | 6112/project-euler | b7478d14aa6defe347ab12178c7ffe90efdcb867 | [
"MIT"
] | null | null | null | # encoding=utf-8
## SOLVED 2015/01/12
## 1097343
# The smallest number expressible as the sum of a prime square, prime cube, and
# prime fourth power is 28. In fact, there are exactly four numbers below fifty
# that can be expressed in such a way:
# 28 = 22 + 23 + 24
# 33 = 32 + 23 + 24
# 49 = 52 + 23 + 24
# 47 = 22 ... | 27.707317 | 79 | 0.570423 | # encoding=utf-8
## SOLVED 2015/01/12
## 1097343
# The smallest number expressible as the sum of a prime square, prime cube, and
# prime fourth power is 28. In fact, there are exactly four numbers below fifty
# that can be expressed in such a way:
# 28 = 22 + 23 + 24
# 33 = 32 + 23 + 24
# 49 = 52 + 23 + 24
# 47 = 22 ... | 0 | 0 | 0 | 0 | 0 | 599 | 0 | -10 | 45 |
722a3d8b9d2ed2a417320c43ad2be09bf9cf5f48 | 3,361 | py | Python | frequent_direction/fd_sketch.py | AtsushiHashimoto/spectral_embedding4large_scale_matrix | 5270d0cdb3d89c56ff219d97781bf22e3126a5ab | [
"BSD-2-Clause"
] | null | null | null | frequent_direction/fd_sketch.py | AtsushiHashimoto/spectral_embedding4large_scale_matrix | 5270d0cdb3d89c56ff219d97781bf22e3126a5ab | [
"BSD-2-Clause"
] | null | null | null | frequent_direction/fd_sketch.py | AtsushiHashimoto/spectral_embedding4large_scale_matrix | 5270d0cdb3d89c56ff219d97781bf22e3126a5ab | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#####
# BSD 2-clause "Simplified" License
# original repository https://github.com/hido/frequent-direction
# rearranged to class by AtsushiHashimoto (based on the clone accessed on 26th Jun. 2017)
#####
import numpy as np
import numpy.linalg as ln
""" This is a simple an... | 30.008929 | 109 | 0.611425 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#####
# BSD 2-clause "Simplified" License
# original repository https://github.com/hido/frequent-direction
# rearranged to class by AtsushiHashimoto (based on the clone accessed on 26th Jun. 2017)
#####
import numpy as np
import numpy.linalg as ln
import math
import sys
... | 0 | 0 | 0 | 2,262 | 0 | 0 | 0 | -21 | 67 |
fa3ccb485f93aeb39561312722638f7aacfd9ff1 | 716 | py | Python | tests/performance/cte-arm/tests/hidden/als.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 36 | 2018-10-22T19:21:14.000Z | 2022-03-22T12:10:01.000Z | tests/performance/cte-arm/tests/hidden/als.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 329 | 2018-11-22T18:04:57.000Z | 2022-03-18T01:26:55.000Z | tests/performance/cte-arm/tests/hidden/als.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 21 | 2019-01-10T11:46:39.000Z | 2022-03-17T12:59:45.000Z |
if __name__ == '__main__':
main()
| 23.866667 | 74 | 0.636872 | from math import ceil
import performance
import dislib as ds
from dislib.recommendation import ALS
def main():
n_blocks = 384
data = "/fefs/scratch/bsc19/bsc19029/PERFORMANCE/datasets/" \
"netflix_data_libsvm.txt"
n_factors = 100
n_features = 480189
block_size = (int(ceil(17770 / n_b... | 0 | 0 | 0 | 0 | 0 | 551 | 0 | 11 | 113 |
fec11e80f724ed8594b3648d4df4537a7e80beda | 3,941 | py | Python | day_16/main.py | cody-robertson/advent-of-code-2021 | ff0c0865dd1f05c0fd398e1bf266412963be5768 | [
"MIT"
] | null | null | null | day_16/main.py | cody-robertson/advent-of-code-2021 | ff0c0865dd1f05c0fd398e1bf266412963be5768 | [
"MIT"
] | null | null | null | day_16/main.py | cody-robertson/advent-of-code-2021 | ff0c0865dd1f05c0fd398e1bf266412963be5768 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
file_input = load_input("input.txt")
converted_file_input = hex_message_to_binary(file_input)
input_instruction = parse_instruction_from_binary(converted_file_input)
print(add_version_numbers(input_instruction))
print(process_instruction(input_instruction))
| 36.490741 | 85 | 0.670134 | from functools import reduce
from operator import mul
from typing import NamedTuple, Optional
class Instruction(NamedTuple):
version_number: int
operator: int
sub_instructions: list
value: Optional[int]
bit_size: int
def load_input(file_name: str) -> str:
with open(file_name, "r") as input_f... | 0 | 0 | 0 | 121 | 0 | 3,251 | 0 | 28 | 227 |
9c258a33ef52843b97d19675ef46af37225fdf8d | 7,239 | py | Python | parser/team08/Tytus_SQLPARSER_G8/main.py | elielbarrios/tytus | 61d008423bc8eb27897624cd2f48e6127b6a8584 | [
"MIT"
] | null | null | null | parser/team08/Tytus_SQLPARSER_G8/main.py | elielbarrios/tytus | 61d008423bc8eb27897624cd2f48e6127b6a8584 | [
"MIT"
] | null | null | null | parser/team08/Tytus_SQLPARSER_G8/main.py | elielbarrios/tytus | 61d008423bc8eb27897624cd2f48e6127b6a8584 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main() | 41.365714 | 138 | 0.583782 | from tkinter import *
from os import path
from tkinter import filedialog
from tkinter import Menu
from tkinter import ttk
from tkinter import scrolledtext
from tkinter import messagebox
import os
from sintactico import ejecutar_analisis
from reportes.RealizarReportes import RealizarReportes
class interfaz():
de... | 6 | 0 | 0 | 6,829 | 0 | 28 | 0 | 72 | 268 |
df7b8606c3083fb19d70e0b695bee4c108890d38 | 1,637 | py | Python | sgld_test/bimodal_SGLD.py | karlnapf/kernel_goodness_of_fit | b76ad54481475df5f061615b0922dec812d48eda | [
"BSD-3-Clause"
] | 21 | 2016-12-20T17:27:14.000Z | 2022-02-11T17:10:05.000Z | sgld_test/bimodal_SGLD.py | zhushy/kernel_goodness_of_fit | b76ad54481475df5f061615b0922dec812d48eda | [
"BSD-3-Clause"
] | null | null | null | sgld_test/bimodal_SGLD.py | zhushy/kernel_goodness_of_fit | b76ad54481475df5f061615b0922dec812d48eda | [
"BSD-3-Clause"
] | 6 | 2018-01-27T07:14:53.000Z | 2022-03-06T19:49:15.000Z |
# THIS IS ULTRA SPECIFIC TO THE PROBLEM, Dont dare to use it!!!!
TRUE_B = 2.3101
# b=2.31
# a = 0.01584
# epsilon_t = a*(b+t)**(-0.55)
# epsilon_t = np.max(min_epsilon,epsilon_t)
| 22.424658 | 101 | 0.604765 | import numpy as np
# THIS IS ULTRA SPECIFIC TO THE PROBLEM, Dont dare to use it!!!!
TRUE_B = 2.3101
def SGLD(grad_log_density,grad_log_prior, X,n,chain_size=10000, thinning=1, theta=np.random.rand(2)):
N = X.shape[0]
X = np.random.permutation(X)
samples = np.zeros((chain_size,2))
for t in range... | 0 | 0 | 0 | 0 | 0 | 1,359 | 0 | -3 | 68 |
cb6c1fd54260b17b95e08d1ad3e08067d0392afa | 422 | py | Python | 8/sum4.py | chrhsmt/system_programming | 53cb67b77abd51e3c7b9a271a75eb2e6c129dab8 | [
"MIT"
] | null | null | null | 8/sum4.py | chrhsmt/system_programming | 53cb67b77abd51e3c7b9a271a75eb2e6c129dab8 | [
"MIT"
] | 1 | 2018-12-14T08:36:18.000Z | 2018-12-14T08:36:19.000Z | 8/sum4.py | chrhsmt/system_programming | 53cb67b77abd51e3c7b9a271a75eb2e6c129dab8 | [
"MIT"
] | null | null | null |
print sum4([1, 2])
print sum4([3, 4])
print sum4([4, 5, 6])
print sum4([4, 9, 4, 9, 4, 9])
print sum4([]) | 21.1 | 51 | 0.485782 | def sum4(array):
if (not isinstance(array, list)):
raise Exception("argument type is invalid")
sum = 0
skip = False
for n in array:
if (skip):
skip = False
continue
else:
sum += n
if (n == 4):
skip = True
return sum
pri... | 0 | 0 | 0 | 0 | 0 | 294 | 0 | 0 | 22 |
93bc06fdee8bdfe867532480060e479bbcb8475b | 3,787 | py | Python | python/project3/sysAdminTask.py | rz3n/learning | e9bb59c44d9dfe290026ec91f4763fd7bc8c2736 | [
"Apache-2.0"
] | null | null | null | python/project3/sysAdminTask.py | rz3n/learning | e9bb59c44d9dfe290026ec91f4763fd7bc8c2736 | [
"Apache-2.0"
] | null | null | null | python/project3/sysAdminTask.py | rz3n/learning | e9bb59c44d9dfe290026ec91f4763fd7bc8c2736 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
"""
Path: project3/sysAdminTask.py
Author: Ricardo Franzen - rfranzen@gmail.com
Date: 2022-03-09
Description: Creates a file that contains:
- current users logged in
- hostname
- date/time (HH:MM:SS DD/MM/YYYY)
- number of processes running
- top 10 process names/command, id and memory usage so... | 36.066667 | 144 | 0.673356 | #!/usr/bin/python3
"""
Path: project3/sysAdminTask.py
Author: Ricardo Franzen - rfranzen@gmail.com
Date: 2022-03-09
Description: Creates a file that contains:
- current users logged in
- hostname
- date/time (HH:MM:SS DD/MM/YYYY)
- number of processes running
- top 10 process names/command, id and memory usage so... | 0 | 0 | 0 | 0 | 0 | 1,812 | 0 | 0 | 177 |
4c933fc2a698014f3c343097adf5001abe443ec4 | 3,372 | py | Python | test/test_tokenize.py | adcroft/flint | 4dedfbe042e9d6d4c2c04d8c05a621aa921db9cf | [
"Apache-2.0"
] | 17 | 2017-03-24T12:15:41.000Z | 2022-03-16T22:36:52.000Z | test/test_tokenize.py | adcroft/flint | 4dedfbe042e9d6d4c2c04d8c05a621aa921db9cf | [
"Apache-2.0"
] | 12 | 2017-05-29T04:39:10.000Z | 2022-03-21T02:02:49.000Z | test/test_tokenize.py | adcroft/flint | 4dedfbe042e9d6d4c2c04d8c05a621aa921db9cf | [
"Apache-2.0"
] | 3 | 2017-05-26T04:09:42.000Z | 2022-03-16T22:22:41.000Z | import sys
import unittest
sys.path.insert(1, '../')
if __name__ == '__main__':
unittest.main()
| 32.114286 | 76 | 0.59134 | import sys
import unittest
sys.path.insert(1, '../')
from flint.tokenizer import Tokenizer
class Test(unittest.TestCase):
def setUp(self):
self.tokenizer = Tokenizer()
self.one_word_str = 'abc\n'
self.one_word = ['abc']
self.two_word_str = 'abc def\n'
self.two_word = ['... | 0 | 0 | 0 | 3,208 | 0 | 0 | 0 | 16 | 45 |
d3a7d7eff140863733279d7656d11b43102c3677 | 687 | py | Python | PlayGround/19CowsAndBulls/cows_and_bulls.py | samsonwang/ToyPython | e8289ab928cb1de8ba66fcd34dabf0ad8fb89739 | [
"MIT"
] | null | null | null | PlayGround/19CowsAndBulls/cows_and_bulls.py | samsonwang/ToyPython | e8289ab928cb1de8ba66fcd34dabf0ad8fb89739 | [
"MIT"
] | null | null | null | PlayGround/19CowsAndBulls/cows_and_bulls.py | samsonwang/ToyPython | e8289ab928cb1de8ba66fcd34dabf0ad8fb89739 | [
"MIT"
] | null | null | null |
'''
cows and bulls
Create a program that will play the cows and bulls game with the user. The game works like this:
Randomly generate a 4-digit number. Ask the user to guess a 4-digit number. For every digit that the user guessed correctly i... | 7.988372 | 484 | 0.673945 |
'''
cows and bulls
Create a program that will play the “cows and bulls” game with the user. The game works like this:
Randomly generate a 4-digit number. Ask the user to guess a 4-digit number. For every digit that the user guessed correctly... | 30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
708d8c8eef7464a75bb290e04ef478a6555a17f1 | 1,180 | py | Python | app.py | subhamrex/NIIT_Project | e8b08814469278f92a619a676bcfb4d3e23502c5 | [
"MIT"
] | null | null | null | app.py | subhamrex/NIIT_Project | e8b08814469278f92a619a676bcfb4d3e23502c5 | [
"MIT"
] | null | null | null | app.py | subhamrex/NIIT_Project | e8b08814469278f92a619a676bcfb4d3e23502c5 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
if __name__ == "__main__":
app.run(debug=True)
| 26.818182 | 92 | 0.652542 | from flask import Flask, render_template, Response
from mask_detect_video_app import VideoCamera
from flask import send_file
app = Flask(__name__)
@app.route('/')
def index():
"""Video streaming home page."""
return render_template('index.html')
@app.route('/project')
def project():
""" Project Page"""
... | 0 | 613 | 0 | 0 | 180 | 0 | 0 | 57 | 186 |
3d18fb68ffeb4e552890a8783fc01309e9c59a23 | 1,476 | py | Python | run.py | VictorAtPL/MNIST_FCDN_NumPy | f30e010a3d69afcc19c49e16ed3f004ae64be32d | [
"MIT"
] | null | null | null | run.py | VictorAtPL/MNIST_FCDN_NumPy | f30e010a3d69afcc19c49e16ed3f004ae64be32d | [
"MIT"
] | null | null | null | run.py | VictorAtPL/MNIST_FCDN_NumPy | f30e010a3d69afcc19c49e16ed3f004ae64be32d | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
| 32.086957 | 132 | 0.694444 | import argparse
from typing import Dict
from dataset import Dataset
from model import Model
from utils import setup_logger, get_logger
def train(args: Dict) -> None:
logger = get_logger()
logger.info(args)
logger.debug("Creating Dataset object")
dataset = Dataset(args['data_dir'])
logger.debug... | 0 | 0 | 0 | 0 | 0 | 1,252 | 0 | 25 | 157 |
bcee6b23826bad81bb8ebb3e0ab0a96f5e297a51 | 6,858 | py | Python | bot.py | Timofffee/multiNewsBot | eb677086cda7d6ffb021bd076eaaf43a6b486bbd | [
"MIT"
] | null | null | null | bot.py | Timofffee/multiNewsBot | eb677086cda7d6ffb021bd076eaaf43a6b486bbd | [
"MIT"
] | 1 | 2017-12-08T11:25:51.000Z | 2017-12-08T11:25:51.000Z | bot.py | Timofffee/multiNewsBot | eb677086cda7d6ffb021bd076eaaf43a6b486bbd | [
"MIT"
] | null | null | null | import libs.requests as requests
import libs.telebot as telebot
TOKEN_TG = '' #TOKEN BOT TELEGRAM
TOKEN_VK = '' #ACCESS KEY VK
tg_channel = '@name' #chat in telegram
vk_group = '' #example 'vkapi' (vk.com/vkapi)
sticker_id = ['CAADAgADEgADuYK-DAwZdY5q1ZiJAg', 'CAADAgADEwADuYK-DC9fGK4AAfkdLQI'] #?? Stickers ?? (lol)
... | 28.338843 | 126 | 0.619423 | import libs.requests as requests
import libs.telebot as telebot
import time
import datetime
import re
TOKEN_TG = '' #TOKEN BOT TELEGRAM
TOKEN_VK = '' #ACCESS KEY VK
tg_channel = '@name' #chat in telegram
vk_group = '' #example 'vkapi' (vk.com/vkapi)
sticker_id = ['CAADAgADEgADuYK-DAwZdY5q1ZiJAg', 'CAADAgADEwADuYK-DC9... | 180 | 0 | 0 | 0 | 0 | 6,136 | 0 | -28 | 273 |
5156b29ae738c1e91727a606a0daa723ce950149 | 5,200 | py | Python | player.py | makloooo/Multiplayer-Hangman | 577d642bc0c7700e015bfa66e9d04cdd4bb795ac | [
"Apache-2.0"
] | null | null | null | player.py | makloooo/Multiplayer-Hangman | 577d642bc0c7700e015bfa66e9d04cdd4bb795ac | [
"Apache-2.0"
] | null | null | null | player.py | makloooo/Multiplayer-Hangman | 577d642bc0c7700e015bfa66e9d04cdd4bb795ac | [
"Apache-2.0"
] | null | null | null | #Socket client for python
import socket # socket library
import sys # for exit handling
import threading # for starting transport layer thread
from client import TransportLayer
import Queue
main = ['-Main Menu-', '1. Login', '2. Make New User', '3. Hall of Fame', '4. Exit'];
game = ['-Game Menu-', '1. Start New Game'... | 27.368421 | 98 | 0.670577 | #Socket client for python
import socket # socket library
import sys # for exit handling
import threading # for starting transport layer thread
from client import TransportLayer
import Queue
main = ['-Main Menu-', '1. Login', '2. Make New User', '3. Hall of Fame', '4. Exit'];
game = ['-Game Menu-', '1. Start New Game'... | 0 | 0 | 0 | 0 | 0 | 3,949 | 0 | 0 | 260 |
0ceeebc8c9a7ba1752ca29bafe4c18f5068c13ea | 1,146 | py | Python | ccbrowse/config.py | peterkuma/ccbrowse | 19d93108d55badf983fda29497b523f59b4f1231 | [
"MIT"
] | 4 | 2022-02-06T17:22:04.000Z | 2022-03-09T03:15:11.000Z | ccbrowse/config.py | peterkuma/ccbrowse | 19d93108d55badf983fda29497b523f59b4f1231 | [
"MIT"
] | null | null | null | ccbrowse/config.py | peterkuma/ccbrowse | 19d93108d55badf983fda29497b523f59b4f1231 | [
"MIT"
] | null | null | null | import os
sharepath = os.path.dirname(__file__)
default_config = {
'profile': 'profile.json',
'server': 'gunicorn',
'workers': 10,
'log': None,
'loglevel': 'info',
'accesslog': None,
'host': 'localhost',
'port': 8080,
'root': '',
'debug': False,
'colormaps': 'colormaps',
... | 21.622642 | 72 | 0.495637 | import os
import json
sharepath = os.path.dirname(__file__)
default_config = {
'profile': 'profile.json',
'server': 'gunicorn',
'workers': 10,
'log': None,
'loglevel': 'info',
'accesslog': None,
'host': 'localhost',
'port': 8080,
'root': '',
'debug': False,
'colormaps': 'c... | 0 | 0 | 0 | 0 | 0 | 324 | 0 | -10 | 45 |
2763ce0817a09b609af307dbdce65d3cabac151c | 1,791 | py | Python | exemplo_lista.py | joao-barabba/Exercicios_Python | ceddb0c99ed6b8b2b749c00f227dfc4b95224a85 | [
"MIT"
] | null | null | null | exemplo_lista.py | joao-barabba/Exercicios_Python | ceddb0c99ed6b8b2b749c00f227dfc4b95224a85 | [
"MIT"
] | null | null | null | exemplo_lista.py | joao-barabba/Exercicios_Python | ceddb0c99ed6b8b2b749c00f227dfc4b95224a85 | [
"MIT"
] | null | null | null | ultimo=10
fila=list(range(1,ultimo+1))#Funo Sequenciadora de 1 para ultimo +1
fila2=list(range(1,ultimo+1))
while True:# Sempre dar verdadeiro em loop e s sair no break
print(f"Existem{len(fila)} clientes na fila\n")
print(f"Existem{len(fila2)} clientes na fila\n")
print(f"Fila atual: {fila}\n")
... | 39.8 | 70 | 0.520938 | ultimo=10
fila=list(range(1,ultimo+1))#Função Sequenciadora de 1 para ultimo +1
fila2=list(range(1,ultimo+1))
while True:# Sempre dará verdadeiro em loop e só sairá no break
print(f"Existem{len(fila)} clientes na fila\n")
print(f"Existem{len(fila2)} clientes na fila\n")
print(f"Fila atual: {fila}\n")
... | 30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2294178ee86fc279dd7a120cdeb8ccc44f1a8d8a | 757 | py | Python | demo.py | malrefai/validateTransaction | bc43825be788f72590b4bd9dfa19167b39bc8ae2 | [
"MIT"
] | null | null | null | demo.py | malrefai/validateTransaction | bc43825be788f72590b4bd9dfa19167b39bc8ae2 | [
"MIT"
] | 5 | 2018-06-12T11:53:46.000Z | 2021-06-01T22:21:58.000Z | demo.py | malrefai/validateTransaction | bc43825be788f72590b4bd9dfa19167b39bc8ae2 | [
"MIT"
] | 1 | 2018-06-12T12:13:25.000Z | 2018-06-12T12:13:25.000Z | """
demo.py
is an app demo use the library that validate transactions
Created on : June 9, 2016
Author : Mohammad Alrefai
"""
main()
| 22.264706 | 89 | 0.636724 | """
demo.py
is an app demo use the library that validate transactions
Created on : June 9, 2016
Author : Mohammad Alrefai
"""
import json
import validate_transaction
def main():
args = dict()
args['schema'] = './demo/files/transactionSchema.json'
args['data'] = './demo/fil... | 0 | 0 | 0 | 0 | 0 | 526 | 0 | -4 | 69 |
52a3457d17b44e13820fcb13b6e7629af2b8c808 | 189 | py | Python | dsbox/datapreprocessing/profiler/__init__.py | RqS/dsbox-profiling | bb972e0e577de1f10d8b97d1b7043b20111e85e0 | [
"MIT"
] | 4 | 2017-07-13T00:37:56.000Z | 2017-09-14T17:45:18.000Z | dsbox/datapreprocessing/profiler/__init__.py | RqS/dsbox-profiling | bb972e0e577de1f10d8b97d1b7043b20111e85e0 | [
"MIT"
] | 8 | 2017-08-02T17:35:37.000Z | 2018-07-06T17:21:03.000Z | dsbox/datapreprocessing/profiler/__init__.py | RqS/dsbox-profiling | bb972e0e577de1f10d8b97d1b7043b20111e85e0 | [
"MIT"
] | 1 | 2018-12-20T19:11:35.000Z | 2018-12-20T19:11:35.000Z | from .data_profile import Profiler, Hyperparams
__all__ = ['Profiler', 'Hyperparams']
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__) # type: ignore | 31.5 | 58 | 0.78836 | from .data_profile import Profiler, MyEncoder, Hyperparams
__all__ = ['Profiler', 'Hyperparams']
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__) # type: ignore | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0 |
d4738ee8cd773b3c8b1f6f8e8505843d08fbd148 | 251 | py | Python | config.py | HighCoder98/TVHpy | 2bb690da3bc1493d4f4dec18f6f98a4f72208a72 | [
"MIT"
] | null | null | null | config.py | HighCoder98/TVHpy | 2bb690da3bc1493d4f4dec18f6f98a4f72208a72 | [
"MIT"
] | null | null | null | config.py | HighCoder98/TVHpy | 2bb690da3bc1493d4f4dec18f6f98a4f72208a72 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Config for API Access
"""
API_USER = "<your-username-here>"
API_PASSWORD = "<your-password-here>"
API_ADDRESS = "http://<your-address-here>:9981/"
API_IS_SELFSIGNED = <True or False> # True for selfsigned SSL certificate
| 22.818182 | 73 | 0.689243 | # -*- coding: utf-8 -*-
"""
Config for API Access
"""
API_USER = "<your-username-here>"
API_PASSWORD = "<your-password-here>"
API_ADDRESS = "http://<your-address-here>:9981/"
API_IS_SELFSIGNED = <True or False> # True for selfsigned SSL certificate
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3bba31a61e38f71165a402fea7a719bb18c83c04 | 1,621 | py | Python | classes/data/datasets/BaseTemporalDataset.py | matteo-rizzo/cctcc | e3faa666398de009086476c9ae722a0fbb4f851e | [
"MIT"
] | null | null | null | classes/data/datasets/BaseTemporalDataset.py | matteo-rizzo/cctcc | e3faa666398de009086476c9ae722a0fbb4f851e | [
"MIT"
] | 1 | 2021-09-24T19:54:06.000Z | 2021-09-27T20:48:54.000Z | classes/data/datasets/BaseTemporalDataset.py | matteo-rizzo/cctcc | e3faa666398de009086476c9ae722a0fbb4f851e | [
"MIT"
] | null | null | null | import torch.utils.data as data
| 36.022222 | 111 | 0.663171 | from typing import Tuple
import numpy as np
import torch
import torch.utils.data as data
from auxiliary.utils import hwc_chw, gamma_correct, brg_to_rgb
from classes.data.DataAugmenter import DataAugmenter
class BaseTemporalDataset(data.Dataset):
def __init__(self, mode, input_size):
self.__input_size =... | 0 | 0 | 0 | 1,390 | 0 | 0 | 0 | 63 | 135 |
2d6a5833ee9944dba74e5d9d3eb4a32861c84da9 | 162 | py | Python | api_key.py | tsaylor37/Web-Scraping-and-Document-Databases | 77bcc78bfbef584101279a8203b9aa58db2d4c93 | [
"ADSL"
] | null | null | null | api_key.py | tsaylor37/Web-Scraping-and-Document-Databases | 77bcc78bfbef584101279a8203b9aa58db2d4c93 | [
"ADSL"
] | null | null | null | api_key.py | tsaylor37/Web-Scraping-and-Document-Databases | 77bcc78bfbef584101279a8203b9aa58db2d4c93 | [
"ADSL"
] | null | null | null | # Twitter API Keys
consumer_key = "Enter your key"
consumer_secret = "Enter your key"
access_token = "Enter your key"
access_token_secret = "Enter your key"
| 27 | 39 | 0.740741 | # Twitter API Keys
consumer_key = "Enter your key"
consumer_secret = "Enter your key"
access_token = "Enter your key"
access_token_secret = "Enter your key"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7c446aa974e15b1d66c8f42145ada5688e37dc50 | 23,489 | py | Python | python/ray/experimental/sgd/modified_allreduce.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 2 | 2019-10-08T13:31:08.000Z | 2019-10-22T18:34:52.000Z | python/ray/experimental/sgd/modified_allreduce.py | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | 1 | 2018-11-08T02:04:35.000Z | 2018-11-08T21:54:45.000Z | python/ray/experimental/sgd/modified_allreduce.py | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | 6 | 2019-03-12T05:37:35.000Z | 2020-03-09T12:25:17.000Z | # This file is adapted from https://github.com/tensorflow/benchmarks
# /blob/master/scripts/tf_cnn_benchmarks/allreduce.py
#
# Copyright 2017 The TensorFlow 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... | 36.816614 | 80 | 0.619439 | # This file is adapted from https://github.com/tensorflow/benchmarks
# /blob/master/scripts/tf_cnn_benchmarks/allreduce.py
#
# Copyright 2017 The TensorFlow 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... | 0 | 0 | 0 | 0 | 0 | 994 | 0 | -3 | 118 |
c4ba6b0d2b7490fe10c1a91c9675bba09ad129e3 | 205 | py | Python | configs/det/_base_/default_runtime_cityperson.py | OpenGVLab/gv-benchmark | ffe1f7460b857c88276d52a1537cbc673002f1e4 | [
"Apache-2.0"
] | 106 | 2022-02-14T13:04:46.000Z | 2022-03-30T03:19:45.000Z | configs/det/_base_/default_runtime_cityperson.py | OpenGVLab/gv-benchmark | ffe1f7460b857c88276d52a1537cbc673002f1e4 | [
"Apache-2.0"
] | 2 | 2022-03-08T07:19:18.000Z | 2022-03-29T15:45:09.000Z | configs/det/_base_/default_runtime_cityperson.py | OpenGVLab/gv-benchmark | ffe1f7460b857c88276d52a1537cbc673002f1e4 | [
"Apache-2.0"
] | 2 | 2022-03-25T08:21:20.000Z | 2022-03-30T05:47:20.000Z | _base_ = ['./default_runtime.py']
checkpoint_config = dict(interval=10)
# yapf:disable
log_config = dict(
interval=10,
hooks=[
dict(type='TextLoggerHook'),
])
work_dir = './work_dirs/'
| 20.5 | 37 | 0.64878 | _base_ = ['./default_runtime.py']
checkpoint_config = dict(interval=10)
# yapf:disable
log_config = dict(
interval=10,
hooks=[
dict(type='TextLoggerHook'),
])
work_dir = './work_dirs/'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ab1f24389ab3a6866882f9a80b71a885ab49883a | 21,385 | py | Python | tv-script-generation/dlnd_tv_script_generation.py | smrutiranjans/deep-learning | bd919b281d5c33fe9773e37b74509bfe15590d9d | [
"MIT"
] | null | null | null | tv-script-generation/dlnd_tv_script_generation.py | smrutiranjans/deep-learning | bd919b281d5c33fe9773e37b74509bfe15590d9d | [
"MIT"
] | 12 | 2022-01-13T03:31:58.000Z | 2022-03-12T00:53:52.000Z | tv-script-generation/dlnd_tv_script_generation.py | smrutiranjans/deep-learning | bd919b281d5c33fe9773e37b74509bfe15590d9d | [
"MIT"
] | null | null | null |
# coding: utf-8
# # TV Script Generation
# In this project, you'll generate your own [Simpsons](https://en.wikipedia.org/wiki/The_Simpsons) TV scripts using RNNs. You'll be using part of the [Simpsons dataset](https://www.kaggle.com/wcukierski/the-simpsons-by-the-data) of scripts from 27 seasons. The Neural Network... | 33.571429 | 549 | 0.701192 |
# coding: utf-8
# # TV Script Generation
# In this project, you'll generate your own [Simpsons](https://en.wikipedia.org/wiki/The_Simpsons) TV scripts using RNNs. You'll be using part of the [Simpsons dataset](https://www.kaggle.com/wcukierski/the-simpsons-by-the-data) of scripts from 27 seasons. The Neural Network... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6a6fdc556741398c8743081ed8aaf00ed6f23a32 | 12,650 | py | Python | databass/parse_sql.py | MrZhihao/databass-columnar | 6ecab5af257a20be88bf4e67ad3567c26ce0c964 | [
"MIT"
] | null | null | null | databass/parse_sql.py | MrZhihao/databass-columnar | 6ecab5af257a20be88bf4e67ad3567c26ce0c964 | [
"MIT"
] | null | null | null | databass/parse_sql.py | MrZhihao/databass-columnar | 6ecab5af257a20be88bf4e67ad3567c26ce0c964 | [
"MIT"
] | null | null | null | """
This file contains the grammar and code for parsing a SQL query
string into a tree of operators defined in ops.py
The key thing this DOES NOT do is convert the FROM clause
into a tree of Join operators. This is performed in
optimizer.py because we need additional logic to figure out
whether or not tables have joi... | 28.947368 | 116 | 0.591146 | """
This file contains the grammar and code for parsing a SQL query
string into a tree of operators defined in ops.py
The key thing this DOES NOT do is convert the FROM clause
into a tree of Join operators. This is performed in
optimizer.py because we need additional logic to figure out
whether or not tables have joi... | 0 | 0 | 0 | 6,307 | 0 | 57 | 0 | 18 | 223 |
6811e6637f853a5e9aef3499bfd7db738b19b096 | 7,472 | py | Python | run-drc-for-cell-gds-using-magic/run_all_drc.py | PATRIK515/skywater-pdk-actions | bd5ca876788e3a246fae6002240feab0ffa8bacc | [
"Apache-2.0"
] | 10 | 2021-03-12T23:30:21.000Z | 2022-02-26T13:26:11.000Z | run-drc-for-cell-gds-using-magic/run_all_drc.py | PATRIK515/skywater-pdk-actions | bd5ca876788e3a246fae6002240feab0ffa8bacc | [
"Apache-2.0"
] | 13 | 2021-03-12T23:22:59.000Z | 2021-06-03T17:04:25.000Z | run-drc-for-cell-gds-using-magic/run_all_drc.py | PATRIK515/skywater-pdk-actions | bd5ca876788e3a246fae6002240feab0ffa8bacc | [
"Apache-2.0"
] | 9 | 2021-03-12T23:30:26.000Z | 2021-10-21T03:50:32.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 SkyWater PDK Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# ... | 28.738462 | 79 | 0.609877 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 SkyWater PDK Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# ... | 15 | 3,425 | 0 | 0 | 0 | 138 | 0 | -17 | 136 |
2229d17a35e56cdbf99c0e8357ad2a2d64f1d70f | 285 | py | Python | desktop/core/ext-py/Twisted/twisted/protocols/irc.py | civascu/hue | 82f2de44789ff5a981ed725175bae7944832d1e9 | [
"Apache-2.0"
] | 19 | 2015-05-01T19:59:03.000Z | 2021-12-09T08:03:16.000Z | desktop/core/ext-py/Twisted/twisted/protocols/irc.py | civascu/hue | 82f2de44789ff5a981ed725175bae7944832d1e9 | [
"Apache-2.0"
] | 1 | 2018-01-03T15:26:49.000Z | 2018-01-03T15:26:49.000Z | desktop/core/ext-py/Twisted/twisted/protocols/irc.py | civascu/hue | 82f2de44789ff5a981ed725175bae7944832d1e9 | [
"Apache-2.0"
] | 30 | 2015-03-25T19:40:07.000Z | 2021-05-28T22:59:26.000Z | from twisted.python import util
util.moduleMovedForSplit('twisted.protocols.irc', 'twisted.words.protocols.irc',
'IRC protocol support', 'Words',
'http://twistedmatrix.com/trac/wiki/TwistedWords',
globals())
| 35.625 | 80 | 0.57193 | from twisted.python import util
util.moduleMovedForSplit('twisted.protocols.irc', 'twisted.words.protocols.irc',
'IRC protocol support', 'Words',
'http://twistedmatrix.com/trac/wiki/TwistedWords',
globals())
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4d3bf857045286623980b9d97bd0460fa1314c5d | 29,227 | py | Python | tccli/services/ssl/ssl_client.py | bopopescu/tencentcloud-cli-intl-en | e6317252557095dd10018226244e636daa4a3c67 | [
"Apache-2.0"
] | null | null | null | tccli/services/ssl/ssl_client.py | bopopescu/tencentcloud-cli-intl-en | e6317252557095dd10018226244e636daa4a3c67 | [
"Apache-2.0"
] | null | null | null | tccli/services/ssl/ssl_client.py | bopopescu/tencentcloud-cli-intl-en | e6317252557095dd10018226244e636daa4a3c67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from tencentcloud.ssl.v20191205 import ssl_client as ssl_client_v20191205
from tencentcloud.ssl.v20191205 import models as models_v20191205
from tccli.services.ssl import v20191205
from tccli.services.ssl.v20191205 import help as v20191205_help
CLIENT_MAP = {
"v20191205": ssl... | 40.762901 | 105 | 0.688678 | # -*- coding: utf-8 -*-
import os
import json
import tccli.options_define as OptionsDefine
import tccli.format_output as FormatOutput
from tccli.nice_command import NiceCommand
import tccli.error_msg as ErrorMsg
import tccli.help_template as HelpTemplate
from tccli import __version__
from tccli.utils import Utils
from ... | 0 | 0 | 0 | 0 | 0 | 26,876 | 0 | 220 | 746 |
456ced28d81322d1abece5431e53504e2cd86339 | 2,832 | py | Python | old.main.py | 0xBaphy/mediasite-ripper | 04fc5a31eebb027e36a0f756d855c60c0ca0920a | [
"WTFPL"
] | null | null | null | old.main.py | 0xBaphy/mediasite-ripper | 04fc5a31eebb027e36a0f756d855c60c0ca0920a | [
"WTFPL"
] | null | null | null | old.main.py | 0xBaphy/mediasite-ripper | 04fc5a31eebb027e36a0f756d855c60c0ca0920a | [
"WTFPL"
] | null | null | null |
if __name__ == '__main__':
Main()
| 28.32 | 166 | 0.613347 | from selenium import webdriver
from time import sleep
import requests
from aigpy import download
class Video:
def __init__(self, url, name):
self.Url = url
self.Name = name
class Lesson:
def __init__(self, part, lessonNumber, element):
self.Part = part
self.LessonNumber = les... | 0 | 0 | 0 | 216 | 0 | 2,312 | 0 | 9 | 249 |
4875422cec949e99ebe2dccd05ccdfbc21d53718 | 29,867 | py | Python | tracker/segtracker.py | mingmllu/Mask_RCNN | 29ff2283cbe45667452a383adb9638b4108507a6 | [
"MIT"
] | null | null | null | tracker/segtracker.py | mingmllu/Mask_RCNN | 29ff2283cbe45667452a383adb9638b4108507a6 | [
"MIT"
] | null | null | null | tracker/segtracker.py | mingmllu/Mask_RCNN | 29ff2283cbe45667452a383adb9638b4108507a6 | [
"MIT"
] | 1 | 2019-03-05T20:38:51.000Z | 2019-03-05T20:38:51.000Z |
import os
import sys
# Root directory of the project
ROOT_DIR = os.path.abspath("../")
# Import Mask RCNN
sys.path.append(ROOT_DIR) # To find local version of the library
| 41.252762 | 120 | 0.686075 |
import os
import sys
import numpy as np
import cv2
# Root directory of the project
ROOT_DIR = os.path.abspath("../")
# Import Mask RCNN
sys.path.append(ROOT_DIR) # To find local version of the library
from skimage.measure import find_contours
class MaskRCNNTracker():
"""Implements tracker based on segmentation... | 0 | 0 | 0 | 29,596 | 0 | 0 | 0 | 6 | 90 |
09a7f897058c390cbf4a7c05b272f9022b296a20 | 2,288 | py | Python | pbpstats/data_loader/factory.py | bahalbach/pbpstats | 6a9f602764edb7a3ee0e880fffbb5aa34990d6e9 | [
"MIT"
] | 54 | 2019-10-16T00:10:51.000Z | 2022-03-19T21:21:05.000Z | pbpstats/data_loader/factory.py | bahalbach/pbpstats | 6a9f602764edb7a3ee0e880fffbb5aa34990d6e9 | [
"MIT"
] | 15 | 2019-11-19T01:20:52.000Z | 2022-02-04T13:38:37.000Z | pbpstats/data_loader/factory.py | bahalbach/pbpstats | 6a9f602764edb7a3ee0e880fffbb5aa34990d6e9 | [
"MIT"
] | 15 | 2019-11-19T11:54:51.000Z | 2022-03-21T05:08:53.000Z | """
``DataLoaderFactory`` can be used to create data loader objects from the ``data_loader`` module.
The following code will create a data loader object for loading enhanced pbp from stats.nba.com.
.. code-block:: python
from pbpstats.data_loader.factory import DataLoaderFactory
data_loader = DataLoaderFact... | 35.2 | 129 | 0.633304 | """
``DataLoaderFactory`` can be used to create data loader objects from the ``data_loader`` module.
The following code will create a data loader object for loading enhanced pbp from stats.nba.com.
.. code-block:: python
from pbpstats.data_loader.factory import DataLoaderFactory
data_loader = DataLoaderFact... | 0 | 0 | 0 | 1,613 | 0 | 0 | 0 | 14 | 46 |
e5d9a1d8aa28c8c019da994038a6cfee3dab6393 | 25,046 | py | Python | pcdet/datasets/inhouse/inhouse_dataset.py | DJNing/CenterPoint-KITTI | 44630bc7d60c469a192c7a29178d580196a7410d | [
"Apache-2.0"
] | null | null | null | pcdet/datasets/inhouse/inhouse_dataset.py | DJNing/CenterPoint-KITTI | 44630bc7d60c469a192c7a29178d580196a7410d | [
"Apache-2.0"
] | null | null | null | pcdet/datasets/inhouse/inhouse_dataset.py | DJNing/CenterPoint-KITTI | 44630bc7d60c469a192c7a29178d580196a7410d | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
import numpy as np
# don't run this for creation
if __name__ == '__main__':
import sys
if sys.argv.__len__() > 1 and sys.argv[1] == 'create_kitti_infos':
import yaml
from pathlib import Path
from easydict import EasyDict
dataset_cfg = EasyDict(yaml.loa... | 43.558261 | 140 | 0.582568 | import copy
import pickle
from this import d
from pathlib import Path
import numpy as np
from skimage import io
from ...ops.roiaware_pool3d import roiaware_pool3d_utils
from ...utils import box_utils, calibration_kitti, common_utils, object3d_kitti
from ..dataset import DatasetTemplate
import open3d
import numpy as n... | 0 | 4,159 | 0 | 17,558 | 0 | 2,257 | 0 | 106 | 313 |
be489219c5e0aef68feebe152c1f0a2f699ee47d | 263 | py | Python | stanford_postagger/__init__.py | banyh/PyStanfordSegmenter | 2165a218df87f00f84c461a41ca77a86eb85687b | [
"MIT"
] | 16 | 2017-03-25T07:42:51.000Z | 2022-03-12T09:33:50.000Z | stanford_postagger/__init__.py | banyh/PyStanfordSegmenter | 2165a218df87f00f84c461a41ca77a86eb85687b | [
"MIT"
] | 1 | 2017-09-06T02:46:29.000Z | 2017-09-21T01:56:11.000Z | stanford_postagger/__init__.py | banyh/PyStanfordSegmenter | 2165a218df87f00f84c461a41ca77a86eb85687b | [
"MIT"
] | 5 | 2017-04-13T04:32:53.000Z | 2018-03-17T06:09:27.000Z | from .java import Postagger
from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution('stanford_postagger').version
except DistributionNotFound:
__version__ = 'Undefined'
__all__ = ['__version__', 'Postagger']
| 26.3 | 64 | 0.798479 | from .java import Postagger
from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution('stanford_postagger').version
except DistributionNotFound:
__version__ = 'Undefined'
__all__ = ['__version__', 'Postagger']
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6bb8ec68c2572f0b12197379ff3017e290c32e3b | 10,211 | py | Python | discode/http.py | TheFarGG/Discode | facf6cd4f82baef2288a23dbe6f2a02dfc2407e2 | [
"MIT"
] | 3 | 2021-11-06T11:07:18.000Z | 2022-03-18T09:04:42.000Z | discode/http.py | UnrealFar/Discode | facf6cd4f82baef2288a23dbe6f2a02dfc2407e2 | [
"MIT"
] | 3 | 2021-11-06T11:22:05.000Z | 2022-03-12T16:36:52.000Z | discode/http.py | UnrealFar/Discode | facf6cd4f82baef2288a23dbe6f2a02dfc2407e2 | [
"MIT"
] | 4 | 2021-11-06T11:08:26.000Z | 2022-03-12T14:25:57.000Z | from __future__ import annotations
__all__ = ("HTTP",)
import aiohttp
import logging
from typing import TYPE_CHECKING
if TYPE_CHECKING:
aiohttp.hdrs.WEBSOCKET = "websocket" # type: ignore
_logger = logging.getLogger("discode")
| 33.045307 | 132 | 0.523063 | from __future__ import annotations
__all__ = ("HTTP",)
import asyncio
import json
import aiohttp
import logging
from urllib.parse import quote as _quote
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Literal
from .connection import Connection
from .dataclasses import Embed, File
from .model... | 0 | 147 | 7,187 | 2,164 | 0 | 0 | 0 | 135 | 342 |
b436de1d92ef68f8af58562559d0540f445df9bd | 3,337 | py | Python | lib/translator.py | OliverDeBrisbane/Text-Translator | 9380d1bf7036098ff2e3e9a407408a3e4803c1e6 | [
"MIT"
] | null | null | null | lib/translator.py | OliverDeBrisbane/Text-Translator | 9380d1bf7036098ff2e3e9a407408a3e4803c1e6 | [
"MIT"
] | null | null | null | lib/translator.py | OliverDeBrisbane/Text-Translator | 9380d1bf7036098ff2e3e9a407408a3e4803c1e6 | [
"MIT"
] | 1 | 2021-12-13T04:57:13.000Z | 2021-12-13T04:57:13.000Z |
# Need to split up to avoid duplication
# The below function would be used to find occurrences where the source word is in the translation text.
'''
def search_single_word(self, language, word):
# Translate single word
found_words = ""
if language == '-en':
for dict_word in se... | 41.7125 | 147 | 0.564879 | class Translator():
def __init__(self, dictionary):
self.dictionary = dictionary
self.wordlist = dictionary.wordlist
def translate_single_word(self, language, word):
# Translate single word
# Returning an array of words for when there are multiple
# interpretations, we c... | 0 | 0 | 0 | 2,289 | 0 | 0 | 0 | 0 | 22 |
83915da98c5b6804a0bcbe5edfb1c53e2828f8cb | 479 | py | Python | get_dataset.py | bilkosem/Easy-Heatmap | 0d0f0cb83591366a9d7d5bd6c90ffaca7e6392b8 | [
"Apache-2.0"
] | 1 | 2020-10-18T22:21:47.000Z | 2020-10-18T22:21:47.000Z | get_dataset.py | bilkosem/Easy-Heatmap | 0d0f0cb83591366a9d7d5bd6c90ffaca7e6392b8 | [
"Apache-2.0"
] | null | null | null | get_dataset.py | bilkosem/Easy-Heatmap | 0d0f0cb83591366a9d7d5bd6c90ffaca7e6392b8 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
csv_file = pd.read_csv('http://archive.ics.uci.edu/ml/machine-learning-databases/communities/communities.data',header=None)
df = csv_file[[0,len(csv_file.columns)-1]]
df.columns = ['label', 'value']
grouped_by_state = df.groupby('label')
aa = grouped_by_state['value'].sum()/grouped_by_state['valu... | 36.846154 | 124 | 0.74739 | import pandas as pd
csv_file = pd.read_csv('http://archive.ics.uci.edu/ml/machine-learning-databases/communities/communities.data',header=None)
df = csv_file[[0,len(csv_file.columns)-1]]
df.columns = ['label', 'value']
grouped_by_state = df.groupby('label')
aa = grouped_by_state['value'].sum()/grouped_by_state['valu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5d68ca558c6e449163725893f151469f915829df | 658 | py | Python | client/tracebin/utils.py | alex/tracebin | cd9717e750718dcb94140f60957c3f543915317f | [
"BSD-3-Clause"
] | 3 | 2015-11-08T12:45:45.000Z | 2019-05-09T20:03:57.000Z | client/tracebin/utils.py | alex/tracebin | cd9717e750718dcb94140f60957c3f543915317f | [
"BSD-3-Clause"
] | null | null | null | client/tracebin/utils.py | alex/tracebin | cd9717e750718dcb94140f60957c3f543915317f | [
"BSD-3-Clause"
] | null | null | null | import os
import struct
import sys
from __pypy__ import time
if sys.platform.startswith("linux"):
| 25.307692 | 71 | 0.665653 | import os
import struct
import sys
from __pypy__ import time
def read_unpack(fmt, file):
# This is different from struct.unpack_from because it advances the
# position in the file
size = struct.calcsize(fmt)
return struct.unpack(fmt, file.read(size))
def dict_merge(*dicts):
result = {}
for d ... | 0 | 0 | 0 | 0 | 0 | 459 | 0 | 0 | 99 |
b65e8f5102b0510c92b8c0ec4c461f676d5eb9a1 | 5,482 | py | Python | OriginalRetroZoom/asteroidgame.py | letmaik/InnovationChallenge2021 | 4c32b450bcdd941ac32354bf20d426736b3bcbda | [
"MIT"
] | null | null | null | OriginalRetroZoom/asteroidgame.py | letmaik/InnovationChallenge2021 | 4c32b450bcdd941ac32354bf20d426736b3bcbda | [
"MIT"
] | null | null | null | OriginalRetroZoom/asteroidgame.py | letmaik/InnovationChallenge2021 | 4c32b450bcdd941ac32354bf20d426736b3bcbda | [
"MIT"
] | 1 | 2021-03-07T12:30:34.000Z | 2021-03-07T12:30:34.000Z | # asteroid game
| 34.917197 | 106 | 0.569865 | # asteroid game
from PIL import ImageFont, ImageDraw, Image
import cv2
import random
import numpy as np
import pathlib
from playsound import playsound
class AsteroidGame:
def __init__(self, width, height):
self.asteroid_image = cv2.imread('assets/asteroid.png', cv2.IMREAD_UNCHANGED)
self.astero... | 0 | 0 | 0 | 5,263 | 0 | 0 | 0 | 3 | 180 |
1d8cdeed1edf7b0c8801f03bf8ccdc2d766b9eac | 168 | py | Python | g.py | otricadziziusz/roguelike-tutorial | 7fa3f583ed50831ca89e0d900e5803dd50ea35ec | [
"MIT"
] | 17 | 2019-06-21T03:53:31.000Z | 2021-06-24T09:58:58.000Z | g.py | otricadziziusz/roguelike-tutorial | 7fa3f583ed50831ca89e0d900e5803dd50ea35ec | [
"MIT"
] | 5 | 2020-02-24T22:43:15.000Z | 2021-01-02T16:03:52.000Z | g.py | otricadziziusz/roguelike-tutorial | 7fa3f583ed50831ca89e0d900e5803dd50ea35ec | [
"MIT"
] | 3 | 2019-06-20T22:12:19.000Z | 2020-09-05T17:13:47.000Z | """Python module to define and hold global variables."""
import tcod
context: tcod.context.Context # Active context.
console: tcod.console.Console # Active console.
| 28 | 56 | 0.761905 | """Python module to define and hold global variables."""
import tcod
context: tcod.context.Context # Active context.
console: tcod.console.Console # Active console.
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
35e7db34863a9b9eb03878e8c456fb38371b7f28 | 3,574 | py | Python | bluebottle/wallposts/migrations/0013_auto_20170822_1105.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 10 | 2015-05-28T18:26:40.000Z | 2021-09-06T10:07:03.000Z | bluebottle/wallposts/migrations/0013_auto_20170822_1105.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 762 | 2015-01-15T10:00:59.000Z | 2022-03-31T15:35:14.000Z | bluebottle/wallposts/migrations/0013_auto_20170822_1105.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 9 | 2015-02-20T13:19:30.000Z | 2022-03-08T14:09:17.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-08-22 09:05
from __future__ import unicode_literals
| 127.642857 | 1,723 | 0.743984 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-08-22 09:05
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wallposts', '0012_auto_20170821_2018'),
]
operations = [
migrations.AlterModelOptio... | 0 | 0 | 0 | 3,403 | 0 | 0 | 0 | 11 | 46 |
ab66cfa7bee2f1894ebdb37a4d6be0f431161820 | 1,843 | py | Python | tests/test_impute_age.py | Tommo565/titanic-mlflow | 5bdaad5b90313db212fb2547eb5476a41ff22ccc | [
"MIT"
] | 1 | 2022-02-06T19:57:54.000Z | 2022-02-06T19:57:54.000Z | tests/test_impute_age.py | Tommo565/titanic-mlflow | 5bdaad5b90313db212fb2547eb5476a41ff22ccc | [
"MIT"
] | null | null | null | tests/test_impute_age.py | Tommo565/titanic-mlflow | 5bdaad5b90313db212fb2547eb5476a41ff22ccc | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from src.utils import (load_config, load_parameters)
from src.preprocessing_pipeline import impute_age
def test_impute_age():
"""Test the impute_age function"""
# Load in the test configuration & parameters
config = load_config(".env-test")
parameters = load_par... | 30.716667 | 75 | 0.604449 | import pandas as pd
import numpy as np
from src.utils import (
load_config,
load_parameters,
)
from src.preprocessing_pipeline import impute_age
def test_impute_age():
"""Test the impute_age function"""
# Load in the test configuration & parameters
config = load_config(".env-test")
parameters... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0 |
91ed56678214b8bb433fb4e47c8aad36ba3e19c4 | 3,984 | py | Python | BookSrc/learnOpenCV/EigenFace/EigenFace.py | xiaohaijin/OpenCV | 0b909cd2a3321d5ceaa00cd912a1ca44ed4fade1 | [
"MIT"
] | 1 | 2018-12-24T19:37:02.000Z | 2018-12-24T19:37:02.000Z | BookSrc/learnOpenCV/EigenFace/EigenFace.py | xiaohaijin/OpenCV | 0b909cd2a3321d5ceaa00cd912a1ca44ed4fade1 | [
"MIT"
] | null | null | null | BookSrc/learnOpenCV/EigenFace/EigenFace.py | xiaohaijin/OpenCV | 0b909cd2a3321d5ceaa00cd912a1ca44ed4fade1 | [
"MIT"
] | null | null | null | # Import necessary packages
from __future__ import print_function
import cv2
# Create data matrix from a list of images
# Read images from the directory
# Add the weighted eigen faces to the mean face
if __name__ == '__main__':
# Number of EigenFaces
NUM_EIGEN_FACES = 10
# Maximum weight
MAX_SLIDER_VALUE = 2... | 26.039216 | 106 | 0.688002 | # Import necessary packages
from __future__ import print_function
import os
import sys
import cv2
import numpy as np
# Create data matrix from a list of images
def createDataMatrix(images):
print("Creating data matrix",end=" ... ")
'''
Allocate space for all images in one data matrix.
The size of the data matrix... | 0 | 0 | 0 | 0 | 0 | 2,159 | 0 | -26 | 155 |
589dc4755e472ce7cb4dcc74c467f83713141471 | 589 | py | Python | src/urls.py | tys-hiroshi/bnodeapi | 51aa214a60eb31acee8be2c9d67a1d8edccd267b | [
"MIT"
] | null | null | null | src/urls.py | tys-hiroshi/bnodeapi | 51aa214a60eb31acee8be2c9d67a1d8edccd267b | [
"MIT"
] | 2 | 2021-05-21T09:36:42.000Z | 2021-05-28T03:55:44.000Z | src/urls.py | tys-hiroshi/bnodeapi | 51aa214a60eb31acee8be2c9d67a1d8edccd267b | [
"MIT"
] | null | null | null | from controllers._base_controller import app
# FastAPI
app.add_api_route('/', index)
app.add_api_route('/admin', admin) # management view for administrator
app.add_api_route('/users', users) # management view for administrator
# app.add_api_route('/api/add-address', api_addaddress) # management view for administrat... | 49.083333 | 92 | 0.809847 | from controllers._base_controller import app
from controllers.index_controller import *
from controllers.admin_controller import *
from controllers.user_controller import *
from controllers.api_controller import *
# FastAPIのルーティング用関数
app.add_api_route('/', index)
app.add_api_route('/admin', admin) # management view f... | 30 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 88 |