hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | 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 125 | 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 125 | 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.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
47f3a2dd5e09bad447f6cc00dc6a8d10104fddf3 | 778 | py | Python | apps/users/tests/test_api.py | lorenz-bienek/drf-saas-starter | 8377de9e452dcb929abde798e0383f6bdeaf9f2f | [
"BSD-3-Clause"
] | 9 | 2017-11-03T14:44:43.000Z | 2019-06-06T21:03:16.000Z | apps/users/tests/test_api.py | lorenz-bienek/drf-saas-starter | 8377de9e452dcb929abde798e0383f6bdeaf9f2f | [
"BSD-3-Clause"
] | 1 | 2017-08-02T15:52:01.000Z | 2019-08-13T22:48:25.000Z | apps/users/tests/test_api.py | lorenz-bienek/drf-saas-starter | 8377de9e452dcb929abde798e0383f6bdeaf9f2f | [
"BSD-3-Clause"
] | 3 | 2017-08-01T10:27:01.000Z | 2018-07-26T16:07:07.000Z | from rest_framework import status
from rest_framework.test import APITestCase
from django.urls import reverse
from ..models import User
| 35.363636 | 100 | 0.722365 | from rest_framework import status
from rest_framework.test import APITestCase
from django.urls import reverse
from ..models import User
class TestSuperuserLogin(APITestCase):
def setUp(self):
self.email = "new_user@test.com"
self.password = "test1234"
self.new_superuser = User.objects.c... | 220 | 396 | 23 |
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
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)
... | 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 |
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... | 12,555 | 665 | 371 |
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,time... | 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 |
98742feb272a04d3d0d54b9d490d166a9e710fb3 | 3,407 | py | Python | MEGA/Crypto.py | SaturnFX/MEGA-for-Python | fa54a998b197225b6aa679e888a60a5f39e7c477 | [
"Apache-2.0"
] | null | null | null | MEGA/Crypto.py | SaturnFX/MEGA-for-Python | fa54a998b197225b6aa679e888a60a5f39e7c477 | [
"Apache-2.0"
] | null | null | null | MEGA/Crypto.py | SaturnFX/MEGA-for-Python | fa54a998b197225b6aa679e888a60a5f39e7c477 | [
"Apache-2.0"
] | 1 | 2021-04-13T15:52:14.000Z | 2021-04-13T15:52:14.000Z | import json
import struct
import base64
import binascii
import Crypto.Cipher.AES
| 35.489583 | 102 | 0.627825 | import json
import struct
import base64
import binascii
import Crypto.Cipher.AES
def AESEncrypt(Data, Key):
AESCipher = Crypto.Cipher.AES.new(Key, Crypto.Cipher.AES.MODE_CBC, '\0' * 16)
return AESCipher.encrypt(Data)
def AESDecrypt(Data, Key):
AESCipher = Crypto.Cipher.AES.new(Key, Crypto.Ci... | 2,843 | 0 | 475 |
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
from bottle import default_app, request, route, response, get
from pymongo import MongoClient
import json
import api
bottle.debug(True)
@get('/')
@get('/geek')
@route
@route('/login', method=["OPTIONS", "POST"])
@enable_cors
@route... | 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... | 1,003 | 0 | 221 |
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 """
from python_priority_queue import PriorityQueueBase
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):
... | 1,034 | 547 | 23 |
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... | 8,758 | 3,537 | 456 |
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
... | 114 | 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 |
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
import collections
import io
import sys
import unittest
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... | 898 | 13 | 122 |
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
from sensirion_i2c_sht.sht3x import Sht3xTemperature, Sht3xHumidity, \
Sht3xStatusRegister
import pytest
@pytest.mark.parametrize("value", [
dict({'ticks': 0, 'degrees_celsi... | 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 | 0 | 0 |
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 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 =... | 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 =... | 2,426 | 0 | 115 |
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'
"""
import socket
import scipy
from scipy.fftpack import fft
import math as m
import numpy as np
##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 ... | 3,401 | -3 | 202 |
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
from tests.interfaces import IEchoService
from tests.ipopo import install_bundle, install_ipopo
# Pelix
from pelix.framework import FrameworkFactory, BundleContext
# Standard library
tr... | 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 |
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 forms import ArticleForm
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 | 102 | 23 |
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
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']]
# # ... | 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']]
# # ... | 819 | 0 | 71 |
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
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
... | 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
... | 7,441 | 115 | 655 |
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 = [['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]}') | 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]}') | 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.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... | 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 |
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 |
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 -*-
import matplotlib.pyplot as plt
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... | 259 | 0 | 23 |
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
from django.db import migrations, models
| 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 | 692 | 25 |
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 | from tkinter import *
import paho.mqtt.client as mqtt
__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 =... | 4,933 | -11 | 293 |
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
--------------------------------------
"""
from re import compile
import requests
from .web_handler import WebHandler
| 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... | 1,206 | 309 | 23 |
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,00... | 21.241379 | 126 | 0.573052 | """
가로 길이가 2이고 세로의 길이가 1인 직사각형모양의 타일이 있습니다. 이 직사각형 타일을 이용하여 세로의 길이가 2이고 가로의 길이가 n인 바닥을 가득 채우려고 합니다. 타일을 채울 때는 다음과 같이 2가지 방법이 있습니다.
타일을 가로로 배치 하는 경우
타일을 세로로 배치 하는 경우
직사각형의 가로의 길이 n이 매개변수로 주어질 때, 이 직사각형을 채우는 방법의 수를 return 하는 solution 함수를 완성해주세요.
제한사항
가로의 길이 n은 60,000이하의 자연수 입니다.
경우의 수가 많아 질 수 있으므로, 경우의 수를 1,000,000,00... | 245 | 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
from kaggle_adcal_2021.utils.template import GokartTask
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")
| 36 | 4 | 49 |
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... | 255 | 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 .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",
... | 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 |
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
from fparser.common.readfortran import FortranFileReader # type: ignore
from fparser.t... | 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... | 5,958 | 0 | 231 |
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 |
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
from org.apache.helix.ControllerChangeListener import ControllerChangeListener
from org.apache.helix.HelixDataAccessor import HelixDataAccessor
from... | 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... | 36 | 0 | 26 |
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 pytest
import importlib
module = importlib.import_module("12_subterranean_sustainability")
parse = module.parse
state_value = module.state_value
@pytest.mark.parametrize(
"number_of_generations, total_sum, output_state", [
(1, 91, "#...#....#.....#..#..#..#"),
(2, 132, "##..##...##....#..... | 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 = [
"...##",
"..#..",
".#...",
".#.#.",
".#.##",
".##..",
".####... | 1,026 | 0 | 89 |
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
import subprocess
def app_dir() -> str:
"""Get app dir."""
return environ.get('APP_DIR', dirname(realpath(__file__)))
def windows():
"""Prepare ... | 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 |
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 |
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
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
| 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()
... | 2,591 | 16 | 130 |
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 | import re
import random
import requests
from bs4 import BeautifulSoup
from datetime import datetime, timedelta
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... | 1,577 | 0 | 46 |
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 os
import unittest
from smart_getenv import getenv
class GetenvTests(unittest.TestCase):
"""
Tests for getenv.
"""
test_var_name = '__ENV_UTILS_TEST_VAR'
def delete_test_var(self):
"""
Delete test environment variable.
"""
if self.test_var_name in os.enviro... | 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):... | 55 | 0 | 54 |
0aa6e5ef18ddd1cd84d84ba40a68b3ca12d3ecf7 | 789 | py | Python | apps/core/forms.py | allexvissoci/djangoecommerce | 645c05daa5f13c1e42184a7c6f534b9c260d280a | [
"CC0-1.0"
] | null | null | null | apps/core/forms.py | allexvissoci/djangoecommerce | 645c05daa5f13c1e42184a7c6f534b9c260d280a | [
"CC0-1.0"
] | null | null | null | apps/core/forms.py | allexvissoci/djangoecommerce | 645c05daa5f13c1e42184a7c6f534b9c260d280a | [
"CC0-1.0"
] | null | null | null | from django import forms
from django.core.mail import send_mail
from django.conf import settings
| 32.875 | 75 | 0.595691 | from django import forms
from django.core.mail import send_mail
from django.conf import settings
class ContactForm(forms.Form):
name = forms.CharField(label='Nome', required=True)
email = forms.EmailField(label='E-mail')
message = forms.CharField(label='Mensagem', widget=forms.Textarea(),
... | 412 | 256 | 23 |
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... | 1,659 | 15 | 49 |
58486fc757840b7b3e50259e92e0f1e741275416 | 9,989 | py | Python | src/optimizer.py | RaiAnant/Flatland-rl | 5d5704458c0f4ee32277f564aa3672e7dfe23f53 | [
"MIT"
] | 1 | 2021-04-16T00:49:24.000Z | 2021-04-16T00:49:24.000Z | src/optimizer.py | RaiAnant/Flatland-rl | 5d5704458c0f4ee32277f564aa3672e7dfe23f53 | [
"MIT"
] | null | null | null | src/optimizer.py | RaiAnant/Flatland-rl | 5d5704458c0f4ee32277f564aa3672e7dfe23f53 | [
"MIT"
] | 1 | 2020-09-14T21:01:33.000Z | 2020-09-14T21:01:33.000Z | import copy
import numpy as np
from flatland.envs.agent_utils import RailAgentStatus
from collections import defaultdict
from itertools import groupby
| 44.59375 | 136 | 0.452598 | import copy
import numpy as np
from flatland.envs.agent_utils import RailAgentStatus
from collections import defaultdict
from itertools import groupby
def get_action_dict_safety(observation_builder, signal_timer):
actions = defaultdict()
blocked_edges = []
# nothing should stop movement within the safe z... | 9,792 | 0 | 46 |
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 |
72916544a39d1acb2003ad8639c2ecaf16c0cb12 | 1,313 | py | Python | aquaui/alert.py | ninest/aquaui | 11ec3b5239cb9b2668f02b1b591ae1af1d20a869 | [
"MIT"
] | 11 | 2021-01-03T10:11:12.000Z | 2022-02-10T20:57:36.000Z | aquaui/alert.py | ninest/notipy_osx | 11ec3b5239cb9b2668f02b1b591ae1af1d20a869 | [
"MIT"
] | 3 | 2020-12-26T07:35:42.000Z | 2020-12-30T14:06:26.000Z | aquaui/alert.py | ninest/aquaui | 11ec3b5239cb9b2668f02b1b591ae1af1d20a869 | [
"MIT"
] | null | null | null | from enum import Enum, unique
from typing import Union
from aquaui.utils import quotify, run_applescript
from .types.buttons import Buttons
from .types.result import Result
@unique
class Alert:
"""
Returns an object of type Result, which as a button_returned property.
"""
def with_buttons(self, but... | 26.26 | 98 | 0.651942 | from enum import Enum, unique
from typing import Union
from aquaui.utils import quotify, run_applescript
from .types.buttons import Buttons
from .types.result import Result
@unique
class AlertType(Enum):
INFORMATIONAL = "informational"
CRITICAL = "critical"
"""
WARNING = "warning"
Warning seems t... | 210 | 165 | 76 |
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 |
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... | 1,434 | 215 | 23 |
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 | import argparse
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
import numpy
import torch
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... | 3,431 | 0 | 115 |
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, include
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 |
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 -*-
from rest_framework.serializers import ModelSerializer, PrimaryKeyRelatedField
from ..models import *
| 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 | 970 | 138 |
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 | 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... | 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... | 2,263 | 122 | 153 |
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 |
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
from django.core.urlresolvers import reverse # noqa
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _
fro... | 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... | 10,643 | 2,667 | 252 |
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
... | 1,062 | 149 | 156 |
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 |
import yaml
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':
... | 839 | 0 | 23 |
96de8d4488b474de29591a070978bc65c4702c2a | 1,341 | py | Python | tempo-api/src/app/tempo/models/_all.py | cuappdev/archives | 061d0f9cccf278363ffaeb27fc655743b1052ae5 | [
"MIT"
] | null | null | null | tempo-api/src/app/tempo/models/_all.py | cuappdev/archives | 061d0f9cccf278363ffaeb27fc655743b1052ae5 | [
"MIT"
] | null | null | null | tempo-api/src/app/tempo/models/_all.py | cuappdev/archives | 061d0f9cccf278363ffaeb27fc655743b1052ae5 | [
"MIT"
] | null | null | null | from app.tempo.models.following import *
from app.tempo.models.like import *
from app.tempo.models.notification import *
from app.tempo.models.post import *
from app.tempo.models.session import *
from app.tempo.models.song_post import *
from app.tempo.models.song import *
from app.tempo.models.spotify_cred import *
fro... | 26.82 | 57 | 0.756898 | from app.tempo.models.following import *
from app.tempo.models.like import *
from app.tempo.models.notification import *
from app.tempo.models.post import *
from app.tempo.models.session import *
from app.tempo.models.song_post import *
from app.tempo.models.song import *
from app.tempo.models.spotify_cred import *
fro... | 0 | 781 | 207 |
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 |
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.
#--------------------------------------------------------------------------
from nose i... | 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... | 5,204 | 0 | 443 |
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
import re
# pyth... | 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... | 47 | 29,684 | 23 |
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
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... | 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... | 12,856 | 6,767 | 1,031 |
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"]
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
@unittest.skipIf(
NO_MULTIPROCESSING_SPAW... | 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... | 5,764 | 578 | 320 |
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 ... | 599 | 0 | 23 |
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
import math
import sys
... | 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
... | 2,125 | 3 | 157 |
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 | from math import ceil
import performance
import dislib as ds
from dislib.recommendation import ALS
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... | 551 | 0 | 23 |
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 | from functools import reduce
from operator import mul
from typing import NamedTuple, Optional
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(ad... | 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... | 3,251 | 121 | 161 |
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 | 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
##... | 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... | 5,956 | -4 | 380 |
c7b86d5ad684dc0561204d59c10e27da63ce25da | 25,325 | py | Python | test/lane_and_ditch_test.py | AmiiThinks/driving_gridworld | 2d3da913132b82d59b85ba8d04339991bcb7f818 | [
"MIT"
] | 3 | 2018-10-18T02:07:58.000Z | 2019-08-24T02:00:56.000Z | test/lane_and_ditch_test.py | AmiiThinks/driving_gridworld | 2d3da913132b82d59b85ba8d04339991bcb7f818 | [
"MIT"
] | 21 | 2018-06-11T22:56:42.000Z | 2021-01-21T20:50:14.000Z | test/lane_and_ditch_test.py | AmiiThinks/driving_gridworld | 2d3da913132b82d59b85ba8d04339991bcb7f818 | [
"MIT"
] | 2 | 2020-10-12T04:56:32.000Z | 2020-11-13T19:10:35.000Z | from itertools import product
import numpy as np
import driving_gridworld.road as dg_road
from driving_gridworld.obstacles import Bump
from driving_gridworld.obstacles import Pedestrian
from driving_gridworld.car import Car
from driving_gridworld.actions import ACTIONS, RIGHT, LEFT, UP, DOWN, NO_OP
import driving_gridw... | 38.14006 | 110 | 0.569477 | from itertools import product
import numpy as np
import driving_gridworld.road as dg_road
from driving_gridworld.obstacles import Bump
from driving_gridworld.obstacles import Pedestrian
from driving_gridworld.car import Car
from driving_gridworld.actions import ACTIONS, RIGHT, LEFT, UP, DOWN, NO_OP
import driving_gridw... | 22,878 | 0 | 904 |
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 | import numpy as np
# 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... | 1,359 | 0 | 46 |
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... | 294 | 0 | 22 |
6f69924bdafb02c73d5a9f7a28c323f5c084fcfb | 163 | py | Python | taattack/goals/status.py | linerxliner/ValCAT | e62985c6c64f6415bb2bb4716bd02d9686badd47 | [
"MIT"
] | null | null | null | taattack/goals/status.py | linerxliner/ValCAT | e62985c6c64f6415bb2bb4716bd02d9686badd47 | [
"MIT"
] | null | null | null | taattack/goals/status.py | linerxliner/ValCAT | e62985c6c64f6415bb2bb4716bd02d9686badd47 | [
"MIT"
] | null | null | null | from enum import Enum
| 13.583333 | 26 | 0.607362 | from enum import Enum
class Status(Enum):
SKIPPED = 0
SEARCHING = 1
SUCCESSFUL = 2
FAILED = 3
def __str__(self):
return self._name_
| 24 | 93 | 23 |
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... | 1,812 | 0 | 132 |
9f2af5bb4549a795dd28907871fadeb457aae6cd | 833 | py | Python | libs/rest.py | nramanan/nellie-bot | c21f9797a5d9999179b688a51122e3f53f3e4303 | [
"MIT"
] | 1 | 2018-07-25T10:59:02.000Z | 2018-07-25T10:59:02.000Z | libs/rest.py | rneeja/nellie-bot | c21f9797a5d9999179b688a51122e3f53f3e4303 | [
"MIT"
] | 9 | 2015-03-25T21:42:04.000Z | 2015-06-27T16:26:01.000Z | libs/rest.py | rneeja/nellie-bot | c21f9797a5d9999179b688a51122e3f53f3e4303 | [
"MIT"
] | null | null | null | import requests,sys
from config_helper import get_proxies
| 34.708333 | 87 | 0.648259 | import requests,sys
from config_helper import get_proxies
def get_pem():
if get_proxies()==None:
return None
pem_resp = requests.get('http://curl.haxx.se/ca/cacert.pem', proxies=get_proxies())
if pem_resp.status_code != 200:
print "ERROR: Received bad response from api: %d" % pem_resp.statu... | 729 | 0 | 46 |
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, '../')
from flint.tokenizer import Tokenizer
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 = ['... | 2,875 | 9 | 347 |
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... | 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... | 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, 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"""
... | 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"""
... | 141 | 0 | 26 |
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 | import argparse
from typing import Dict
from dataset import Dataset
from model import Model
from utils import setup_logger, get_logger
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... | 1,252 | 0 | 46 |
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
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... | 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... | 6,316 | 0 | 207 |
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'... | 3,949 | 0 | 260 |
b4a250b008421d5f1a988d7d24b237f5e8c080b3 | 291 | py | Python | 6 kyu/Is it an isogram.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 6 | 2020-09-03T09:32:25.000Z | 2020-12-07T04:10:01.000Z | 6 kyu/Is it an isogram.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 1 | 2021-12-13T15:30:21.000Z | 2021-12-13T15:30:21.000Z | 6 kyu/Is it an isogram.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | null | null | null | from collections import Counter
| 41.571429 | 107 | 0.690722 | from collections import Counter
def is_isogram(word):
if not isinstance(word, str) or not word:
return False
check=Counter(i.lower() for i in word if i.isalpha())
return False if not check else True if check.most_common()[0][1]==check.most_common()[-1][1] else False
| 233 | 0 | 22 |
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
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... | 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... | 324 | 0 | 23 |
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))#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")
... | 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")
... | 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
"""
import json
import validate_transaction
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... | 526 | 0 | 23 |
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, MyEncoder, 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 |
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 |
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 | 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
| 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 =... | 1,290 | 19 | 104 |
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 |
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... | 994 | 0 | 96 |
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 |
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 |
b84913d43b0001f9f2dcc256c7d23b79b4e5ada4 | 2,953 | py | Python | venv/Lib/site-packages/caffe2/python/operator_test/sparse_dropout_with_replacement_op_test.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | 1 | 2022-01-08T12:30:44.000Z | 2022-01-08T12:30:44.000Z | venv/Lib/site-packages/caffe2/python/operator_test/sparse_dropout_with_replacement_op_test.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/caffe2/python/operator_test/sparse_dropout_with_replacement_op_test.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null |
from caffe2.python import core
from hypothesis import given
import caffe2.python.hypothesis_test_util as hu
import numpy as np
| 42.797101 | 75 | 0.593972 |
from caffe2.python import core
from hypothesis import given
import caffe2.python.hypothesis_test_util as hu
import numpy as np
class SparseDropoutWithReplacementTest(hu.HypothesisTestCase):
@given(**hu.gcs_cpu_only)
def test_no_dropout(self, gc, dc):
X = np.array([1, 2, 3, 4, 5, 6, ... | 2,566 | 220 | 24 |
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... | 4,566 | 0 | 1,304 |
a5bdcc2597de2da2fdd07e2cef34c9f2c8c862e3 | 1,714 | py | Python | nlpclean/tests/test_ddup.py | shkarupa-alex/nlpclean | 091d0c1fd8ad60cc9e484ccf5a66bd97bf2f3899 | [
"MIT"
] | null | null | null | nlpclean/tests/test_ddup.py | shkarupa-alex/nlpclean | 091d0c1fd8ad60cc9e484ccf5a66bd97bf2f3899 | [
"MIT"
] | null | null | null | nlpclean/tests/test_ddup.py | shkarupa-alex/nlpclean | 091d0c1fd8ad60cc9e484ccf5a66bd97bf2f3899 | [
"MIT"
] | null | null | null | import os
import unittest
from ..ddup import dedup_lines_bloom
| 46.324324 | 115 | 0.644107 | import os
import unittest
from ..ddup import dedup_lines_bloom
class TestDedupLinesBloom(unittest.TestCase):
def test_all_dup(self):
with open(os.path.join(os.path.dirname(__file__), 'dedup_lines_bloom', 'all_dup_source.txt'), 'rt') as f:
source = f.read().split('\n')
result = dedu... | 1,523 | 24 | 103 |
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
#
# ... | 2,678 | 0 | 45 |
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 |
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 -*-
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 ... | 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 ... | 26,876 | 0 | 460 |
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 | from selenium import webdriver
from time import sleep
import requests
from aigpy import download
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... | 2,493 | -17 | 213 |
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
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... | 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... | 2,318 | 0 | 25 |
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... | 100 | 0 | 27 |
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 | 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... | 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... | 19,385 | 4,589 | 91 |
852d6730c085b7e67bb9bc64d2326a102313b12e | 910 | py | Python | FoxhoundApp/FoxhoundApp/TrafficApp/views.py | Anton250/MoscowCityHack2021_FoxoundTeam | 4a3d620da7d25938783d688596ca4b775d82909e | [
"MIT"
] | null | null | null | FoxhoundApp/FoxhoundApp/TrafficApp/views.py | Anton250/MoscowCityHack2021_FoxoundTeam | 4a3d620da7d25938783d688596ca4b775d82909e | [
"MIT"
] | null | null | null | FoxhoundApp/FoxhoundApp/TrafficApp/views.py | Anton250/MoscowCityHack2021_FoxoundTeam | 4a3d620da7d25938783d688596ca4b775d82909e | [
"MIT"
] | 1 | 2021-06-14T00:55:16.000Z | 2021-06-14T00:55:16.000Z | from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework.permissions import IsAuthenticated
from FoxhoundApp.TrafficApp.serializers import CategorySerializer
from FoxhoundApp.TrafficApp.utils import HeatMapDataGetter
| 39.565217 | 65 | 0.753846 | from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework.permissions import IsAuthenticated
from FoxhoundApp.TrafficApp.serializers import CategorySerializer
from FoxhoundApp.TrafficApp.utils import HeatMapDataGetter
class ItemsView(APIView):
permission_classes = [I... | 448 | 150 | 46 |
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 |
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 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... | 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... | 8,872 | 465 | 276 |