hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6e1d05dba9a266286addc73ec4950cdeada8c0b4 | 1,581 | py | Python | config.py | juanjtov/Twitter_PNL_PUBLIC | 473eea0e7b030c8358aa86f6d3ff9d787c94abe6 | [
"MIT"
] | null | null | null | config.py | juanjtov/Twitter_PNL_PUBLIC | 473eea0e7b030c8358aa86f6d3ff9d787c94abe6 | [
"MIT"
] | null | null | null | config.py | juanjtov/Twitter_PNL_PUBLIC | 473eea0e7b030c8358aa86f6d3ff9d787c94abe6 | [
"MIT"
] | null | null | null | import os
class Credentials:
API_KEY = os.getenv('API_KEY')
API_SECRET_KEY = os.getenv('API_SECRET_KEY')
#tokens
ACCESS_TOKEN = os.getenv('ACCESS_TOKEN')
ACCESS_TOKEN_SECRET = os.getenv('ACCESS_SECRET_TOKEN')
class Settings:
TRACK_WORDS = 'Technology'
TABLE_NAME = "twttechnology"
TABLE... | 39.525 | 127 | 0.697027 | 1,564 | 0.989247 | 0 | 0 | 0 | 0 | 0 | 0 | 1,028 | 0.650221 |
6e1de2b972d3bacd17bc4fe230cc40342951d8ec | 130 | py | Python | code/helpers/__init__.py | briandesilva/discovery-of-physics-from-data | b79c34317f049c9b47aaf2cc4c54c5ec7219f3d7 | [
"MIT"
] | 11 | 2020-07-02T01:48:27.000Z | 2022-03-29T18:23:32.000Z | code/helpers/__init__.py | briandesilva/discovery-of-physics-from-data | b79c34317f049c9b47aaf2cc4c54c5ec7219f3d7 | [
"MIT"
] | null | null | null | code/helpers/__init__.py | briandesilva/discovery-of-physics-from-data | b79c34317f049c9b47aaf2cc4c54c5ec7219f3d7 | [
"MIT"
] | 3 | 2020-11-21T09:11:21.000Z | 2022-03-29T18:23:58.000Z | from .library import *
from .differentiation import *
from .sindy_ball import SINDyBall
from .tests import *
from .utils import *
| 21.666667 | 33 | 0.776923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6e1fd593ca8661737d9d161ba6774b763dcdbb57 | 341 | py | Python | users/models.py | diogor/desafio-backend | 4264a843503cc51f635bcfb31a009d53ebe671d8 | [
"MIT"
] | null | null | null | users/models.py | diogor/desafio-backend | 4264a843503cc51f635bcfb31a009d53ebe671d8 | [
"MIT"
] | null | null | null | users/models.py | diogor/desafio-backend | 4264a843503cc51f635bcfb31a009d53ebe671d8 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
ADMIN = 'admin'
PLAYER = 'player'
TYPE_CHOICES = (
(ADMIN, "Admin"),
(PLAYER, "Player")
)
type = models.CharField(choices=TYPE_CHOICES, max_length=6,
... | 21.3125 | 63 | 0.609971 | 257 | 0.753666 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.087977 |
6e1ff72ebc4c23799d24fd64dfc337c27cbb1d44 | 151 | py | Python | python/glob/glob1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | python/glob/glob1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | python/glob/glob1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import glob
def main():
pyfiles = glob.glob("../*/*.py")
for pyfile in pyfiles:
print "pyfile %s" % pyfile
main()
| 13.727273 | 36 | 0.569536 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.258278 |
6e201007363380e4d643bfc71a7961525d34bdc2 | 4,073 | py | Python | email_scrapper/readers/gmail_reader.py | datmellow/email-scrapper | 614e99a4b33f3a0d3d85d5eb9c359818991673a6 | [
"MIT"
] | 2 | 2018-01-07T23:12:28.000Z | 2018-01-10T00:58:17.000Z | email_scrapper/readers/gmail_reader.py | LucasCoderT/email-scrapper | 614e99a4b33f3a0d3d85d5eb9c359818991673a6 | [
"MIT"
] | null | null | null | email_scrapper/readers/gmail_reader.py | LucasCoderT/email-scrapper | 614e99a4b33f3a0d3d85d5eb9c359818991673a6 | [
"MIT"
] | 1 | 2019-12-09T17:01:08.000Z | 2019-12-09T17:01:08.000Z | import base64
import datetime
import email
import logging
import os
import typing
from email.message import Message
from googleapiclient import errors
from email_scrapper.models import Stores
from email_scrapper.readers.base_reader import BaseReader
logger = logging.getLogger(__name__)
class GmailReader(BaseReader... | 41.141414 | 117 | 0.615762 | 3,780 | 0.928063 | 977 | 0.239872 | 1,557 | 0.382274 | 0 | 0 | 808 | 0.19838 |
6e20db78562463b54a9444adfca80573369e9be8 | 2,026 | py | Python | python/rail-fence-cipher/rail_fence_cipher.py | rootulp/exercism | 312a053ad1d375752acf0fce062ee7b9c643a149 | [
"MIT"
] | 41 | 2015-02-09T18:08:45.000Z | 2022-03-06T15:23:32.000Z | python/rail-fence-cipher/rail_fence_cipher.py | DucChuyenSoftwareEngineer/exercism | fb7820a1ba162b888a39f1b86cbe5d3ca3b15d4f | [
"MIT"
] | 21 | 2019-12-28T17:47:06.000Z | 2021-02-27T19:43:00.000Z | python/rail-fence-cipher/rail_fence_cipher.py | DucChuyenSoftwareEngineer/exercism | fb7820a1ba162b888a39f1b86cbe5d3ca3b15d4f | [
"MIT"
] | 18 | 2016-04-29T14:35:12.000Z | 2021-06-23T07:32:29.000Z | class Rails:
def __init__(self, num_rails):
self.num_rails = num_rails
self.rails = [[] for _ in range(num_rails)]
def populate_rails_linear(self, message, rail_lengths):
message_list = list(message)
for rail in self.linear_iterator(rail_lengths):
rail.append(messag... | 30.69697 | 70 | 0.638203 | 1,574 | 0.7769 | 445 | 0.219645 | 0 | 0 | 0 | 0 | 4 | 0.001974 |
6e218f16003cae78a4d29f7eb9e696aa4c77eb3e | 187 | py | Python | ClassCode/P2/HW - Copy.py | tsyet12/ClassCode | db1db97f71a6f31769d58739c6687863bc6b88c4 | [
"MIT"
] | null | null | null | ClassCode/P2/HW - Copy.py | tsyet12/ClassCode | db1db97f71a6f31769d58739c6687863bc6b88c4 | [
"MIT"
] | null | null | null | ClassCode/P2/HW - Copy.py | tsyet12/ClassCode | db1db97f71a6f31769d58739c6687863bc6b88c4 | [
"MIT"
] | null | null | null | a=[1,2,3]
b=[1,1,1]
#d={1:"ONE", 2:"TWO", 3:"THREE", 4:"FOUR", 5:"FIVE", 6:"SIX"}
f=[a[0]+b[0],a[1]+b[1],a[2]+b[2]]
if f[0]==1:
f[0]="ONE"
elif f[0]==2:
f[0]="TWO"
print(f)
| 11.6875 | 61 | 0.417112 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.379679 |
6e2255b8f77a18ad6776515831039d97cfa15e3a | 748 | py | Python | Advanced_algorithm/oj_test/test04.py | mndream/MyOJ | ee92fb657475d998e6c201f222cb20bcbc2bfd64 | [
"Apache-2.0"
] | 1 | 2018-12-27T08:06:38.000Z | 2018-12-27T08:06:38.000Z | Advanced_algorithm/oj_test/test04.py | mndream/MyPythonOJ | ee92fb657475d998e6c201f222cb20bcbc2bfd64 | [
"Apache-2.0"
] | null | null | null | Advanced_algorithm/oj_test/test04.py | mndream/MyPythonOJ | ee92fb657475d998e6c201f222cb20bcbc2bfd64 | [
"Apache-2.0"
] | null | null | null | '''
A+B for Input-Output Practice (IV)
描述
Your task is to Calculate the sum of some integers.
输入
Input contains multiple test cases. Each test case contains a integer N,
and then N integers follow in the same line.
A test case starting with 0 terminates the input and this test case is not to be processed.
输出
For each g... | 24.933333 | 91 | 0.669786 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 617 | 0.745169 |
6e22c62fbf96771a37ae5b157b23776e81cda2c5 | 2,421 | py | Python | pre-processing/obtain_audio_spectrogram.py | GeWu-Lab/OGM-GE_CVPR2022 | 08b3f2498dd3e89f57fe9a12b5bf0c162eba1fbf | [
"MIT"
] | 4 | 2022-03-06T17:57:24.000Z | 2022-03-24T04:26:32.000Z | pre-processing/obtain_audio_spectrogram.py | GeWu-Lab/OGM-GE_CVPR2022 | 08b3f2498dd3e89f57fe9a12b5bf0c162eba1fbf | [
"MIT"
] | null | null | null | pre-processing/obtain_audio_spectrogram.py | GeWu-Lab/OGM-GE_CVPR2022 | 08b3f2498dd3e89f57fe9a12b5bf0c162eba1fbf | [
"MIT"
] | 1 | 2022-03-31T08:12:15.000Z | 2022-03-31T08:12:15.000Z | import multiprocessing
import os
import os.path
import pickle
import librosa
import numpy as np
from scipy import signal
def audio_extract(path, audio_name, audio_path, sr=16000):
save_path = path
samples, samplerate = librosa.load(audio_path)
resamples = np.tile(samples, 10)[:160000]
resamples[resam... | 28.482353 | 106 | 0.646014 | 616 | 0.25444 | 0 | 0 | 0 | 0 | 0 | 0 | 326 | 0.134655 |
6e237945177ee47426cc1fcc873291dbba403f32 | 3,317 | py | Python | src/protean/core/event_handler.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | src/protean/core/event_handler.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | src/protean/core/event_handler.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | import inspect
import logging
from protean.container import Element, OptionsMixin
from protean.core.event import BaseEvent
from protean.exceptions import IncorrectUsageError
from protean.utils import DomainObjects, derive_element_class, fully_qualified_name
from protean.utils.mixins import HandlerMixin
logger = loggi... | 36.855556 | 114 | 0.619234 | 796 | 0.239976 | 0 | 0 | 391 | 0.117878 | 0 | 0 | 857 | 0.258366 |
6e246664f07a32e8eef7dfd24b7f3cda19fa9734 | 7,508 | py | Python | read_prepare_data.py | jlu-ilr-hydro/IPCC-Repots-Focus-Overview | bf631975eb6c3ea2cf2f8fe9382e3361ad700a6e | [
"Apache-2.0"
] | null | null | null | read_prepare_data.py | jlu-ilr-hydro/IPCC-Repots-Focus-Overview | bf631975eb6c3ea2cf2f8fe9382e3361ad700a6e | [
"Apache-2.0"
] | null | null | null | read_prepare_data.py | jlu-ilr-hydro/IPCC-Repots-Focus-Overview | bf631975eb6c3ea2cf2f8fe9382e3361ad700a6e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Sep 17 10:12:26 2021
@author: Florian Jehn
"""
import os
import pandas as pd
import numpy as np
def read_ipcc_counts_temp():
"""reads all counts of temperatures for all reports and makes on df"""
files = os.listdir(os.getcwd()+os.sep+"Results"+ os.sep + "temperature... | 48.128205 | 300 | 0.683404 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,071 | 0.540064 |
6e25342e23a32ed5b961b03bb3584a54058a2d5c | 156 | py | Python | tests/test_get_filesize.py | zevaverbach/zev | 7330718f4eee28695fe57fb1107e506e6b0c9e4e | [
"MIT"
] | null | null | null | tests/test_get_filesize.py | zevaverbach/zev | 7330718f4eee28695fe57fb1107e506e6b0c9e4e | [
"MIT"
] | 1 | 2019-07-20T09:26:46.000Z | 2019-07-20T09:26:46.000Z | tests/test_get_filesize.py | zevaverbach/zev | 7330718f4eee28695fe57fb1107e506e6b0c9e4e | [
"MIT"
] | null | null | null | from pytest import fixture
from zev.get_filesize import get_filesize
def test_get_filesize(empty_filepath):
assert get_filesize(empty_filepath) == 0
| 19.5 | 44 | 0.814103 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6e253d478e601785b1142f2b0dc902543e75cdbc | 179 | py | Python | part1/03.py | jbaltop/57_Challenges | fa66ac584fc02761803fbd5692b737a73bd57983 | [
"MIT"
] | 31 | 2017-10-08T15:57:07.000Z | 2021-06-16T11:55:05.000Z | part1/03.py | jbaltop/57_Challenges | fa66ac584fc02761803fbd5692b737a73bd57983 | [
"MIT"
] | 1 | 2021-04-30T20:39:01.000Z | 2021-04-30T20:39:01.000Z | part1/03.py | jbaltop/57_Challenges | fa66ac584fc02761803fbd5692b737a73bd57983 | [
"MIT"
] | 7 | 2017-10-16T17:13:36.000Z | 2019-07-03T16:24:01.000Z | def main():
quote = input("What is the quote?\n")
person = input("Who said it?\n")
speech = "\n" + person + " says, " + '"' + quote + '"'
print(speech)
main()
| 16.272727 | 58 | 0.502793 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.318436 |
6e265824cd5b4d3d09aa3a85134608484df9ae21 | 1,151 | py | Python | Integertask.py | Ainara12/Programing-Scripting-problems | 1017c1a8a3aeabc040886f9bdab35b252e7e08ea | [
"MIT"
] | null | null | null | Integertask.py | Ainara12/Programing-Scripting-problems | 1017c1a8a3aeabc040886f9bdab35b252e7e08ea | [
"MIT"
] | null | null | null | Integertask.py | Ainara12/Programing-Scripting-problems | 1017c1a8a3aeabc040886f9bdab35b252e7e08ea | [
"MIT"
] | null | null | null | #This program calculates the successive values of the following
# calculation: Next value by taking the positive integer added by user
# and if it is even divide it by 2, if it is odd, multiply by
#3 and add 1.Program ends if current value is 1.
#First: I created variable "pnumber" which will be the positive integer ... | 34.878788 | 100 | 0.701998 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 819 | 0.711555 |
6e2666a6e406e4ebd7fe6e6904bdb4696b8d2f47 | 404 | py | Python | has33.py | CombatPompano81/Python-Snippets-Galore | c2fb9c6ebef0477895749db9f2aa0f87132a72d6 | [
"Apache-2.0"
] | null | null | null | has33.py | CombatPompano81/Python-Snippets-Galore | c2fb9c6ebef0477895749db9f2aa0f87132a72d6 | [
"Apache-2.0"
] | null | null | null | has33.py | CombatPompano81/Python-Snippets-Galore | c2fb9c6ebef0477895749db9f2aa0f87132a72d6 | [
"Apache-2.0"
] | null | null | null | # main function
def has33(nums):
# iterates through the list and tries to find two 3s next to each other
for i in range(0, len(nums) - 1):
# if indice i has a 3 and the indice next to it has a 3, print true
if nums[i] == 3 and nums[i + 1] == 3:
return print('True')
return prin... | 22.444444 | 75 | 0.569307 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.410891 |
6e26eeb7a1d51ccae528791cb9b9b4c924ad57bd | 914 | py | Python | proj/urls.py | vitali-rebkavets-itechart/students-lab | 574ad0249ee40b799a2e8faaced3661915bee756 | [
"MIT"
] | null | null | null | proj/urls.py | vitali-rebkavets-itechart/students-lab | 574ad0249ee40b799a2e8faaced3661915bee756 | [
"MIT"
] | 26 | 2019-05-21T13:24:59.000Z | 2019-06-13T10:24:29.000Z | proj/urls.py | vitali-r/students-lab | 574ad0249ee40b799a2e8faaced3661915bee756 | [
"MIT"
] | 2 | 2019-05-21T12:55:23.000Z | 2019-05-21T14:31:14.000Z | from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings
from products.views import (products, index,
products_detail)
from rest_framework_jwt.views import refresh_jwt_token
from users.views import Obta... | 35.153846 | 80 | 0.705689 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.183807 |
6e2726ca9cbe233a3e8bac00017eecef8153cd91 | 17,692 | py | Python | survos2/frontend/plugins/objects.py | DiamondLightSource/SuRVoS2 | 42bacfb6a5cc267f38ca1337e51a443eae1a9d2b | [
"MIT"
] | 4 | 2017-10-10T14:47:16.000Z | 2022-01-14T05:57:50.000Z | survos2/frontend/plugins/objects.py | DiamondLightSource/SuRVoS2 | 42bacfb6a5cc267f38ca1337e51a443eae1a9d2b | [
"MIT"
] | 1 | 2022-01-11T21:11:12.000Z | 2022-01-12T08:22:34.000Z | survos2/frontend/plugins/objects.py | DiamondLightSource/SuRVoS2 | 42bacfb6a5cc267f38ca1337e51a443eae1a9d2b | [
"MIT"
] | 2 | 2018-03-06T06:31:29.000Z | 2019-03-04T03:33:18.000Z | from survos2.config import Config
import numpy as np
from numpy.lib.function_base import flip
from qtpy import QtWidgets
from qtpy.QtWidgets import QPushButton, QRadioButton
from survos2.frontend.components.base import *
from survos2.frontend.components.entity import (
SmallVolWidget,
TableWidget,
setup_en... | 37.562633 | 111 | 0.603154 | 16,705 | 0.944212 | 0 | 0 | 5,308 | 0.300023 | 0 | 0 | 2,083 | 0.117737 |
6e27e9a98e0663d5f4593b8e13414810400eac10 | 1,248 | py | Python | src/calc_orientation.py | ouyang-lab/CAPC | e0fcc698da833b9195315d6769bd076646323289 | [
"Apache-2.0"
] | 5 | 2020-08-24T16:18:45.000Z | 2021-07-07T16:54:32.000Z | src/calc_orientation.py | ouyang-lab/CAPC | e0fcc698da833b9195315d6769bd076646323289 | [
"Apache-2.0"
] | null | null | null | src/calc_orientation.py | ouyang-lab/CAPC | e0fcc698da833b9195315d6769bd076646323289 | [
"Apache-2.0"
] | 1 | 2020-12-09T04:15:59.000Z | 2020-12-09T04:15:59.000Z | import sys
import gzip
import numpy as np
if __name__ == "__main__":
f_names = sys.argv[1:]
max_value = 100000
bin_size = 50
threshold = 0.01
data = []
total_bins = (max_value/bin_size)+1
for no, f_name in enumerate(f_names):
#prefix = f_name.split("/")[-1].replace(".tx... | 23.54717 | 72 | 0.491186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.089744 |
6e28319339ecb10a654afec47c04531f1e4fc2e5 | 5,459 | py | Python | tests/benchmark/preprocess_img/preproc.py | mpascucci/AST-image-processing | 54111e874237f0c146760d514eea96131177878a | [
"ECL-2.0",
"Apache-2.0"
] | 6 | 2020-11-24T15:55:35.000Z | 2021-12-31T11:52:56.000Z | tests/benchmark/preprocess_img/preproc.py | mpascucci/AST-image-processing | 54111e874237f0c146760d514eea96131177878a | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-11-24T15:46:15.000Z | 2020-11-24T15:46:15.000Z | tests/benchmark/preprocess_img/preproc.py | mpascucci/AST-image-processing | 54111e874237f0c146760d514eea96131177878a | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2021-02-04T10:08:43.000Z | 2022-02-21T02:00:47.000Z | from tqdm import tqdm
import os
import glob
import pickle
import numpy as np
from imageio import imread, imwrite
import astimp
from multiprocessing import Pool, cpu_count
from functools import partial
class ErrorInPreproc(Exception):
pass
class Dataset():
"""Datasets consisting of several files in a given in... | 31.923977 | 98 | 0.596263 | 2,407 | 0.440923 | 0 | 0 | 0 | 0 | 0 | 0 | 1,274 | 0.233376 |
6e28b70b57732d2994e0b212e99122e11d61d96f | 1,024 | py | Python | src/main.py | Evelkos/PAM-and-CLARA | 26fbb8d2d4a7924ce1d0d504c4b23bac38238c69 | [
"MIT"
] | null | null | null | src/main.py | Evelkos/PAM-and-CLARA | 26fbb8d2d4a7924ce1d0d504c4b23bac38238c69 | [
"MIT"
] | null | null | null | src/main.py | Evelkos/PAM-and-CLARA | 26fbb8d2d4a7924ce1d0d504c4b23bac38238c69 | [
"MIT"
] | null | null | null | from clustering_algorithms import CLARA, PAM, get_initial_points
from data_loaders import load_data
from timer import Timer
from visualizers import plot_data
# FILENAME = "datasets/artificial/sizes3.arff"
FILENAME = "datasets/artificial/zelnik4.arff"
# FILENAME = "datasets/artificial/xclara.arff"
# FILENAME = "dataset... | 30.117647 | 88 | 0.709961 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.368164 |
6e2927924bc2223cbcdf3f80649b9ddc5b016ea6 | 1,143 | py | Python | module/test.py | yuxy000/PythonSyntax | efbfddbd62d88fa6768035d0155c9e8d17cb5670 | [
"MIT"
] | null | null | null | module/test.py | yuxy000/PythonSyntax | efbfddbd62d88fa6768035d0155c9e8d17cb5670 | [
"MIT"
] | null | null | null | module/test.py | yuxy000/PythonSyntax | efbfddbd62d88fa6768035d0155c9e8d17cb5670 | [
"MIT"
] | null | null | null | from module import support
from module import fibo
import sys
support.print_func("Runoob")
fibo.fib(1000)
print(fibo.fib2(100))
print(fibo.__name__)
# 把模块中的一个函数赋给一个本地的名称
fib = fibo.fib
fib(10)
"""
from…import 语句
Python的from语句让你从模块中导入一个指定的部分到当前命名空间中,语法如下:
from modname import name1[, name2[, ... nameN]]
例如,要导入模块 fib... | 19.05 | 85 | 0.726159 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,718 | 0.885111 |
6e2a9766e0a79f77304a55be682d4bc167bde209 | 4,459 | py | Python | src/utils.py | zimonitrome/AbstractionNet | a037b696ccac015936d60026cb1ac4ebafc68371 | [
"MIT"
] | null | null | null | src/utils.py | zimonitrome/AbstractionNet | a037b696ccac015936d60026cb1ac4ebafc68371 | [
"MIT"
] | null | null | null | src/utils.py | zimonitrome/AbstractionNet | a037b696ccac015936d60026cb1ac4ebafc68371 | [
"MIT"
] | null | null | null | import torch
from einops import rearrange
import svgwrite
###########################################
# Normalization / Standardization functions
###########################################
def normalize_functional(tensor: torch.Tensor, mean: list, std: list):
"""
Standardizes tensor in the channel dimension... | 36.54918 | 113 | 0.589146 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,241 | 0.502579 |
6e2c7487821c1b466bfeb152a868353bd01ba3f7 | 3,742 | py | Python | CellMQ.py | edjuaro/cell-migration-quantification | b6479cc8525a1ac8bdaf0abfc66dec57de0be21e | [
"MIT"
] | null | null | null | CellMQ.py | edjuaro/cell-migration-quantification | b6479cc8525a1ac8bdaf0abfc66dec57de0be21e | [
"MIT"
] | null | null | null | CellMQ.py | edjuaro/cell-migration-quantification | b6479cc8525a1ac8bdaf0abfc66dec57de0be21e | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from skimage import draw
from skimage import io
# Read image
im_in = cv2.imread("analyses/MDA231_stopper_1_c3.tif", cv2.IMREAD_GRAYSCALE);
# Threshold.
# Set values equal to or above 220 to 0.
# Set values below 220 to 255.
th, im_th = cv2.threshold(im_in, 20, 255, cv2.THRESH_BINARY_... | 27.925373 | 120 | 0.69829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,828 | 0.755746 |
6e2d9335521cea1ce24ba509b262882641d75542 | 1,344 | py | Python | test/unit/messages/bloxroute/test_txs_message.py | dolphinridercrypto/bxcommon | 8f70557c1dbff785a5dd3fcdf91176066e085c3a | [
"MIT"
] | 12 | 2019-11-06T17:39:10.000Z | 2022-03-01T11:26:19.000Z | test/unit/messages/bloxroute/test_txs_message.py | dolphinridercrypto/bxcommon | 8f70557c1dbff785a5dd3fcdf91176066e085c3a | [
"MIT"
] | 8 | 2019-11-06T21:31:11.000Z | 2021-06-02T00:46:50.000Z | test/unit/messages/bloxroute/test_txs_message.py | dolphinridercrypto/bxcommon | 8f70557c1dbff785a5dd3fcdf91176066e085c3a | [
"MIT"
] | 5 | 2019-11-14T18:08:11.000Z | 2022-02-08T09:36:22.000Z | from bxcommon.test_utils.abstract_test_case import AbstractTestCase
from bxcommon.messages.bloxroute.txs_message import TxsMessage
from bxcommon.models.transaction_info import TransactionInfo
from bxcommon.test_utils import helpers
from bxcommon.utils.object_hash import Sha256Hash
class TxsMessageTests(AbstractTestCa... | 38.4 | 110 | 0.738095 | 1,059 | 0.787946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6e2e387eef5e879a3d06801f9f8eb44b9b39bb68 | 712 | py | Python | CursoEmVideo/Aula16 - Tuplas.py | caique-santana/CursoEmVideo-Curso_Python3 | 86bb67bbbf348544e1135d8657672d4e33fa70e2 | [
"MIT"
] | 1 | 2020-04-15T00:49:02.000Z | 2020-04-15T00:49:02.000Z | CursoEmVideo/Aula16 - Tuplas.py | caique-santana/CursoEmVideo-Curso_Python3 | 86bb67bbbf348544e1135d8657672d4e33fa70e2 | [
"MIT"
] | null | null | null | CursoEmVideo/Aula16 - Tuplas.py | caique-santana/CursoEmVideo-Curso_Python3 | 86bb67bbbf348544e1135d8657672d4e33fa70e2 | [
"MIT"
] | null | null | null | lanche = ('Hambúrguer', 'Suco', 'Pizza', 'Pudim', 'Batata Frita')
# Tuplas são imutáveis
# lanche[1] = 'Refrigerante' - Esse comando não vai funcionar
print(len(lanche))
print(sorted(lanche))
print(lanche)
print(lanche[-3:])
for comida in lanche:
print(f'Eu vou comer {comida}')
for cont in range(0, len(lanche)):... | 22.25 | 65 | 0.644663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 342 | 0.473684 |
6e2ec7ad4cbde5fb55995e9127da176c9b74eb60 | 167 | py | Python | app/config.py | akabbeke/sd44_server | 7755567c7b273a5ac23b2aacc52477dd4a11d290 | [
"MIT"
] | null | null | null | app/config.py | akabbeke/sd44_server | 7755567c7b273a5ac23b2aacc52477dd4a11d290 | [
"MIT"
] | null | null | null | app/config.py | akabbeke/sd44_server | 7755567c7b273a5ac23b2aacc52477dd4a11d290 | [
"MIT"
] | null | null | null | import yaml
import os
config_file = os.path.join(os.path.dirname(__file__), "config/config.yml")
with open(config_file, 'r') as stream:
CONFIG = yaml.load(stream) | 27.833333 | 74 | 0.736527 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.131737 |
6e2f62475e9654f761ab72ca7f65f8bb7603adef | 921 | py | Python | python/projects/jenkins_config_xml_parser/main.py | zhaoace/codecraft | bf06267e86bd7386714911b0df4aa0ca0a91d882 | [
"Unlicense"
] | null | null | null | python/projects/jenkins_config_xml_parser/main.py | zhaoace/codecraft | bf06267e86bd7386714911b0df4aa0ca0a91d882 | [
"Unlicense"
] | null | null | null | python/projects/jenkins_config_xml_parser/main.py | zhaoace/codecraft | bf06267e86bd7386714911b0df4aa0ca0a91d882 | [
"Unlicense"
] | null | null | null | import xml.etree.ElementTree as ET
tree = ET.parse('/Users/zhaoli/workspace/splunk/playground/var/lib/jenkins/jobs/Splunk/jobs/develop/jobs/platform/jobs/cli/jobs/trigger_cli_linux/config.xml')
root = tree.getroot()
# SPs = root.findall("properties/hudson.model.ParametersDefinitionProperty/parameterDefinitions/[huds... | 27.909091 | 158 | 0.761129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 557 | 0.604777 |
6e2fe086028f0377c018ceee95df734b7ae1f811 | 986 | py | Python | BLAST/make_fasta.py | cdiaza/bootcamp | 2fda661a44930f70ac8ef15218cc99d099fc4019 | [
"MIT"
] | 1 | 2021-01-16T20:39:41.000Z | 2021-01-16T20:39:41.000Z | BLAST/make_fasta.py | cdiaza/bootcamp | 2fda661a44930f70ac8ef15218cc99d099fc4019 | [
"MIT"
] | null | null | null | BLAST/make_fasta.py | cdiaza/bootcamp | 2fda661a44930f70ac8ef15218cc99d099fc4019 | [
"MIT"
] | 1 | 2021-01-16T20:31:17.000Z | 2021-01-16T20:31:17.000Z | import random
def format_fasta(title, sequence):
"""
This formats a fasta sequence
Input:
title - String - Title of the sequence
sequence - String - Actual sequence
Output:
String - Fully formatted fasta sequence
"""
fasta_width = 70 # Number of characters in one line
n... | 29.878788 | 81 | 0.631846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 463 | 0.469574 |
6e3054f23fea6a6c7c56f18a768f57df2c3c07ac | 1,604 | py | Python | unittesting/utils/output_panel.py | guillermooo/UnitTesting | 04802c56d5ccea44043a241050d6fe331c6ff694 | [
"MIT"
] | null | null | null | unittesting/utils/output_panel.py | guillermooo/UnitTesting | 04802c56d5ccea44043a241050d6fe331c6ff694 | [
"MIT"
] | null | null | null | unittesting/utils/output_panel.py | guillermooo/UnitTesting | 04802c56d5ccea44043a241050d6fe331c6ff694 | [
"MIT"
] | null | null | null | import sublime
import os
class OutputPanel:
def __init__(
self, name, file_regex='', line_regex='', base_dir=None,
word_wrap=False, line_numbers=False, gutter=False,
scroll_past_end=False, syntax='Packages/Text/Plain text.tmLanguage'
):
self.name = name
self.window = s... | 32.08 | 79 | 0.639651 | 1,576 | 0.982544 | 0 | 0 | 0 | 0 | 0 | 0 | 245 | 0.152743 |
6e3246c7687554b238139dfec4bd2b58d1c2ba17 | 673 | py | Python | main.py | jon-choi/hillsbarber | 346e9cbe5de7c5bf8a9136e71981b058323784a1 | [
"Apache-2.0"
] | null | null | null | main.py | jon-choi/hillsbarber | 346e9cbe5de7c5bf8a9136e71981b058323784a1 | [
"Apache-2.0"
] | null | null | null | main.py | jon-choi/hillsbarber | 346e9cbe5de7c5bf8a9136e71981b058323784a1 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, render_template
app = Flask(__name__)
app.config['DEBUG'] = True
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
@app.route('/')
def hello(name=None):
"""Return a friendly HTTP greeting."""
return render_template(... | 29.26087 | 76 | 0.708767 | 0 | 0 | 0 | 0 | 283 | 0.420505 | 0 | 0 | 420 | 0.624071 |
6e330bec332cbcb5e47190df3547281fe5168a28 | 903 | py | Python | tests/test_echo_server_contextvar.py | rednafi/think-async | 3642afc0d8661b10affd953ce3b239f3e6b3009b | [
"MIT"
] | 87 | 2021-04-14T09:51:30.000Z | 2022-03-24T10:38:41.000Z | tests/test_echo_server_contextvar.py | rednafi/think-async | 3642afc0d8661b10affd953ce3b239f3e6b3009b | [
"MIT"
] | 3 | 2021-06-27T18:06:11.000Z | 2022-03-24T19:56:38.000Z | tests/test_echo_server_contextvar.py | rednafi/think-async | 3642afc0d8661b10affd953ce3b239f3e6b3009b | [
"MIT"
] | 4 | 2021-05-12T01:36:14.000Z | 2022-01-28T04:06:12.000Z | from unittest.mock import Mock, patch
import pytest
import patterns.echo_server_contextvar as main
@patch.object(main, "client_addr_var", Mock())
def test_render_goodbye(capsys):
# Call 'render_goodbye'
goodbye_string = main.render_goodbye()
print(goodbye_string)
# Assert.
out, err = capsys.re... | 25.8 | 77 | 0.743079 | 0 | 0 | 0 | 0 | 796 | 0.881506 | 339 | 0.375415 | 210 | 0.232558 |
6e3355f7d36e6d39cee7c23d5acd90666f7629a8 | 693 | py | Python | test.py | riquedev/SSLProxies24Feed | 93ab23a6794ae7f40002eb464a9c443afe44db86 | [
"MIT"
] | null | null | null | test.py | riquedev/SSLProxies24Feed | 93ab23a6794ae7f40002eb464a9c443afe44db86 | [
"MIT"
] | 1 | 2017-09-15T13:27:09.000Z | 2017-09-15T14:43:28.000Z | test.py | riquedev/SSLProxies24Feed | 93ab23a6794ae7f40002eb464a9c443afe44db86 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Autor: rique_dev (rique_dev@hotmail.com)
from SSLProxies24.Feed import Feed
from SSLProxies24.Check import CheckProxy
import time
import gc
# Recupera a listagem
prx = Feed().PROXY_LIST
# Inicia classe
chk = CheckProxy()
# Começa validação
chk.validatelist(prx)
# At... | 19.25 | 84 | 0.730159 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.367816 |
6e33da3d320ddccf5c2863568bc4b5fb0505e125 | 577 | py | Python | euler.py | user3719431/tna_lab1 | 183c34d927c39f502fea7d6a81f2945104d7b75b | [
"MIT"
] | null | null | null | euler.py | user3719431/tna_lab1 | 183c34d927c39f502fea7d6a81f2945104d7b75b | [
"MIT"
] | null | null | null | euler.py | user3719431/tna_lab1 | 183c34d927c39f502fea7d6a81f2945104d7b75b | [
"MIT"
] | null | null | null | import math as m
def yakobi(a, n, k):
if a < 0:
k *= pow(-1, (n - 1) // 2)
yakobi(-a, n, k)
if a % 2 == 0:
k *= (-1) ** ((pow(n, 2) - 1) / 8)
yakobi(a / 2, n, k)
if a == 1:
return k
if a < n:
k *= pow(-1, ((n - 1)(a - 1)) / 4)
yakobi(n % a, a, k)
... | 24.041667 | 60 | 0.363951 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6e34180a8de5ed1a630ffd86a9a830130bbd1076 | 3,787 | py | Python | src/b2d/hud_b2d.py | VgTajdd/neuroevolver | 248c96b25ad936e15cfffc7a4223926db83ad540 | [
"MIT"
] | null | null | null | src/b2d/hud_b2d.py | VgTajdd/neuroevolver | 248c96b25ad936e15cfffc7a4223926db83ad540 | [
"MIT"
] | null | null | null | src/b2d/hud_b2d.py | VgTajdd/neuroevolver | 248c96b25ad936e15cfffc7a4223926db83ad540 | [
"MIT"
] | null | null | null | ## ========================================================================= ##
## Copyright (c) 2019 Agustin Durand Diaz. ##
## This code is licensed under the MIT license. ##
## hud_b2d.py ... | 44.034884 | 108 | 0.520201 | 3,194 | 0.843412 | 0 | 0 | 0 | 0 | 0 | 0 | 664 | 0.175337 |
6e358277ee18f33ce73fddfacb850dc985cb0977 | 1,958 | py | Python | grblc/search/gcn/parser/combine.py | youngsm/adsgrb | a89b56b371888deb67788a9f5a91300b281784a6 | [
"MIT"
] | null | null | null | grblc/search/gcn/parser/combine.py | youngsm/adsgrb | a89b56b371888deb67788a9f5a91300b281784a6 | [
"MIT"
] | null | null | null | grblc/search/gcn/parser/combine.py | youngsm/adsgrb | a89b56b371888deb67788a9f5a91300b281784a6 | [
"MIT"
] | null | null | null | def get_final_txt(grb, tables, sentences, output_path):
"""
Combine the data from [grb]_final_sentences.txt and [grb]_final_tables.txt.
If a piece of data in tables and another piece in sentecnes are originially
from the same GCN. Put them in the same GCN in [grb]_final.txt.
"""
# Avoid modifyi... | 36.943396 | 88 | 0.550051 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,112 | 0.567926 |
6e35f3a7bd64997a4e302cd1d8e7454d8298b774 | 972 | py | Python | hardware/headband.py | davidji/roundbot | 2ca34a83c9feb3331f1b818106f06b3182c4970e | [
"Apache-2.0"
] | null | null | null | hardware/headband.py | davidji/roundbot | 2ca34a83c9feb3331f1b818106f06b3182c4970e | [
"Apache-2.0"
] | null | null | null | hardware/headband.py | davidji/roundbot | 2ca34a83c9feb3331f1b818106f06b3182c4970e | [
"Apache-2.0"
] | null | null | null | from solid import *
from solid.utils import *
import util
from util import *
from math import pi
def headband(r1=64.0, r2=85.0, t=3.0, w=12.0):
combe = right(r1-t/2)(linear_extrude(1)(square([1,1], center=True) + left(0.5)(circle(d=1))))
combe_spacing = 3.0 # mm
combe_count = pi*r1/combe_spacing
c... | 31.354839 | 123 | 0.588477 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.024691 |
6e362218fdee0a3ed3f2a33dd6f1acddc1fd9111 | 106 | py | Python | native_shortuuid/apps.py | foundertherapy/django-nativeshortuuidfield | 47e5a5d5c0f4caedbadb88ed6ac279f513ae522a | [
"MIT"
] | 5 | 2020-09-30T00:21:05.000Z | 2022-01-10T08:56:47.000Z | native_shortuuid/apps.py | foundertherapy/django-nativeshortuuidfield | 47e5a5d5c0f4caedbadb88ed6ac279f513ae522a | [
"MIT"
] | 1 | 2020-03-11T15:39:44.000Z | 2020-03-11T15:39:44.000Z | native_shortuuid/apps.py | foundertherapy/django-nativeshortuuidfield | 47e5a5d5c0f4caedbadb88ed6ac279f513ae522a | [
"MIT"
] | 1 | 2021-03-03T12:49:52.000Z | 2021-03-03T12:49:52.000Z | from django.apps import AppConfig
class NativeShortuuidConfig(AppConfig):
name = 'native_shortuuid'
| 17.666667 | 39 | 0.792453 | 69 | 0.650943 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.169811 |
6e364089d40bdc8f90fe2c5aa5081ef11b937f59 | 3,482 | py | Python | climlab/dynamics/meridional_advection_diffusion.py | nfeldl/climlab | 2cabb49e2c3f54c1795f24338ef5ee44e49fc7e7 | [
"BSD-3-Clause",
"MIT"
] | 160 | 2015-02-25T15:56:37.000Z | 2022-03-14T23:51:23.000Z | climlab/dynamics/meridional_advection_diffusion.py | nfeldl/climlab | 2cabb49e2c3f54c1795f24338ef5ee44e49fc7e7 | [
"BSD-3-Clause",
"MIT"
] | 137 | 2015-12-18T17:39:31.000Z | 2022-02-04T20:50:53.000Z | climlab/dynamics/meridional_advection_diffusion.py | nfeldl/climlab | 2cabb49e2c3f54c1795f24338ef5ee44e49fc7e7 | [
"BSD-3-Clause",
"MIT"
] | 54 | 2015-04-28T05:57:39.000Z | 2022-02-17T08:15:11.000Z | r"""General solver of the 1D meridional advection-diffusion equation on the sphere:
.. math::
\frac{\partial}{\partial t} \psi(\phi,t) &= -\frac{1}{a \cos\phi} \frac{\partial}{\partial \phi} \left[ \cos\phi ~ F(\phi,t) \right] \\
F &= U(\phi) \psi(\phi) -\frac{K(\phi)}{a} ~ \frac{\partial \psi}{\partial \phi}... | 42.463415 | 143 | 0.661401 | 1,587 | 0.455773 | 0 | 0 | 0 | 0 | 0 | 0 | 2,145 | 0.616025 |
6e369cedee85dd513db727dff183f7bdbc8263b5 | 1,624 | py | Python | gnes/service/grpc.py | micro-pixel/gnes | 388d1ba718ec04eedaaff3ce34da43689c197ee7 | [
"Apache-2.0"
] | 1 | 2019-10-23T03:41:57.000Z | 2019-10-23T03:41:57.000Z | gnes/service/grpc.py | cmy9068/gnes | 44a54be4c80108ac65b2450b4af8deded6da3339 | [
"Apache-2.0"
] | null | null | null | gnes/service/grpc.py | cmy9068/gnes | 44a54be4c80108ac65b2450b4af8deded6da3339 | [
"Apache-2.0"
] | 1 | 2020-10-28T15:07:36.000Z | 2020-10-28T15:07:36.000Z | # Tencent is pleased to support the open source community by making GNES available.
#
# Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a... | 36.088889 | 86 | 0.711823 | 776 | 0.477833 | 110 | 0.067734 | 153 | 0.094212 | 0 | 0 | 801 | 0.493227 |
6e37060290900c339e29bf4d74171d48cbea8c69 | 3,508 | py | Python | dhost/logs/models.py | dhost-project/dhost | ca6a4a76a737174b24165e20edeb1d1019a9424b | [
"MIT"
] | null | null | null | dhost/logs/models.py | dhost-project/dhost | ca6a4a76a737174b24165e20edeb1d1019a9424b | [
"MIT"
] | 67 | 2021-07-06T11:50:25.000Z | 2021-10-14T13:45:51.000Z | dhost/logs/models.py | dhost-project/dhost | ca6a4a76a737174b24165e20edeb1d1019a9424b | [
"MIT"
] | null | null | null | import uuid
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils import timezone
from django.utils.timesince import timesince
from django.utils.translation import gettext_lazy as _
from dhost.dapps.models import Dapp
def get_obj_m... | 35.434343 | 79 | 0.679019 | 3,118 | 0.888826 | 0 | 0 | 0 | 0 | 0 | 0 | 902 | 0.257127 |
6e397c403213c314186ad9c8dc4d66123671cfea | 620 | py | Python | Day14/main.py | dloibl/AOC2021 | 80672a7ee8ebc1a7970c155e4e15e0ed2351e085 | [
"MIT"
] | null | null | null | Day14/main.py | dloibl/AOC2021 | 80672a7ee8ebc1a7970c155e4e15e0ed2351e085 | [
"MIT"
] | null | null | null | Day14/main.py | dloibl/AOC2021 | 80672a7ee8ebc1a7970c155e4e15e0ed2351e085 | [
"MIT"
] | null | null | null | data = open("input.txt", "r").readlines()
polymer = data[0]
pair_insertion = {}
for line in data[2:]:
[token, replacement] = line.strip().split(" -> ")
pair_insertion[token] = replacement
result = [i for i in polymer.strip()]
for step in range(0, 10):
next = []
for i, si in enumerate(result):
... | 23.846154 | 63 | 0.596774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.072581 |
6e399f9876b8a0c8affd85f404dc546dcab1961f | 1,199 | py | Python | raster/migrations/0006_auto_20141016_0522.py | bpneumann/django-raster | 74daf9d396f2332a2cd83723b7330e6b10d73b1c | [
"BSD-3-Clause"
] | null | null | null | raster/migrations/0006_auto_20141016_0522.py | bpneumann/django-raster | 74daf9d396f2332a2cd83723b7330e6b10d73b1c | [
"BSD-3-Clause"
] | null | null | null | raster/migrations/0006_auto_20141016_0522.py | bpneumann/django-raster | 74daf9d396f2332a2cd83723b7330e6b10d73b1c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('raster', '0005_auto_20141014_0955'),
]
operations = [
migrations.AddField(
model_name='rastertile',
... | 31.552632 | 236 | 0.539616 | 1,090 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.110092 |
6e3ac431c3e1e4eb2271fa87cec379de652a2355 | 588 | py | Python | tests/tests/test_analysis/test_utils.py | klavinslab/coral | 17f59591211562a59a051f474cd6cecba4829df9 | [
"MIT"
] | 34 | 2015-12-26T22:13:51.000Z | 2021-11-17T11:46:37.000Z | tests/tests/test_analysis/test_utils.py | klavinslab/coral | 17f59591211562a59a051f474cd6cecba4829df9 | [
"MIT"
] | 13 | 2015-09-11T23:27:51.000Z | 2018-06-25T20:44:28.000Z | tests/tests/test_analysis/test_utils.py | klavinslab/coral | 17f59591211562a59a051f474cd6cecba4829df9 | [
"MIT"
] | 14 | 2015-10-08T17:08:48.000Z | 2022-02-22T04:25:54.000Z | '''
Tests for utils submodule of the analysis module.
'''
from nose.tools import assert_equal, assert_raises
from coral import analysis, DNA, RNA, Peptide
def test_utils():
test_DNA = DNA('ATAGCGATACGAT')
test_RNA = RNA('AUGCGAUAGCGAU')
test_peptide = Peptide('msvkkkpvqg')
test_str = 'msvkkkpvgq'
... | 29.4 | 71 | 0.748299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.222789 |
6e3b1af1bee45ddc7a412b33a2fead806c9ec302 | 1,765 | py | Python | djangorecipebook/templating.py | tkhyn/djangorecipebook | 2cbb3d46631630e2c7a3c511b504de2088aac115 | [
"MIT"
] | null | null | null | djangorecipebook/templating.py | tkhyn/djangorecipebook | 2cbb3d46631630e2c7a3c511b504de2088aac115 | [
"MIT"
] | null | null | null | djangorecipebook/templating.py | tkhyn/djangorecipebook | 2cbb3d46631630e2c7a3c511b504de2088aac115 | [
"MIT"
] | null | null | null | """
Carry out template-based replacements in project files
"""
import os
import sys
from string import Template
def replace_name(path, mapping):
"""
Handles replacement strings in the file or directory name
"""
# look for replacement strings in filename
f_split = list(os.path.spli... | 25.214286 | 77 | 0.607932 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 511 | 0.289518 |
6e3c23f713b7a54ba361ed5b6913012fed253e5e | 1,747 | py | Python | toHash.py | ElTarget/- | fcf774386514a7f070be25d643be7bbf1a92af1e | [
"MIT"
] | 1 | 2022-02-22T02:39:52.000Z | 2022-02-22T02:39:52.000Z | toHash.py | ElTarget/- | fcf774386514a7f070be25d643be7bbf1a92af1e | [
"MIT"
] | 1 | 2022-03-08T04:46:17.000Z | 2022-03-08T04:46:17.000Z | toHash.py | ElTarget/get_malware_bazaar | fcf774386514a7f070be25d643be7bbf1a92af1e | [
"MIT"
] | null | null | null | import hashlib
import os
# 生成字符串的MD5值
def str2md5(content=None):
if not content:
return ''
md5gen = hashlib.md5()
md5gen.update(content.encode())
return md5gen.hexdigest()
# 生成字符串的SHA256值
def str2sha256(content=None):
if not content:
return ''
sha256gen = hashlib.sha256()
... | 23.293333 | 46 | 0.567258 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.059317 |
6e3d50e4fe09a809ba48df4ba35365fe114afae0 | 609 | py | Python | final/VolleyballClubHouse/backend/Python/fb_post_scraper.py | Sabalone87/wp1092 | 3da36f3f3ae7ebc175bf0b015838de2928b3b5b9 | [
"MIT"
] | null | null | null | final/VolleyballClubHouse/backend/Python/fb_post_scraper.py | Sabalone87/wp1092 | 3da36f3f3ae7ebc175bf0b015838de2928b3b5b9 | [
"MIT"
] | null | null | null | final/VolleyballClubHouse/backend/Python/fb_post_scraper.py | Sabalone87/wp1092 | 3da36f3f3ae7ebc175bf0b015838de2928b3b5b9 | [
"MIT"
] | null | null | null | import os
import sys
from dotenv import load_dotenv
from facebook_scraper import get_posts
load_dotenv()
print ("hi")
result = []
for post in get_posts(group=os.environ.get("FacebookGroupId"), pages=1,
credentials=(os.environ.get("FacebookUser"), os.environ.get("FacebookPassword"))):
result.... | 25.375 | 102 | 0.609195 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.270936 |
6e3ec2b42c30f989802844d030b6a4725567d1ae | 442 | py | Python | config.py | benperove/oneliner.sh | 0c6eb25f2dd32cdd5cc275ef5849b5e12c76e9db | [
"Apache-2.0"
] | 4 | 2019-02-15T01:35:17.000Z | 2020-07-08T17:47:33.000Z | config.py | benperove/oneliner.sh | 0c6eb25f2dd32cdd5cc275ef5849b5e12c76e9db | [
"Apache-2.0"
] | 1 | 2019-05-24T21:00:37.000Z | 2019-05-24T21:00:37.000Z | config.py | benperove/oneliner.sh | 0c6eb25f2dd32cdd5cc275ef5849b5e12c76e9db | [
"Apache-2.0"
] | 1 | 2020-04-10T08:03:16.000Z | 2020-04-10T08:03:16.000Z | import os
#github login
SITE = 'https://api.github.com'
CALLBACK = 'https://oneliner.sh/oauth2'
AUTHORIZE_URL = 'https://github.com/login/oauth/authorize'
TOKEN_URL = 'https://github.com/login/oauth/access_token'
SCOPE = 'user'
#redis config
REDIS_HOST = os.environ['REDIS_HOST']
#REDIS_HOST = ... | 26 | 61 | 0.68552 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.527149 |
6e3f3c737da2c1c4948a6562ab3459af248d21f6 | 214 | py | Python | npt/utils/__init__.py | chbrandt/gpt-neanias | aa7c2e88972f9af280b7f02ee11170df6c967b55 | [
"MIT"
] | 2 | 2020-09-28T08:22:54.000Z | 2020-09-28T13:17:25.000Z | npt/utils/__init__.py | chbrandt/gpt-neanias | aa7c2e88972f9af280b7f02ee11170df6c967b55 | [
"MIT"
] | null | null | null | npt/utils/__init__.py | chbrandt/gpt-neanias | aa7c2e88972f9af280b7f02ee11170df6c967b55 | [
"MIT"
] | null | null | null | import json
from npt import log
from . import tmpdir
def read_geojson(filename):
"""
Return JSON object from GeoJSON
"""
with open(filename, 'r') as fp:
js = json.load(fp)
return js
| 14.266667 | 35 | 0.621495 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.233645 |
6e3fe2c168f62972f11479c2284c380956d44257 | 6,351 | py | Python | apps/user/tests/user/test_users_crud.py | magocod/django_chat | 9c7f82a3fdaa7a8f2f34062d8803b4f33f8c07b7 | [
"MIT"
] | 1 | 2019-10-01T01:39:37.000Z | 2019-10-01T01:39:37.000Z | apps/user/tests/user/test_users_crud.py | magocod/django_chat | 9c7f82a3fdaa7a8f2f34062d8803b4f33f8c07b7 | [
"MIT"
] | 18 | 2019-12-14T15:09:56.000Z | 2022-01-02T16:22:41.000Z | apps/user/tests/user/test_users_crud.py | magocod/django_chat | 9c7f82a3fdaa7a8f2f34062d8803b4f33f8c07b7 | [
"MIT"
] | 1 | 2020-02-10T18:00:16.000Z | 2020-02-10T18:00:16.000Z | """
Prueba creacion de usuarios
"""
# import json
from typing import Any, Dict
import pytest
from django.contrib.auth import get_user_model
from apps.user.serializers import UserHeavySerializer
# from django.contrib.auth.models import User
User = get_user_model()
pytestmark = [pytest.mark.django_db, pytest.mark... | 26.135802 | 79 | 0.623366 | 0 | 0 | 0 | 0 | 5,972 | 0.940324 | 0 | 0 | 1,658 | 0.261061 |
6e4153ef83e21bf087ec6ed89dceeb002c6fc185 | 319 | py | Python | examples/pybullet/examples/signedDistanceField.py | frk2/bullet3 | 225d823e4dc3f952c6c39920c3f87390383e0602 | [
"Zlib"
] | 27 | 2018-05-21T14:28:10.000Z | 2021-12-31T03:12:35.000Z | examples/pybullet/examples/signedDistanceField.py | frk2/bullet3 | 225d823e4dc3f952c6c39920c3f87390383e0602 | [
"Zlib"
] | 1 | 2018-11-19T19:07:47.000Z | 2018-11-19T19:07:47.000Z | examples/pybullet/examples/signedDistanceField.py | frk2/bullet3 | 225d823e4dc3f952c6c39920c3f87390383e0602 | [
"Zlib"
] | 13 | 2019-11-08T12:48:44.000Z | 2022-01-04T04:13:33.000Z | import pybullet as p
import pybullet
import time
p.connect(p.GUI)
p.loadURDF("toys/concave_box.urdf")
p.setGravity(0,0,-10)
for i in range (10):
p.loadURDF("sphere_1cm.urdf",[i*0.02,0,0.5])
p.loadURDF("duck_vhacd.urdf")
timeStep = 1./240.
p.setTimeStep(timeStep)
while (1):
p.stepSimulation()
time.sleep(timeStep)
| 21.266667 | 45 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.178683 |
6e415d21c97c8bf5b7c0199061ba4f235f80c0f3 | 2,472 | py | Python | Old/TitleTable.py | StephanM87/Sofie-Herrmann-Praktikum | 3fa7e715061e35aade8eb93756c30ebf10971059 | [
"MIT"
] | null | null | null | Old/TitleTable.py | StephanM87/Sofie-Herrmann-Praktikum | 3fa7e715061e35aade8eb93756c30ebf10971059 | [
"MIT"
] | 2 | 2021-10-04T08:22:40.000Z | 2021-10-05T13:30:02.000Z | Old/TitleTable.py | StephanM87/Sofie-Herrmann-Praktikum | 3fa7e715061e35aade8eb93756c30ebf10971059 | [
"MIT"
] | null | null | null | from pylatex import Document, Tabular, Section, NoEscape, Command, MultiRow
from Old.BioCatHubDatenmodell import DataModel
first_name = "some firstname"
last_name = "some lastname"
e_mail = "some@adress.com"
institution = "some institution"
vessel_type = "some vessel"
volume = int(42)
vol_unit = "mol/l"
add_attributes... | 34.333333 | 76 | 0.552589 | 1,973 | 0.797816 | 0 | 0 | 0 | 0 | 0 | 0 | 356 | 0.143955 |
6e41787cb64edb79c7312a9c056163a1f57400e3 | 535 | py | Python | Lab2/la2_4.py | ThomCruz/ImageAnalysisLab | 6a524696ecf4aab96336931d22ead8e8c9ec9e30 | [
"MIT"
] | null | null | null | Lab2/la2_4.py | ThomCruz/ImageAnalysisLab | 6a524696ecf4aab96336931d22ead8e8c9ec9e30 | [
"MIT"
] | null | null | null | Lab2/la2_4.py | ThomCruz/ImageAnalysisLab | 6a524696ecf4aab96336931d22ead8e8c9ec9e30 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import matplotlib.pyplot as plt
pic = cv2.imread('image2.png',0)
#pic = imageio.imread('img/parrot.jpg')
gray = lambda rgb : np.dot(rgb[... , :3] , [0.299 , 0.587, 0.114])
gray = gray(pic)
'''
log transform
-> s = c*log(1+r)
So, we calculate constant c to estimate s
-> c = (L-1)/log(1+|... | 20.576923 | 67 | 0.637383 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 173 | 0.323364 |
6e41cc5519a39b51f1547eae6ffa40cae08fd9e3 | 493 | py | Python | rabbit_mq_examples/new_task.py | audip/rabbitmq | f151dea427afa2a08a76fcdccf6fb99e6a81380f | [
"Apache-2.0"
] | null | null | null | rabbit_mq_examples/new_task.py | audip/rabbitmq | f151dea427afa2a08a76fcdccf6fb99e6a81380f | [
"Apache-2.0"
] | null | null | null | rabbit_mq_examples/new_task.py | audip/rabbitmq | f151dea427afa2a08a76fcdccf6fb99e6a81380f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import pika
import sys
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
channel = connection.channel()
channel.queue_declare(queue='task_queue', durable=True)
message = ''.join(sys.argv[1:]) or 'Hello World!'
for i in range(30):
message = str(i)+' '+i*'.'
ch... | 25.947368 | 127 | 0.730223 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.186613 |
6e45ae2f0c35533b4360de6c8858cfc005287327 | 4,100 | py | Python | metafilter/model/__init__.py | exhuma/metafilter | dfbc01877a3020f7fe58b9fda3e14ed073684f25 | [
"BSD-3-Clause"
] | null | null | null | metafilter/model/__init__.py | exhuma/metafilter | dfbc01877a3020f7fe58b9fda3e14ed073684f25 | [
"BSD-3-Clause"
] | null | null | null | metafilter/model/__init__.py | exhuma/metafilter | dfbc01877a3020f7fe58b9fda3e14ed073684f25 | [
"BSD-3-Clause"
] | null | null | null | from ConfigParser import SafeConfigParser
from cStringIO import StringIO
import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy import MetaData
from sqlalchemy.orm import sessionmaker
from os.path import sep
from hashlib import md5
from datetime import datetime, timedelta
import re
import logging
impo... | 26.973684 | 83 | 0.621463 | 1,691 | 0.412439 | 0 | 0 | 0 | 0 | 0 | 0 | 1,042 | 0.254146 |
6e46d398600e4b5a657c138522f24f0eef1938e9 | 3,067 | py | Python | manager/base.py | monocleface/viewer | 8ab47a9e846bd2716fe0208c34f33565513fc3f6 | [
"Apache-2.0"
] | 6 | 2020-02-28T21:18:16.000Z | 2020-03-13T16:45:57.000Z | manager/base.py | monocleface/viewer | 8ab47a9e846bd2716fe0208c34f33565513fc3f6 | [
"Apache-2.0"
] | 6 | 2020-02-28T12:42:52.000Z | 2020-03-16T03:49:09.000Z | manager/base.py | monocleface/viewer | 8ab47a9e846bd2716fe0208c34f33565513fc3f6 | [
"Apache-2.0"
] | 6 | 2020-03-05T13:04:25.000Z | 2020-03-13T16:46:03.000Z | from pathlib import Path
from typing import Union
import yaml
class Config(object):
"""Basic Config Class"""
def __init__(self, cfg_yaml_path:str, root:str=".", data_path:str="./data"):
r"""
Configuration of Settings
Args:
root: root path of project, default="."
... | 29.209524 | 103 | 0.538637 | 3,059 | 0.977629 | 0 | 0 | 58 | 0.018536 | 0 | 0 | 1,783 | 0.569831 |
6e486d2de9698c2208f5c29100b107e8de344209 | 307 | py | Python | 007 - Intro List Comprehension.py/016 - Maior.py | rodrigoviannini/meus_Primeiros_Codigos | 828dec1c4ce06889efd491145e631c30a45e858f | [
"MIT"
] | 2 | 2021-07-22T23:26:54.000Z | 2021-07-22T23:27:27.000Z | 007 - Intro List Comprehension.py/016 - Maior.py | rodrigoviannini/meus_Primeiros_Codigos | 828dec1c4ce06889efd491145e631c30a45e858f | [
"MIT"
] | null | null | null | 007 - Intro List Comprehension.py/016 - Maior.py | rodrigoviannini/meus_Primeiros_Codigos | 828dec1c4ce06889efd491145e631c30a45e858f | [
"MIT"
] | null | null | null | """
List Comprehension Aninhada
OBJ: Encontrar o maior ou os maiores números de uma lista e imprimir outra lista
"""
listaGenerica = [1, 2, 3, 4, 1, 2, 3, 4, 10, 10, 10, 5, 3, -4]
listaMaior = [x for x in listaGenerica if not False in [True if x >= y else False for y in listaGenerica]]
print(listaMaior) | 30.7 | 106 | 0.693811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.37987 |
6e487df26dabde97ea3f1c6bd9a631bd068d4b7f | 357 | py | Python | thehardway/practice3.py | sunquan9301/pythonLearn | f10760a4e32c3ac267e39d835c08f45800d081b6 | [
"Apache-2.0"
] | null | null | null | thehardway/practice3.py | sunquan9301/pythonLearn | f10760a4e32c3ac267e39d835c08f45800d081b6 | [
"Apache-2.0"
] | null | null | null | thehardway/practice3.py | sunquan9301/pythonLearn | f10760a4e32c3ac267e39d835c08f45800d081b6 | [
"Apache-2.0"
] | null | null | null | def main():
# age = input("How old are you?")
# print("I am %s year old" % age)
file = open("demo1")
lines = file.readlines()
print("lines",lines)
for i in range(len(lines)):
print(lines[i])
file.close()
c,d = addOne(1,2)
print(c,d)
def addOne(a,b):
return a+1, b+1
i... | 17 | 37 | 0.535014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.252101 |
6e4b454f9d9a661e964992d4f53efcc35fd88de8 | 651 | py | Python | ipt/td1/3.3-nbracines.py | lucas8/MPSI | edefa2155071910d95633acf87b9f3a9d34f67d3 | [
"MIT"
] | null | null | null | ipt/td1/3.3-nbracines.py | lucas8/MPSI | edefa2155071910d95633acf87b9f3a9d34f67d3 | [
"MIT"
] | null | null | null | ipt/td1/3.3-nbracines.py | lucas8/MPSI | edefa2155071910d95633acf87b9f3a9d34f67d3 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
def nbracines(a, b, c):
if a == 0:
print("Le coefficient dominant est nul, ce n'est pas un trinome !")
return
d = b*b - 4*a*c
k = 2
if abs(d) < 1e-10:
k = 1
d = 0
elif d < 0:
k = 0
print("Le polynome " + str(a) + "X^2 + " + str(b) + "X ... | 28.304348 | 140 | 0.537634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.422427 |
6e4cf85303623618f7fb5038daec890f74903ee3 | 2,641 | py | Python | ILSpy.ConvertedToPython/TreeNodes/Analyzer/AnalyzedTypeExtensionMethodsTreeNode.py | exyi/ILSpy | 17ddfa01ff4915c4ca8461c56fb7d04d25fc591e | [
"MIT"
] | 1 | 2021-04-26T19:46:09.000Z | 2021-04-26T19:46:09.000Z | ILSpy.ConvertedToPython/TreeNodes/Analyzer/AnalyzedTypeExtensionMethodsTreeNode.py | exyi/ILSpy | 17ddfa01ff4915c4ca8461c56fb7d04d25fc591e | [
"MIT"
] | null | null | null | ILSpy.ConvertedToPython/TreeNodes/Analyzer/AnalyzedTypeExtensionMethodsTreeNode.py | exyi/ILSpy | 17ddfa01ff4915c4ca8461c56fb7d04d25fc591e | [
"MIT"
] | null | null | null | # Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, m... | 41.920635 | 99 | 0.775842 | 1,376 | 0.520621 | 0 | 0 | 0 | 0 | 0 | 0 | 1,229 | 0.465002 |
6e4d07aff129e622dcf6a63b48636b52ecc07cc1 | 74 | py | Python | python/828.unique-letter-string.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | python/828.unique-letter-string.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | python/828.unique-letter-string.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | class Solution:
def uniqueLetterString(self, S: str) -> int:
| 18.5 | 48 | 0.608108 | 64 | 0.864865 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6e4d8cf0e65920064f1566f74432415d41b6c22a | 3,187 | py | Python | src/detector.py | omelchert/LEPM_1DFD | aa5ba78e557cdcd0a10a16065c0f17119f51ab78 | [
"BSD-3-Clause"
] | null | null | null | src/detector.py | omelchert/LEPM_1DFD | aa5ba78e557cdcd0a10a16065c0f17119f51ab78 | [
"BSD-3-Clause"
] | null | null | null | src/detector.py | omelchert/LEPM_1DFD | aa5ba78e557cdcd0a10a16065c0f17119f51ab78 | [
"BSD-3-Clause"
] | null | null | null | import sys
import numpy as np
class PiezoTransducer(object):
"""Piezoelectric transducer data structure
"""
def __init__(self,Glob,(zMin,zMax),h=1.):
"""initial instance of PiezoTransducer class
Args:
Glob (data structure): data structure holding domain configuration
... | 32.85567 | 81 | 0.569187 | 3,134 | 0.98337 | 0 | 0 | 0 | 0 | 0 | 0 | 2,017 | 0.632884 |
6e4dee90bdd936152cb862e03942c4be61d9a3e5 | 249 | py | Python | 2.datatype/1.number_typecasting.py | Tazri/Python | f7ca625800229c8a7e20b64810d6e162ccb6b09f | [
"DOC"
] | null | null | null | 2.datatype/1.number_typecasting.py | Tazri/Python | f7ca625800229c8a7e20b64810d6e162ccb6b09f | [
"DOC"
] | null | null | null | 2.datatype/1.number_typecasting.py | Tazri/Python | f7ca625800229c8a7e20b64810d6e162ccb6b09f | [
"DOC"
] | null | null | null | number_int = int("32");
number_float= float(32);
number_complex = complex(3222342332432435435345324435324523423);
print(type(number_int),": ",number_int);
print(type(number_float),": ",number_float);
print(type(number_complex),": ",number_complex); | 35.571429 | 64 | 0.767068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.064257 |
6e50868796b7b8940a4c3451e490a815d749a818 | 338 | py | Python | tests/test_kitty.py | raphaelavergud/CatApp | cf0a68e2c78307684e167a748e72e068c25a6089 | [
"MIT"
] | null | null | null | tests/test_kitty.py | raphaelavergud/CatApp | cf0a68e2c78307684e167a748e72e068c25a6089 | [
"MIT"
] | null | null | null | tests/test_kitty.py | raphaelavergud/CatApp | cf0a68e2c78307684e167a748e72e068c25a6089 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import unittest
import kitty
from kitty import uncomfy_checker
import mock
class TestProgram(unittest.TestCase):
def test_comfy(self):
kitty.uncomfy_checker = mock.Mock(return_value='comfortable')
self.assertIn(uncomfy_checker(), 'comfortable')
if __name__ == '__main__':
... | 22.533333 | 69 | 0.736686 | 189 | 0.559172 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.171598 |
6e52ebb7ea5d298c9a93f221c29b566a183e81fe | 251 | py | Python | latest/modules/physics/control/control_plots-5.py | sympy/sympy_doc | ec4f28eed09d5acb9e55874e82cc86c74e762c0d | [
"BSD-3-Clause"
] | 20 | 2015-01-28T01:08:13.000Z | 2021-12-19T04:03:28.000Z | latest/modules/physics/control/control_plots-5.py | sympy/sympy_doc | ec4f28eed09d5acb9e55874e82cc86c74e762c0d | [
"BSD-3-Clause"
] | 31 | 2015-01-27T07:16:19.000Z | 2021-11-15T10:58:15.000Z | latest/modules/physics/control/control_plots-5.py | sympy/sympy_doc | ec4f28eed09d5acb9e55874e82cc86c74e762c0d | [
"BSD-3-Clause"
] | 38 | 2015-01-08T18:48:27.000Z | 2021-12-02T13:19:43.000Z | from sympy.abc import s
from sympy.physics.control.lti import TransferFunction
from sympy.physics.control.control_plots import ramp_response_plot
tf1 = TransferFunction(s, (s+4)*(s+8), s)
ramp_response_plot(tf1, upper_limit=2) # doctest: +SKIP
| 41.833333 | 67 | 0.780876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.067729 |
6e52fb33dd28eee7b106bc48ba5c34f08261ca0b | 2,309 | py | Python | src/pynorare/__main__.py | concepticon/pynorare | 3cf5ea2d1597c5acc84963f781ff49d96b4d7e02 | [
"MIT"
] | null | null | null | src/pynorare/__main__.py | concepticon/pynorare | 3cf5ea2d1597c5acc84963f781ff49d96b4d7e02 | [
"MIT"
] | 5 | 2020-07-20T11:05:07.000Z | 2022-03-11T15:51:52.000Z | src/pynorare/__main__.py | concepticon/pynorare | 3cf5ea2d1597c5acc84963f781ff49d96b4d7e02 | [
"MIT"
] | null | null | null | """
Main command line interface to the pynorare package.
"""
import sys
import pathlib
import contextlib
from cldfcatalog import Config, Catalog
from clldutils.clilib import register_subcommands, get_parser_and_subparsers, ParserError, PathType
from clldutils.loglib import Logging
from pyconcepticon import Concepticon... | 32.985714 | 99 | 0.644435 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 518 | 0.22434 |
6e535cb6e52945115eb6d7ac8b6103b52efc86b8 | 92 | py | Python | app_kasir/apps.py | rizkyarwn/projectkasir | 6524a052bcb52534524db1c5fba05d31a0f0d801 | [
"MIT"
] | 2 | 2018-06-28T10:52:47.000Z | 2018-06-28T10:52:48.000Z | app_kasir/apps.py | rizkyarwn/projectkasir | 6524a052bcb52534524db1c5fba05d31a0f0d801 | [
"MIT"
] | null | null | null | app_kasir/apps.py | rizkyarwn/projectkasir | 6524a052bcb52534524db1c5fba05d31a0f0d801 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class AppKasirConfig(AppConfig):
name = 'app_kasir'
| 15.333333 | 33 | 0.76087 | 55 | 0.597826 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.119565 |
6e536b50d4b1d1ed9120b0881d839d4c283289b4 | 2,472 | py | Python | evaluator.py | kavinyao/SKBPR | 305aeb846ee89234d8eae3b73452c2fdad2496b4 | [
"MIT"
] | null | null | null | evaluator.py | kavinyao/SKBPR | 305aeb846ee89234d8eae3b73452c2fdad2496b4 | [
"MIT"
] | null | null | null | evaluator.py | kavinyao/SKBPR | 305aeb846ee89234d8eae3b73452c2fdad2496b4 | [
"MIT"
] | 1 | 2018-09-29T08:31:40.000Z | 2018-09-29T08:31:40.000Z | """
Evaluate recommendations.
"""
import config
from collections import defaultdict
class ConfusionMatrixEvaluator(object):
"""Evaluate result's precision and recall."""
def __init__(self):
self.experiment_reset()
self.reset()
def experiment_reset(self):
self.exp_results = default... | 35.314286 | 94 | 0.640372 | 2,386 | 0.96521 | 0 | 0 | 0 | 0 | 0 | 0 | 366 | 0.148058 |
6e53df58b8e50b1065505ed5b573aa01243270d1 | 12,263 | py | Python | yolov3_deepsort.py | h-enes-simsek/deep_sort_pytorch | 0a9ede55e53355c19455197cc8daa60336c652bb | [
"MIT"
] | 1 | 2021-02-28T15:22:43.000Z | 2021-02-28T15:22:43.000Z | yolov3_deepsort.py | h-enes-simsek/deep_sort_pytorch | 0a9ede55e53355c19455197cc8daa60336c652bb | [
"MIT"
] | null | null | null | yolov3_deepsort.py | h-enes-simsek/deep_sort_pytorch | 0a9ede55e53355c19455197cc8daa60336c652bb | [
"MIT"
] | null | null | null | import os
import cv2
import time
import argparse
import torch
import warnings
import numpy as np
from detector import build_detector
from deep_sort import build_tracker
from utils.draw import draw_boxes
from utils.parser import get_config
from utils.log import get_logger
from utils.io import write_results
from numpy ... | 42.432526 | 149 | 0.572698 | 10,730 | 0.867071 | 0 | 0 | 0 | 0 | 0 | 0 | 4,132 | 0.333899 |
280906641aae735ca1d3dbc649fdb86d59c81472 | 1,172 | py | Python | aerosandbox/numpy/array.py | askprash/AeroSandbox | 9e82966a25ced9ce96ca29bae45a4420278f0f1d | [
"MIT"
] | null | null | null | aerosandbox/numpy/array.py | askprash/AeroSandbox | 9e82966a25ced9ce96ca29bae45a4420278f0f1d | [
"MIT"
] | null | null | null | aerosandbox/numpy/array.py | askprash/AeroSandbox | 9e82966a25ced9ce96ca29bae45a4420278f0f1d | [
"MIT"
] | 1 | 2021-09-11T03:28:45.000Z | 2021-09-11T03:28:45.000Z | import numpy as onp
import casadi as cas
def array(object, dtype=None):
try:
a = onp.array(object, dtype=dtype)
if a.dtype == "O":
raise Exception
return a
except (AttributeError, Exception): # If this occurs, it needs to be a CasADi type.
# First, determine the dim... | 25.478261 | 89 | 0.529863 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0.296928 |
280a3ff7069c05f2fa4cfad162456023976a914d | 181 | py | Python | states/__init__.py | EemeliSyynimaa/Pore | 1eca9aa7163f1d31ae84c862790693eb3c904433 | [
"MIT"
] | null | null | null | states/__init__.py | EemeliSyynimaa/Pore | 1eca9aa7163f1d31ae84c862790693eb3c904433 | [
"MIT"
] | null | null | null | states/__init__.py | EemeliSyynimaa/Pore | 1eca9aa7163f1d31ae84c862790693eb3c904433 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'eeneku'
from main_menu import MainMenu
from world_map import WorldMap
from local_map import LocalMap
__all__ = [MainMenu, WorldMap, LocalMap] | 22.625 | 40 | 0.762431 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.171271 |
280b4458ea5ac2ac7597da9b972198f9e0db4a04 | 2,502 | py | Python | instagram/migrations/0001_initial.py | Maxwel5/photo-app-instagram | 8635346a5115dcc7e282791bd646f0a7f9dd2917 | [
"MIT"
] | null | null | null | instagram/migrations/0001_initial.py | Maxwel5/photo-app-instagram | 8635346a5115dcc7e282791bd646f0a7f9dd2917 | [
"MIT"
] | 8 | 2020-06-06T00:09:24.000Z | 2022-02-10T10:48:10.000Z | instagram/migrations/0001_initial.py | Maxwel5/photo-app-instagram | 8635346a5115dcc7e282791bd646f0a7f9dd2917 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2019-10-22 07:03
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | 41.7 | 154 | 0.584333 | 2,314 | 0.92486 | 0 | 0 | 0 | 0 | 0 | 0 | 335 | 0.133893 |
280b7ce2e2cb3f65d56ba5e4705455b1cbb3bb0e | 3,283 | py | Python | capspayment/api_payin.py | agorapay/python-sdk | c5b7fd6894f95e6862446248b26c16253c8fd4f4 | [
"MIT"
] | null | null | null | capspayment/api_payin.py | agorapay/python-sdk | c5b7fd6894f95e6862446248b26c16253c8fd4f4 | [
"MIT"
] | null | null | null | capspayment/api_payin.py | agorapay/python-sdk | c5b7fd6894f95e6862446248b26c16253c8fd4f4 | [
"MIT"
] | null | null | null | """
Payin API
"""
from dataclasses import dataclass
from typing import Union
from api_payin_model import (
PayinAdjustPaymentRequest,
PayinCancelRequest,
PayinCancelResponse,
PayinCaptureRequest,
PayinCaptureResponse,
PayinMandateRequest,
PayinMandateResponse,
PayinOrderDetailsRequest,... | 32.186275 | 82 | 0.687786 | 2,517 | 0.766677 | 0 | 0 | 2,528 | 0.770027 | 0 | 0 | 712 | 0.216875 |
280b8063834de2658f477b63373426eabdf7a4f6 | 5,516 | py | Python | tests/test_api.py | HealthByRo/fdadb | e020a902ca20cebd5999bc2dbc530375ab0922fb | [
"MIT"
] | 1 | 2020-06-11T04:44:22.000Z | 2020-06-11T04:44:22.000Z | tests/test_api.py | HealthByRo/fdadb | e020a902ca20cebd5999bc2dbc530375ab0922fb | [
"MIT"
] | 8 | 2018-11-26T09:22:14.000Z | 2019-10-23T13:17:44.000Z | tests/test_api.py | HealthByRo/fdadb | e020a902ca20cebd5999bc2dbc530375ab0922fb | [
"MIT"
] | null | null | null | from rest_framework.reverse import reverse
from rest_framework.test import APITestCase
from fdadb.models import MedicationName, MedicationNDC, MedicationStrength
class APITests(APITestCase):
def setUp(self):
for name in ("DrugName", "OtherDrugName", "DruuuugName", "NamedDrug"):
medication_nam... | 45.966667 | 120 | 0.583575 | 5,350 | 0.969906 | 0 | 0 | 0 | 0 | 0 | 0 | 1,653 | 0.299674 |
280c4e3ff6e2c8be5af4beb5882bf9b9cd5ee1c7 | 3,626 | py | Python | script/gen_canonical_combining_class.py | CyberZHG/UChar | e59ee5e3ad166288380407df6d5e6c0fe20681cf | [
"MIT"
] | 1 | 2020-07-15T16:16:20.000Z | 2020-07-15T16:16:20.000Z | script/gen_canonical_combining_class.py | CyberZHG/UChar | e59ee5e3ad166288380407df6d5e6c0fe20681cf | [
"MIT"
] | null | null | null | script/gen_canonical_combining_class.py | CyberZHG/UChar | e59ee5e3ad166288380407df6d5e6c0fe20681cf | [
"MIT"
] | 1 | 2020-06-01T01:15:29.000Z | 2020-06-01T01:15:29.000Z | #!/usr/bin/env python
""" Copyright 2020 Zhao HG
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... | 40.741573 | 99 | 0.660232 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,148 | 0.592388 |
280cef3837d316af797287a2c5c707f3a00a10c1 | 3,676 | py | Python | server.py | Timothylock/twillio-buzzer-connector | 9ac7e4763a5eee7d04daa054841e17332c0bac13 | [
"Apache-2.0"
] | null | null | null | server.py | Timothylock/twillio-buzzer-connector | 9ac7e4763a5eee7d04daa054841e17332c0bac13 | [
"Apache-2.0"
] | null | null | null | server.py | Timothylock/twillio-buzzer-connector | 9ac7e4763a5eee7d04daa054841e17332c0bac13 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, request
from twilio.twiml.voice_response import VoiceResponse, Gather
import datetime
import os
import json
import http.client
app = Flask(__name__)
allowUntil = datetime.datetime.now()
# Fetch env vars
whitelisted_numbers = os.environ['WHITELISTED_NUMBERS'].split(",") # Numbers allowed to d... | 33.418182 | 121 | 0.639554 | 0 | 0 | 0 | 0 | 1,980 | 0.538629 | 0 | 0 | 1,477 | 0.401795 |
280f1650f5bc3fd7a59f3f2ae253341d13e12350 | 5,738 | py | Python | App/GUI_Pages/LoginPage.py | TUIASI-AC-enaki/Shopping_Application | d6c6f446618937347f9c78fe3b969bc2c2ef9331 | [
"Apache-2.0"
] | null | null | null | App/GUI_Pages/LoginPage.py | TUIASI-AC-enaki/Shopping_Application | d6c6f446618937347f9c78fe3b969bc2c2ef9331 | [
"Apache-2.0"
] | null | null | null | App/GUI_Pages/LoginPage.py | TUIASI-AC-enaki/Shopping_Application | d6c6f446618937347f9c78fe3b969bc2c2ef9331 | [
"Apache-2.0"
] | null | null | null | import tkinter as tk
from tkinter import font as tkfont, ttk
import logging as log
import sys
from cx_Oracle import DatabaseError
from GUI_Pages.BasicPage import TitlePage
from Utilities.Cipher import Cipher, get_hash
FORMAT = '[%(asctime)s] [%(levelname)s] : %(message)s'
log.basicConfig(stream=sys.stdout, level=lo... | 50.778761 | 140 | 0.682468 | 5,392 | 0.9397 | 0 | 0 | 0 | 0 | 0 | 0 | 891 | 0.155281 |
2810be0978f433319136f58db93ce028bbbb9a9c | 8,151 | py | Python | cosmos/ingestion/ingest/process/hierarchy_extractor/bert_hierarchy_extractor/train/bert_extractor_trainer.py | ilmcconnell/Cosmos | 84245034727c30e20ffddee9e02c7e96f3aa115e | [
"Apache-2.0"
] | 30 | 2019-03-14T08:24:34.000Z | 2022-03-09T06:05:44.000Z | cosmos/ingestion/ingest/process/hierarchy_extractor/bert_hierarchy_extractor/train/bert_extractor_trainer.py | ilmcconnell/Cosmos | 84245034727c30e20ffddee9e02c7e96f3aa115e | [
"Apache-2.0"
] | 78 | 2019-02-07T22:14:48.000Z | 2022-03-09T05:59:18.000Z | cosmos/ingestion/ingest/process/hierarchy_extractor/bert_hierarchy_extractor/train/bert_extractor_trainer.py | ilmcconnell/Cosmos | 84245034727c30e20ffddee9e02c7e96f3aa115e | [
"Apache-2.0"
] | 11 | 2019-03-02T01:20:06.000Z | 2022-03-25T07:25:46.000Z | from bert_hierarchy_extractor.datasets.train_dataset import TrainHierarchyExtractionDataset
from bert_hierarchy_extractor.datasets.utils import cudafy
from bert_hierarchy_extractor.logging.utils import log_metrics
import numpy as np
from torch.utils.data import DataLoader
from transformers import AdamW, get_linear_sche... | 39.567961 | 104 | 0.585818 | 7,159 | 0.878297 | 0 | 0 | 0 | 0 | 0 | 0 | 1,263 | 0.15495 |
2811f691c9df0cfa06acd32c5b53be25799129d1 | 786 | py | Python | lvl2.py | choxner/python-challenge | 3c726936027087bc38f830a758549dd68467af52 | [
"Apache-2.0"
] | null | null | null | lvl2.py | choxner/python-challenge | 3c726936027087bc38f830a758549dd68467af52 | [
"Apache-2.0"
] | null | null | null | lvl2.py | choxner/python-challenge | 3c726936027087bc38f830a758549dd68467af52 | [
"Apache-2.0"
] | null | null | null |
# Level 2 of pythonchallenge.com!
# Challenge: within the source code of this level, there is a
# set of jumbled characters. Within these characters, find the
# letters and join them together to find the correct url.
from solution_framework import Solution
import requests
# to view source code
import re
... | 26.2 | 69 | 0.722646 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.56743 |
2812d4c9e6e9c407e500296b0bda22c042be6c3e | 1,444 | py | Python | saleor/social/migrations/0001_initial.py | autobotasia/saleor | e03e9f6ab1bddac308a6609d6b576a87e90ae655 | [
"CC-BY-4.0"
] | 1 | 2022-02-19T13:27:40.000Z | 2022-02-19T13:27:40.000Z | saleor/social/migrations/0001_initial.py | autobotasia/saleor | e03e9f6ab1bddac308a6609d6b576a87e90ae655 | [
"CC-BY-4.0"
] | null | null | null | saleor/social/migrations/0001_initial.py | autobotasia/saleor | e03e9f6ab1bddac308a6609d6b576a87e90ae655 | [
"CC-BY-4.0"
] | 2 | 2021-12-03T16:59:37.000Z | 2022-02-19T13:05:42.000Z | # Generated by Django 3.1.7 on 2021-05-10 07:38
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import saleor.core.utils.json_serializer
class Migration(migrations.Migration):
initial = True
dependencies = [
('store', '0001_initial'),
... | 41.257143 | 156 | 0.640582 | 1,244 | 0.861496 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.148199 |
28137bb29b2acdc147558b677e97f5e615bea160 | 2,900 | py | Python | adduser.py | Vignesh424/Face-Recognition-Attendance-Python | 5d9c33b64bd41918edc55290a320f73bc4afa4e5 | [
"Apache-2.0"
] | null | null | null | adduser.py | Vignesh424/Face-Recognition-Attendance-Python | 5d9c33b64bd41918edc55290a320f73bc4afa4e5 | [
"Apache-2.0"
] | null | null | null | adduser.py | Vignesh424/Face-Recognition-Attendance-Python | 5d9c33b64bd41918edc55290a320f73bc4afa4e5 | [
"Apache-2.0"
] | null | null | null | import cv2
import os
import sqlite3
import dlib
import re,time
from playsound import playsound
import pyttsx3
cam = cv2.VideoCapture(0)
cam.set(3, 640) # set video width
cam.set(4, 480) # set video height
face_detector = cv2.CascadeClassifier('C:/Users/ACER/Desktop/PROJECT ALL RESOURCE/PROJECT ALL RESOURCE/F... | 43.283582 | 182 | 0.686207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,495 | 0.515517 |
2814523dd67ea38c542b435dab46056033dd5d9d | 4,847 | py | Python | web/app/djrq/model/ampache/__init__.py | bmillham/djrq2 | c84283b75a7c15da1902ebfc32b7d75159c09e20 | [
"MIT"
] | 1 | 2016-11-23T20:50:00.000Z | 2016-11-23T20:50:00.000Z | web/app/djrq/model/ampache/__init__.py | bmillham/djrq2 | c84283b75a7c15da1902ebfc32b7d75159c09e20 | [
"MIT"
] | 15 | 2017-01-15T04:18:40.000Z | 2017-02-25T04:13:06.000Z | web/app/djrq/model/ampache/__init__.py | bmillham/djrq2 | c84283b75a7c15da1902ebfc32b7d75159c09e20 | [
"MIT"
] | null | null | null | from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import *
from sqlalchemy import *
from sqlalchemy.sql import func, or_
from sqlalchemy.types import TIMESTAMP
from sqlalchemy.ext.hybrid import hybrid_property
from time import time
import markupsafe
from sqlalchemy.ext.associationproxy import ... | 29.023952 | 100 | 0.637508 | 3,750 | 0.773674 | 0 | 0 | 1,428 | 0.294615 | 0 | 0 | 615 | 0.126883 |
2814df1e327e7a389483fc7f28c047ef76e86e37 | 8,753 | py | Python | conet/datasets/duke_oct_flat_sp.py | steermomo/conet | 21d60fcb4ab9a01a00aa4d9cd0bdee79ea35cc4b | [
"MIT"
] | null | null | null | conet/datasets/duke_oct_flat_sp.py | steermomo/conet | 21d60fcb4ab9a01a00aa4d9cd0bdee79ea35cc4b | [
"MIT"
] | null | null | null | conet/datasets/duke_oct_flat_sp.py | steermomo/conet | 21d60fcb4ab9a01a00aa4d9cd0bdee79ea35cc4b | [
"MIT"
] | 1 | 2020-05-18T10:05:24.000Z | 2020-05-18T10:05:24.000Z | import multiprocessing as mp
# mp.set_start_method('spawn')
import math
import os
import pickle
import random
from glob import glob
from os import path
import albumentations as alb
import cv2
import numpy as np
import skimage
import torch
import imageio
from albumentations.pytorch import ToTensorV2
from skimage.color... | 30.498258 | 109 | 0.595224 | 4,439 | 0.5061 | 0 | 0 | 0 | 0 | 0 | 0 | 3,154 | 0.359594 |
28162dcf4efa8e10ec1ddcb4eb91bfa4cb4b0d83 | 107 | py | Python | Chapter 01/fraction-type.py | arifmudi/Applying-Math-with-Python | abeb6b0a9bcfa8b21092b9793d4e691cf5a146bf | [
"MIT"
] | 34 | 2020-07-23T14:42:42.000Z | 2022-03-18T07:00:17.000Z | Chapter 01/fraction-type.py | arifmudi/Applying-Math-with-Python | abeb6b0a9bcfa8b21092b9793d4e691cf5a146bf | [
"MIT"
] | null | null | null | Chapter 01/fraction-type.py | arifmudi/Applying-Math-with-Python | abeb6b0a9bcfa8b21092b9793d4e691cf5a146bf | [
"MIT"
] | 31 | 2020-07-22T11:09:33.000Z | 2022-03-15T16:59:53.000Z |
from fractions import Fraction
num1 = Fraction(1, 3)
num2 = Fraction(1, 7)
num1 * num2 # Fraction(1, 21)
| 17.833333 | 30 | 0.691589 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.158879 |
281720b5fdc07905c3eb03b6c213540b162d5693 | 1,109 | py | Python | tests/config/test_project.py | gaborbernat/toxn | 1ecb1121b3e3dc30b892b0254cb5566048b5d2e7 | [
"MIT"
] | 4 | 2018-04-15T15:12:32.000Z | 2019-06-03T12:41:06.000Z | tests/config/test_project.py | gaborbernat/tox3 | 1ecb1121b3e3dc30b892b0254cb5566048b5d2e7 | [
"MIT"
] | 3 | 2018-03-15T11:06:30.000Z | 2018-04-15T15:17:29.000Z | tests/config/test_project.py | gaborbernat/tox3 | 1ecb1121b3e3dc30b892b0254cb5566048b5d2e7 | [
"MIT"
] | 1 | 2019-09-25T19:53:09.000Z | 2019-09-25T19:53:09.000Z | from io import StringIO
from pathlib import Path
import pytest
from toxn.config import from_toml
@pytest.mark.asyncio
async def test_load_from_io():
content = StringIO("""
[build-system]
requires = ['setuptools >= 38.2.4']
build-backend = 'setuptools:build_meta'
[tool.toxn]
default_tasks = ['py36']
""")
... | 25.790698 | 59 | 0.6844 | 0 | 0 | 0 | 0 | 1,004 | 0.90532 | 962 | 0.867448 | 423 | 0.381425 |
2819b274258b4f59c03325199e582718bece2d5e | 536 | py | Python | edinet_baseline_hourly_module/edinet_models/pyEMIS/ConsumptionModels/__init__.py | BeeGroup-cimne/module_edinet | 0cda52e9d6222a681f85567e9bf0f7e5885ebf5e | [
"MIT"
] | null | null | null | edinet_baseline_hourly_module/edinet_models/pyEMIS/ConsumptionModels/__init__.py | BeeGroup-cimne/module_edinet | 0cda52e9d6222a681f85567e9bf0f7e5885ebf5e | [
"MIT"
] | 13 | 2021-03-25T22:24:38.000Z | 2022-03-12T00:56:45.000Z | edinet_baseline_hourly_module/edinet_models/pyEMIS/ConsumptionModels/__init__.py | BeeGroup-cimne/module_edinet | 0cda52e9d6222a681f85567e9bf0f7e5885ebf5e | [
"MIT"
] | 1 | 2019-03-13T09:49:56.000Z | 2019-03-13T09:49:56.000Z | from constantMonthlyModel import ConstantMonthlyModel
from constantModel import ConstantModel
from twoParameterModel import TwoParameterModel
from threeParameterModel import ThreeParameterModel
from anyModel import AnyModelFactory
from schoolModel import SchoolModel, SchoolModelFactory
from recurrentModel import Recurr... | 44.666667 | 64 | 0.902985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
281aa6d325487ceb00b0753134cf1290afd8b2fd | 326 | py | Python | tinder_config_ex.py | nathan-149/tinderbot | 0413fbbba0219faf4415d75fd4f23518951b03a0 | [
"MIT"
] | 18 | 2020-06-30T18:31:44.000Z | 2021-12-17T05:04:58.000Z | tinder_config_ex.py | havzor1231/Tinder-Bot | 189524d7c80921a47b06262bd3cd42abaad7a85d | [
"MIT"
] | 2 | 2020-07-21T07:55:48.000Z | 2020-11-20T10:02:23.000Z | tinder_config_ex.py | havzor1231/Tinder-Bot | 189524d7c80921a47b06262bd3cd42abaad7a85d | [
"MIT"
] | 9 | 2020-07-12T08:00:00.000Z | 2022-03-24T03:29:40.000Z | host = 'https://api.gotinder.com'
#leave tinder_token empty if you don't use phone verification
tinder_token = "0bb19e55-5f12-4a23-99df-8e258631105b"
# Your real config file should simply be named "config.py"
# Just insert your fb_username and fb_password in string format
# and the fb_auth_token.py module will do the ... | 40.75 | 63 | 0.785276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 297 | 0.911043 |
281c7adc874167e64dc0db3f96ec79ad8d491740 | 1,958 | py | Python | simone/test.py | ross/simone | cfee8eaa04a7ddd235f735fa6c07adac28b4c6a4 | [
"MIT"
] | null | null | null | simone/test.py | ross/simone | cfee8eaa04a7ddd235f735fa6c07adac28b4c6a4 | [
"MIT"
] | 1 | 2021-11-04T13:47:28.000Z | 2021-11-04T13:47:28.000Z | simone/test.py | ross/simone | cfee8eaa04a7ddd235f735fa6c07adac28b4c6a4 | [
"MIT"
] | 1 | 2021-10-20T14:44:19.000Z | 2021-10-20T14:44:19.000Z | from django.test.runner import DiscoverRunner
from io import StringIO
from logging import StreamHandler, getLogger
from unittest import TextTestRunner, TextTestResult
class SimoneTestRunner(TextTestRunner):
def __init__(self, *args, **kwargs):
kwargs['buffer'] = True
super().__init__(*args, **kwar... | 31.079365 | 78 | 0.670582 | 1,782 | 0.910112 | 0 | 0 | 127 | 0.064862 | 0 | 0 | 449 | 0.229316 |
281e79df5e1dd65bfbeca11e0d9ea108af82bb30 | 18 | py | Python | library/tutorial/__init__.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | library/tutorial/__init__.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | library/tutorial/__init__.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | __all__ = ["fibo"] | 18 | 18 | 0.611111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.333333 |
2820ef5bc2fdcf7913515a4a45ac8b19c189a6ce | 1,340 | py | Python | longest path in matrix.py | buhuhaha/python | 4ff72ac711f0948ae5bcb0886d68e8df77fe515b | [
"MIT"
] | null | null | null | longest path in matrix.py | buhuhaha/python | 4ff72ac711f0948ae5bcb0886d68e8df77fe515b | [
"MIT"
] | null | null | null | longest path in matrix.py | buhuhaha/python | 4ff72ac711f0948ae5bcb0886d68e8df77fe515b | [
"MIT"
] | null | null | null |
row = [-1, -1, -1, 0, 0, 1, 1, 1]
col = [-1, 0, 1, -1, 1, -1, 0, 1]
def isValid(x, y, mat):
return 0 <= x < len(mat) and 0 <= y < len(mat[0])
def findMaxLength(mat, x, y, previous):
if not isValid(x, y, mat) or chr(ord(previous) + 1) != mat[x][y]:
return 0
max_len = 0
for k in ran... | 20.30303 | 85 | 0.435075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 178 | 0.132836 |
28226ec9ea67dad00950fa1852a66dbf14540c2c | 4,653 | py | Python | AnimalProfile/session/batchAnimals.py | AtMostafa/AnimalProfile | 866f55659b80291f840ecacd090afada5f4de674 | [
"MIT"
] | null | null | null | AnimalProfile/session/batchAnimals.py | AtMostafa/AnimalProfile | 866f55659b80291f840ecacd090afada5f4de674 | [
"MIT"
] | null | null | null | AnimalProfile/session/batchAnimals.py | AtMostafa/AnimalProfile | 866f55659b80291f840ecacd090afada5f4de674 | [
"MIT"
] | null | null | null | __all__ = ('get_session_list',
'get_animal_list',
'get_event',
'get_tag_pattern',
'get_pattern_animalList',
'get_current_animals')
import datetime
import logging
from .. import Root
from .. import File
from .. import Profile
from ..Profile import EventProfile
from... | 33.47482 | 119 | 0.663873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 924 | 0.198582 |
282403dbaa1f17f6e0d6f80a9faabdc5990009bd | 10,747 | py | Python | IsaacAgent.py | dholmdahl/connect4-1 | cdcd92ee30f45e89a9f01ebc87a8b6d797cc4a81 | [
"MIT"
] | null | null | null | IsaacAgent.py | dholmdahl/connect4-1 | cdcd92ee30f45e89a9f01ebc87a8b6d797cc4a81 | [
"MIT"
] | null | null | null | IsaacAgent.py | dholmdahl/connect4-1 | cdcd92ee30f45e89a9f01ebc87a8b6d797cc4a81 | [
"MIT"
] | null | null | null | from random import choice
from copy import deepcopy
from game_data import GameData
from agents import Agent
import numpy as np
import random
import pickle
import pandas as pd
class IsaacAgent(Agent):
def __init__(self, max_time=2, max_depth=300):
self.max_time = max_time
self.max_depth = max_dept... | 33.902208 | 199 | 0.499209 | 10,562 | 0.982786 | 0 | 0 | 0 | 0 | 0 | 0 | 2,603 | 0.242207 |
28254fc9a86cfb17a27b879bc1d9e02d48b17b76 | 1,288 | py | Python | HTTPServer.py | dannyb648/HTTPServer | e7877646d2ee890229d5db67055abed2f3a91812 | [
"MIT"
] | null | null | null | HTTPServer.py | dannyb648/HTTPServer | e7877646d2ee890229d5db67055abed2f3a91812 | [
"MIT"
] | null | null | null | HTTPServer.py | dannyb648/HTTPServer | e7877646d2ee890229d5db67055abed2f3a91812 | [
"MIT"
] | null | null | null | from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from SocketServer import ThreadingMixIn
from os import curdir, sep
import threading
import urlparse
import mimetypes
PORT_NUMBER = 8080
VERSION_NUMBER = '1.0.0'
class Handler(BaseHTTPRequestHandler):
def do_GET(self):
#Parse path into dictionary and... | 24.769231 | 61 | 0.736801 | 812 | 0.630435 | 0 | 0 | 0 | 0 | 0 | 0 | 283 | 0.21972 |
2826bae5797a9d9d95a636c0a99581f2619ca237 | 5,872 | py | Python | algorand-oracle-smart-contracts/src/algorand_oracle.py | damees/algorand-oracle | f7f078f9d153341d1ba546ff66e8afbf2685f114 | [
"MIT"
] | null | null | null | algorand-oracle-smart-contracts/src/algorand_oracle.py | damees/algorand-oracle | f7f078f9d153341d1ba546ff66e8afbf2685f114 | [
"MIT"
] | null | null | null | algorand-oracle-smart-contracts/src/algorand_oracle.py | damees/algorand-oracle | f7f078f9d153341d1ba546ff66e8afbf2685f114 | [
"MIT"
] | null | null | null | from pyteal import *
ADMIN_KEY = Bytes("admin")
WHITELISTED_KEY = Bytes("whitelisted")
REQUESTS_BALANCE_KEY = Bytes("requests_balance")
MAX_BUY_AMOUNT = Int(1000000000)
MIN_BUY_AMOUNT = Int(10000000)
REQUESTS_SELLER = Addr("N5ICVTFKS7RJJHGWWM5QXG2L3BV3GEF6N37D2ZF73O4PCBZCXP4HV3K7CY")
MARKET_EXCHANGE_NOTE = Bytes("alg... | 35.161677 | 111 | 0.547854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,160 | 0.197548 |
28271eebbca12a80c721021d335930842259d168 | 20,198 | py | Python | custom_components/shelly/__init__.py | astrandb/ShellyForHASS | f404d3007a26945f310a801c6c7d196d7fa1fe23 | [
"MIT"
] | null | null | null | custom_components/shelly/__init__.py | astrandb/ShellyForHASS | f404d3007a26945f310a801c6c7d196d7fa1fe23 | [
"MIT"
] | null | null | null | custom_components/shelly/__init__.py | astrandb/ShellyForHASS | f404d3007a26945f310a801c6c7d196d7fa1fe23 | [
"MIT"
] | null | null | null | """
Support for Shelly smart home devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/shelly/
"""
# pylint: disable=broad-except, bare-except, invalid-name, import-error
from datetime import timedelta
import logging
import time
import as... | 36.003565 | 87 | 0.576839 | 16,417 | 0.812803 | 0 | 0 | 3,489 | 0.17274 | 7,134 | 0.353203 | 3,899 | 0.193039 |
28274273d3b6e8ded8878a57fe78503427048f15 | 664 | py | Python | examples/petstore/migrations/versions/36745fa33987_remove_unique_constraint.py | fastack-dev/fastack-migrate | 1e9d3b3b1d25bec000432026b975053e5350e3da | [
"MIT"
] | 1 | 2021-12-23T03:20:57.000Z | 2021-12-23T03:20:57.000Z | examples/petstore/migrations/versions/36745fa33987_remove_unique_constraint.py | fastack-dev/fastack-migrate | 1e9d3b3b1d25bec000432026b975053e5350e3da | [
"MIT"
] | 1 | 2022-02-09T08:10:30.000Z | 2022-02-09T08:10:30.000Z | examples/petstore/migrations/versions/36745fa33987_remove_unique_constraint.py | fastack-dev/fastack-migrate | 1e9d3b3b1d25bec000432026b975053e5350e3da | [
"MIT"
] | null | null | null | """remove unique constraint
Revision ID: 36745fa33987
Revises: 6b7ad8fd60f9
Create Date: 2022-01-06 08:31:55.141039
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "36745fa33987"
down_revision = "6b7ad8fd60f9"
branch_labels = None
depends_on = None
def upgrade():
# ### commands a... | 24.592593 | 72 | 0.701807 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 439 | 0.661145 |
282798301fe62d89dc92c6e1905920362da8011c | 564 | py | Python | addons/website_event_track_live_quiz/controllers/track_live_quiz.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/website_event_track_live_quiz/controllers/track_live_quiz.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/website_event_track_live_quiz/controllers/track_live_quiz.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.website_event_track_live.controllers.track_live import EventTrackLiveController
class EventTrackLiveQuizController(EventTrackLiveController):
def _prepare_track_suggestion_values(self, track, trac... | 43.384615 | 113 | 0.79078 | 364 | 0.64539 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.218085 |
28289fb87251908aef9d071f6be27139338d9810 | 2,640 | py | Python | strongholds-and-followers/retainer/retainer.py | kbsletten/AvraeAliases | a392881dcddccc2155d10fd4d231f1be53c54bda | [
"MIT"
] | null | null | null | strongholds-and-followers/retainer/retainer.py | kbsletten/AvraeAliases | a392881dcddccc2155d10fd4d231f1be53c54bda | [
"MIT"
] | null | null | null | strongholds-and-followers/retainer/retainer.py | kbsletten/AvraeAliases | a392881dcddccc2155d10fd4d231f1be53c54bda | [
"MIT"
] | 1 | 2022-03-17T18:06:25.000Z | 2022-03-17T18:06:25.000Z | embed
<drac2>
GVARS = load_json(get_gvar("c1ee7d0f-750d-4f92-8d87-70fa22c07a81"))
CLASSES = [load_json(get_gvar(gvar)) for gvar in GVARS]
DISPLAY = {
"acrobatics": "Acrobatics",
"animalhandling": "Animal Handling",
"athletics": "Athletics",
"arcana": "Arcana",
"deception": "Deception",
"dex": "Dex... | 36.164384 | 122 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,599 | 0.605682 |
2829cb6a0e893f3f47a265e061c7b3ffa93b9eea | 8,351 | py | Python | bloomberg_functions.py | sophierubin1224/strategy_draft | 410206e5679865ffa25506e733c13b5b03416586 | [
"MIT"
] | null | null | null | bloomberg_functions.py | sophierubin1224/strategy_draft | 410206e5679865ffa25506e733c13b5b03416586 | [
"MIT"
] | null | null | null | bloomberg_functions.py | sophierubin1224/strategy_draft | 410206e5679865ffa25506e733c13b5b03416586 | [
"MIT"
] | 4 | 2021-04-12T23:30:14.000Z | 2021-04-13T13:19:15.000Z | ################################################################################
##### For Bloomberg ------------------------------------------------------------
##### Can't use this if you're on a Mac :(
################################################################################
from __future__ import print_f... | 41.341584 | 81 | 0.544246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,266 | 0.391091 |
282a2f90de76609dae1135f6d1faa97131c57a5d | 3,767 | py | Python | backend/histocat/worker/segmentation/processors/acquisition_processor.py | BodenmillerGroup/histocat-web | c598cd07506febf0b7c209626d4eb869761f2e62 | [
"MIT"
] | 4 | 2021-06-14T15:19:25.000Z | 2022-02-09T13:17:39.000Z | backend/histocat/worker/segmentation/processors/acquisition_processor.py | BodenmillerGroup/histocat-web | c598cd07506febf0b7c209626d4eb869761f2e62 | [
"MIT"
] | null | null | null | backend/histocat/worker/segmentation/processors/acquisition_processor.py | BodenmillerGroup/histocat-web | c598cd07506febf0b7c209626d4eb869761f2e62 | [
"MIT"
] | 1 | 2022-02-09T13:17:41.000Z | 2022-02-09T13:17:41.000Z | import os
from typing import Sequence, Union
import numpy as np
import tifffile
from deepcell.applications import Mesmer
from imctools.io.ometiff.ometiffparser import OmeTiffParser
from skimage import measure
from sqlalchemy.orm import Session
from histocat.core.acquisition import service as acquisition_service
from ... | 38.835052 | 105 | 0.723653 | 0 | 0 | 0 | 0 | 2,700 | 0.716751 | 0 | 0 | 376 | 0.099814 |
282c0f9d07c95149eb897900350f51bc9e832909 | 9,800 | py | Python | Fractals.py | do-it-for-coffee/fractals | 6050dc72ddeed45aefafed489e07a40ee8d8dc1d | [
"Apache-2.0"
] | null | null | null | Fractals.py | do-it-for-coffee/fractals | 6050dc72ddeed45aefafed489e07a40ee8d8dc1d | [
"Apache-2.0"
] | null | null | null | Fractals.py | do-it-for-coffee/fractals | 6050dc72ddeed45aefafed489e07a40ee8d8dc1d | [
"Apache-2.0"
] | null | null | null | import math
import numpy as np
import random
import os
from PIL import Image
import pyttsx3
class TopError(Exception):
pass
class OddResolutionError(Exception):
pass
class Fractal:
'''
Makes images of the Mandelbrot set given a center coordinate and the
imaginary coordinate of the top row of pi... | 35.507246 | 94 | 0.521429 | 9,665 | 0.986124 | 0 | 0 | 0 | 0 | 0 | 0 | 3,127 | 0.319049 |