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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
652e84bd8ad0187eda337ba399fb9e1a9cdb03eb | 377 | py | Python | setup.py | PaulDodd/pynomial | 8da81bf37ee96b8e3c49b40cdfcae075ba667632 | [
"Apache-2.0"
] | null | null | null | setup.py | PaulDodd/pynomial | 8da81bf37ee96b8e3c49b40cdfcae075ba667632 | [
"Apache-2.0"
] | null | null | null | setup.py | PaulDodd/pynomial | 8da81bf37ee96b8e3c49b40cdfcae075ba667632 | [
"Apache-2.0"
] | null | null | null | import sys
from setuptools import setup, find_packages
setup(
name='pynomial',
version='0.0.0',
packages=find_packages(),
author='Paul M Dodd',
author_email='[email protected]',
description="python package for combinatorial problems",
url="https://github.com/PaulDodd/pynomial.git",
instal... | 26.928571 | 64 | 0.70557 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.453581 |
652f515638fabbdc29fa03743668cd7f3bcdf458 | 830 | py | Python | src/seedbox/migrations/versions/35099fc974d2_.py | nailgun/seedbox | d124f71017dbbe5af81592e76933809b5cdddb08 | [
"Apache-2.0"
] | 29 | 2017-03-22T23:12:56.000Z | 2021-05-29T23:40:50.000Z | src/seedbox/migrations/versions/35099fc974d2_.py | macduff23/seedbox | d124f71017dbbe5af81592e76933809b5cdddb08 | [
"Apache-2.0"
] | 27 | 2017-04-10T14:00:11.000Z | 2017-12-01T06:56:15.000Z | src/seedbox/migrations/versions/35099fc974d2_.py | macduff23/seedbox | d124f71017dbbe5af81592e76933809b5cdddb08 | [
"Apache-2.0"
] | 6 | 2017-04-10T09:17:32.000Z | 2020-01-25T02:08:21.000Z | """empty message
Revision ID: 35099fc974d2
Revises: ae00e7974dca
Create Date: 2017-05-19 17:01:48.878196
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '35099fc974d2'
down_revision = 'ae00e7974dca'
branch_labels = None
depends_on = None
def upgrade():
op... | 28.62069 | 117 | 0.749398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 346 | 0.416867 |
6531c01cdf271608c3cf89baaec7f83d527a1013 | 658 | py | Python | searchNMin2.py | plguhur/random-sets | 8cd0d18816628909f304d839b1a7eed208dfb49f | [
"Apache-2.0"
] | null | null | null | searchNMin2.py | plguhur/random-sets | 8cd0d18816628909f304d839b1a7eed208dfb49f | [
"Apache-2.0"
] | null | null | null | searchNMin2.py | plguhur/random-sets | 8cd0d18816628909f304d839b1a7eed208dfb49f | [
"Apache-2.0"
] | null | null | null | from randomSets import *
import numpy as np
winners = [1,5,10]
candidates = range(100, 1100, 500)
Nmin = np.zeros((len(winners),len(candidates)))
for i in range(len(winners)):
for j in range(len(candidates)):
print("Nwinner: %i, Ncandidates: %i" % (winners[i], candidates[j]))
#alpha = findMinAlpha(... | 41.125 | 130 | 0.647416 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.317629 |
6532631e7c9cbad3268bcb207c447017749491f6 | 894 | py | Python | drs4Calibration/drs4Calibration_version_0/config.py | fact-project/DrsTemperatureCalibration | 3702ee390c16cf2c5930d4a0f24c1354d036d645 | [
"MIT"
] | null | null | null | drs4Calibration/drs4Calibration_version_0/config.py | fact-project/DrsTemperatureCalibration | 3702ee390c16cf2c5930d4a0f24c1354d036d645 | [
"MIT"
] | null | null | null | drs4Calibration/drs4Calibration_version_0/config.py | fact-project/DrsTemperatureCalibration | 3702ee390c16cf2c5930d4a0f24c1354d036d645 | [
"MIT"
] | null | null | null | from drs4Calibration.drs4Calibration_version_0.constants import NRCELL, ROI
# Dont shuffle drsValueTypes
# The order have to be the same as the of the 'RUNIDs'
# in the drsFiles
drsValueTypes = ['Baseline',
'Gain',
'TriggerOffset']
renamedDrsValueTypes = ['Baseline',
... | 31.928571 | 75 | 0.589485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 462 | 0.516779 |
653275e0a6bf64ffd7bef701a34270c76bd37631 | 1,854 | py | Python | clisk/player/player.py | etano/clisk | 70067eb98568a97d896ee486bae56b49c77bcb11 | [
"MIT"
] | null | null | null | clisk/player/player.py | etano/clisk | 70067eb98568a97d896ee486bae56b49c77bcb11 | [
"MIT"
] | null | null | null | clisk/player/player.py | etano/clisk | 70067eb98568a97d896ee486bae56b49c77bcb11 | [
"MIT"
] | null | null | null | class Player(object):
"""Player class
Attributes:
name (str): Player name
"""
def __init__(self, name):
"""Initialize player
Args:
name (str): Player name
"""
self.name = name
def place_troops(self, board, n_troops):
"""Plac... | 26.112676 | 95 | 0.553937 | 1,853 | 0.999461 | 0 | 0 | 0 | 0 | 0 | 0 | 1,355 | 0.730852 |
6532a25e13d94b833b61abb8bf5f04bc39b60efe | 91 | py | Python | bai03.py | trietto/python | b89b990fc509228445157465f6af3371c4b4d159 | [
"Apache-2.0"
] | null | null | null | bai03.py | trietto/python | b89b990fc509228445157465f6af3371c4b4d159 | [
"Apache-2.0"
] | null | null | null | bai03.py | trietto/python | b89b990fc509228445157465f6af3371c4b4d159 | [
"Apache-2.0"
] | null | null | null | n=int(input("Nhap vao mot so:"))
d=dict()
for i in range(1, n+1):
d[i]=i*i
print(d) | 18.2 | 32 | 0.549451 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.197802 |
653326363f171f61656c55ab1ac0a5e07a6afbd8 | 18,085 | pyw | Python | quizme.pyw | dmahugh/quizme | edd5340db4524855c7e0dea0340339dafb10a78a | [
"MIT"
] | null | null | null | quizme.pyw | dmahugh/quizme | edd5340db4524855c7e0dea0340339dafb10a78a | [
"MIT"
] | null | null | null | quizme.pyw | dmahugh/quizme | edd5340db4524855c7e0dea0340339dafb10a78a | [
"MIT"
] | null | null | null | """GUI for taking tests based on quizme-xxx.json files.
"""
import os
import sys
import json
from random import randint
import tkinter as tk
from tkinter import font
from tkinter import ttk
from tkinter import filedialog
from tkinter import messagebox
from widgetrefs import widgets
def center_window(window):
"""... | 38.397028 | 80 | 0.648825 | 4,728 | 0.261432 | 0 | 0 | 0 | 0 | 0 | 0 | 5,304 | 0.293282 |
6533cb2d911f06e68a721247deb37def17dac93b | 5,448 | py | Python | kedro/extras/datasets/pandas/appendable_excel_dataset.py | hfwittmann/kedro | b0d4fcd8f19b49a7916d78fd09daeb6209a7b6c6 | [
"Apache-2.0"
] | 1 | 2021-11-25T12:33:13.000Z | 2021-11-25T12:33:13.000Z | kedro/extras/datasets/pandas/appendable_excel_dataset.py | MerelTheisenQB/kedro | 1eaa2e0fa5d80f96e18ea60b9f3d6e6efc161827 | [
"Apache-2.0"
] | null | null | null | kedro/extras/datasets/pandas/appendable_excel_dataset.py | MerelTheisenQB/kedro | 1eaa2e0fa5d80f96e18ea60b9f3d6e6efc161827 | [
"Apache-2.0"
] | null | null | null | """``AppendableExcelDataSet`` loads/saves data from/to a local Excel file opened in append mode.
It uses pandas to handle the Excel file.
"""
from copy import deepcopy
from pathlib import Path, PurePosixPath
from typing import Any, Dict
import pandas as pd
from kedro.io.core import AbstractDataSet, DataSetError
cla... | 39.766423 | 101 | 0.612518 | 5,130 | 0.94163 | 0 | 0 | 0 | 0 | 0 | 0 | 3,703 | 0.679699 |
6534325409884c8b43e265c56070a9cc57567e0b | 42 | py | Python | examples/phobos/tests/test_std_system.py | kinke/autowrap | 2f042df3f292aa39b1da0b9607fbe3424f56ff4a | [
"BSD-3-Clause"
] | 47 | 2019-07-16T10:38:07.000Z | 2022-03-30T16:34:24.000Z | examples/phobos/tests/test_std_system.py | kinke/autowrap | 2f042df3f292aa39b1da0b9607fbe3424f56ff4a | [
"BSD-3-Clause"
] | 199 | 2019-06-17T23:24:40.000Z | 2021-06-16T16:41:36.000Z | examples/phobos/tests/test_std_system.py | kinke/autowrap | 2f042df3f292aa39b1da0b9607fbe3424f56ff4a | [
"BSD-3-Clause"
] | 7 | 2019-09-13T18:03:49.000Z | 2022-01-17T03:53:00.000Z | def test_import():
import std_system
| 10.5 | 21 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6534588d4ecf52898349353cb160282e5abd6d54 | 3,360 | py | Python | graalpython/benchmarks/src/meso/euler31.py | muellren/graalpython | 9104425805f1d38ad7a521c75e53798a3b79b4f0 | [
"UPL-1.0",
"Apache-2.0",
"OpenSSL"
] | 1 | 2019-05-28T13:04:32.000Z | 2019-05-28T13:04:32.000Z | graalpython/benchmarks/src/meso/euler31.py | muellren/graalpython | 9104425805f1d38ad7a521c75e53798a3b79b4f0 | [
"UPL-1.0",
"Apache-2.0",
"OpenSSL"
] | null | null | null | graalpython/benchmarks/src/meso/euler31.py | muellren/graalpython | 9104425805f1d38ad7a521c75e53798a3b79b4f0 | [
"UPL-1.0",
"Apache-2.0",
"OpenSSL"
] | null | null | null | #!/usr/bin/env python
# Copyright 2008-2010 Isaac Gouy
# Copyright (c) 2013, 2014, Regents of the University of California
# Copyright (c) 2017, 2018, Oracle and/or its affiliates.
# All rights reserved.
#
# Revised BSD license
#
# This is a specific instance of the Open Source Initiative (OSI) BSD license
# template h... | 34.639175 | 115 | 0.698214 | 0 | 0 | 376 | 0.111905 | 0 | 0 | 0 | 0 | 2,461 | 0.73244 |
65349ddf8e79064277992fac5e85fa136f547f1d | 3,150 | py | Python | comicMaker/readComicsOnlineRu.py | Gunjan933/comicMaker | 9e10f8bc7d1b9c9ad6af271ca7a01fb03b26c6ee | [
"MIT"
] | 3 | 2019-09-03T14:27:28.000Z | 2021-03-04T04:23:38.000Z | comicMaker/readComicsOnlineRu.py | Gunjan933/comicMaker | 9e10f8bc7d1b9c9ad6af271ca7a01fb03b26c6ee | [
"MIT"
] | null | null | null | comicMaker/readComicsOnlineRu.py | Gunjan933/comicMaker | 9e10f8bc7d1b9c9ad6af271ca7a01fb03b26c6ee | [
"MIT"
] | 2 | 2019-06-18T04:21:28.000Z | 2021-08-17T18:24:20.000Z | from .makeFullPdf import makeFullPdf
from .parseImage import parseImage
from .makePdf import makePdf
import requests,os,os.path,sys,time,json
from bs4 import BeautifulSoup
def readComicsOnlineRu():
while True:
try:
with open('config.json', 'r', encoding="utf-8") as f:
books = json.load(f)
library=[*books[... | 30.288462 | 99 | 0.668889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 905 | 0.287302 |
65351167928ce81c735f063228eadca0eb91e2b5 | 828 | py | Python | geoipgen/generate.py | christivn/INDES-devices-scan-engine | 5229ac68f0b075ffaba7641e5c8fb634d42d4915 | [
"MIT"
] | 2 | 2020-09-11T11:30:49.000Z | 2021-07-01T22:06:25.000Z | geoipgen/generate.py | christivn/INDES-devices-scan-engine | 5229ac68f0b075ffaba7641e5c8fb634d42d4915 | [
"MIT"
] | null | null | null | geoipgen/generate.py | christivn/INDES-devices-scan-engine | 5229ac68f0b075ffaba7641e5c8fb634d42d4915 | [
"MIT"
] | null | null | null | from . import subnetCal
from . import functions
from random import randint
def IP(cidr):
arr=subnetCal.simpleCalculate(cidr)
min_host=arr[3]
smin_host=min_host.split(".")
max_host=arr[4]
smax_host=max_host.split(".")
ip=""
for i in range(4):
if(smin_host[i]==smax_host[i]):
... | 23.657143 | 66 | 0.629227 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.044686 |
6536be01b7eb4b8a845b975aa35e3be000f854f3 | 1,182 | py | Python | lib/googlecloudsdk/command_lib/filestore/operations/flags.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/filestore/operations/flags.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/filestore/operations/flags.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 40.758621 | 141 | 0.716582 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,099 | 0.92978 |
65373505df666d8a906bfd1acd7f0539541bd3a0 | 940 | py | Python | model_agreement.py | ntunlp/coherence-paradigm | 7219fe5b57f5a44e780ca8ba5632194a68e07528 | [
"MIT"
] | null | null | null | model_agreement.py | ntunlp/coherence-paradigm | 7219fe5b57f5a44e780ca8ba5632194a68e07528 | [
"MIT"
] | null | null | null | model_agreement.py | ntunlp/coherence-paradigm | 7219fe5b57f5a44e780ca8ba5632194a68e07528 | [
"MIT"
] | null | null | null | import sys
import pickle
from krips_alpha import krippendorff_alpha, nominal_metric
def get_model_labels(model_output):
model_labels = []
for x in model_output:
try:
if x['pos_score'] > x['neg_score']:
model_labels.append('0')
elif x['neg_score'] > x['pos_score']:
model_labels.append('1')
else:
... | 24.102564 | 61 | 0.71383 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.146809 |
65380b922221efe3ab83a1ce124526460a9adeeb | 10,392 | py | Python | lewansoul-lx16a/lewansoul_lx16a.py | christophschnabl/lewansoul-lx16a | fc92dc3470bc12353576bae00f6bc0873c753a7a | [
"MIT"
] | 2 | 2019-10-22T10:37:56.000Z | 2020-01-19T20:43:45.000Z | lewansoul-lx16a/lewansoul_lx16a.py | christophschnabl/lewansoul-lx16a | fc92dc3470bc12353576bae00f6bc0873c753a7a | [
"MIT"
] | null | null | null | lewansoul-lx16a/lewansoul_lx16a.py | christophschnabl/lewansoul-lx16a | fc92dc3470bc12353576bae00f6bc0873c753a7a | [
"MIT"
] | 1 | 2022-01-05T08:20:38.000Z | 2022-01-05T08:20:38.000Z | __all__ = [
'ServoController',
'TimeoutError',
'SERVO_ERROR_OVER_TEMPERATURE',
'SERVO_ERROR_OVER_VOLTAGE',
'SERVO_ERROR_LOCKED_ROTOR',
]
from serial.serialutil import *
from functools import partial
import threading
import logging
SERVO_ID_ALL = 0xfe
SERVO_MOVE_TIME_WRITE = 1
SERVO_MOVE_TIME_R... | 32.373832 | 84 | 0.647998 | 8,949 | 0.861143 | 0 | 0 | 0 | 0 | 0 | 0 | 385 | 0.037048 |
653ce627115bca9b0a99c6fcb8f87bd198d5309b | 1,223 | py | Python | Basic Data Structures/string/leet_551_StudentAttendanceRecordI.py | rush2catch/algorithms-leetcode | 38a5e6aa33d48fa14fe09c50c28a2eaabd736e55 | [
"MIT"
] | null | null | null | Basic Data Structures/string/leet_551_StudentAttendanceRecordI.py | rush2catch/algorithms-leetcode | 38a5e6aa33d48fa14fe09c50c28a2eaabd736e55 | [
"MIT"
] | null | null | null | Basic Data Structures/string/leet_551_StudentAttendanceRecordI.py | rush2catch/algorithms-leetcode | 38a5e6aa33d48fa14fe09c50c28a2eaabd736e55 | [
"MIT"
] | null | null | null | # Problem: Student Attendance Record I
# Difficulty: Easy
# Category: String
# Leetcode 551: https://leetcode.com/problems/student-attendance-record-i/#/description
# Description:
"""
You are given a string representing an attendance record for a student.
The record only contains the following three characters:
'A' : ... | 23.519231 | 92 | 0.681112 | 364 | 0.297629 | 0 | 0 | 0 | 0 | 0 | 0 | 705 | 0.576451 |
653d695cd3021eadcb097d2dd9fa97ca942ec702 | 10,454 | py | Python | etc/check-python.py | maxzheng/auto-update | 7d9afa139f890ff9a6bbeb01549a311bdb5168d0 | [
"MIT"
] | 7 | 2018-08-22T21:03:54.000Z | 2022-02-04T20:31:20.000Z | etc/check-python.py | maxzheng/auto-update | 7d9afa139f890ff9a6bbeb01549a311bdb5168d0 | [
"MIT"
] | null | null | null | etc/check-python.py | maxzheng/auto-update | 7d9afa139f890ff9a6bbeb01549a311bdb5168d0 | [
"MIT"
] | 2 | 2019-04-24T20:49:01.000Z | 2019-10-30T17:45:19.000Z | #!/usr/bin/env python
import argparse
import os
import platform
import re
import shutil
import subprocess
import sys
SUPPORTED_VERSIONS = ('3.6', '3.7')
IS_DEBIAN = platform.system() == 'Linux' and os.path.exists('/etc/debian_version')
IS_OLD_UBUNTU = (IS_DEBIAN and os.path.exists('/etc/lsb-release')
... | 34.730897 | 117 | 0.583604 | 161 | 0.015401 | 0 | 0 | 0 | 0 | 0 | 0 | 3,215 | 0.307538 |
653e20753803cf3d8c774a1a90f5c5407a146bd4 | 3,463 | py | Python | pnet/measure.py | changshuowang/PersistenceNetwork | 519aa3b4a123091ae6cc3cf619182b5be54fcac3 | [
"ISC"
] | 1 | 2020-01-20T06:44:14.000Z | 2020-01-20T06:44:14.000Z | pnet/measure.py | changshuowang/PersistenceNetwork | 519aa3b4a123091ae6cc3cf619182b5be54fcac3 | [
"ISC"
] | null | null | null | pnet/measure.py | changshuowang/PersistenceNetwork | 519aa3b4a123091ae6cc3cf619182b5be54fcac3 | [
"ISC"
] | null | null | null | import numpy as np
from sklearn.metrics import average_precision_score as ap
from sklearn.metrics import roc_auc_score
"""
each row is an instance
each column is the prediction of a class
"""
def _score_to_rank(score_list):
rank_array = np.zeros([len(score_list)])
score_array = np.array(score_list)
idx_so... | 24.913669 | 74 | 0.636442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 905 | 0.261334 |
653e59fcbdd6ab10a8f9cfbeb5d59f5f53315a37 | 6,114 | py | Python | src/trainer/transformations.py | tiborkubik/Robust-Teeth-Detection-in-3D-Dental-Scans-by-Automated-Multi-View-Landmarking | c7d9fa29b3b94ea786da5f4ec11a11520c1b882a | [
"MIT"
] | 2 | 2022-02-20T23:45:47.000Z | 2022-03-14T07:36:53.000Z | src/trainer/transformations.py | tiborkubik/Robust-Teeth-Detection-in-3D-Dental-Scans-by-Automated-Multi-View-Landmarking | c7d9fa29b3b94ea786da5f4ec11a11520c1b882a | [
"MIT"
] | null | null | null | src/trainer/transformations.py | tiborkubik/Robust-Teeth-Detection-in-3D-Dental-Scans-by-Automated-Multi-View-Landmarking | c7d9fa29b3b94ea786da5f4ec11a11520c1b882a | [
"MIT"
] | null | null | null | """
:filename transformations.py
:author Tibor Kubik
:email [email protected]
from
Classes of custom transformations that are applied during the training as additional augmentation of the depth maps.
"""
import torch
import random
import numpy as np
import torch.nn.functional as F
from random... | 31.678756 | 129 | 0.596663 | 5,700 | 0.931982 | 0 | 0 | 300 | 0.049052 | 0 | 0 | 1,173 | 0.191792 |
653f3d126c9950c17fb6dd172757205541017a4a | 164 | py | Python | solutions/python3/1009.py | sm2774us/amazon_interview_prep_2021 | f580080e4a6b712b0b295bb429bf676eb15668de | [
"MIT"
] | 42 | 2020-08-02T07:03:49.000Z | 2022-03-26T07:50:15.000Z | solutions/python3/1009.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | null | null | null | solutions/python3/1009.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | 40 | 2020-02-08T02:50:24.000Z | 2022-03-26T15:38:10.000Z | class Solution:
def bitwiseComplement(self, N: int, M = 0, m = 0) -> int:
return N ^ M if M and M >= N else self.bitwiseComplement(N, M + 2 ** m, m + 1) | 54.666667 | 86 | 0.579268 | 164 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
653f571cf7026f415159e6338a4dc99110c41d1a | 5,691 | py | Python | cappuccino.py | y-tsutsu/cappuccino | 11212565c064a8e65f5858d2ea457b5cd0389799 | [
"MIT"
] | 1 | 2017-08-15T11:47:37.000Z | 2017-08-15T11:47:37.000Z | cappuccino.py | y-tsutsu/cappuccino | 11212565c064a8e65f5858d2ea457b5cd0389799 | [
"MIT"
] | 1 | 2021-06-02T10:32:27.000Z | 2021-06-02T10:32:27.000Z | cappuccino.py | y-tsutsu/cappuccino | 11212565c064a8e65f5858d2ea457b5cd0389799 | [
"MIT"
] | null | null | null | import random
import shutil
import sys
from argparse import ArgumentParser
from os import path
from pathlib import Path
from threading import Thread
from PySide6 import __version__ as PySideVer
from PySide6.QtCore import (Property, QCoreApplication, QObject, Qt, QTimer,
Signal, Slot)
from P... | 29.795812 | 102 | 0.692497 | 3,259 | 0.570453 | 0 | 0 | 1,486 | 0.260109 | 0 | 0 | 371 | 0.06494 |
654050d7cccb1b2c34b6283890ccaab142889563 | 48,459 | py | Python | lofti_gaia/lofti.py | logan-pearce/lofti_gaia | b88940553669a134a461bb052843afa0dad4d71f | [
"BSD-3-Clause"
] | 2 | 2020-05-06T07:39:56.000Z | 2020-07-23T16:39:55.000Z | lofti_gaia/lofti.py | logan-pearce/lofti_gaia | b88940553669a134a461bb052843afa0dad4d71f | [
"BSD-3-Clause"
] | null | null | null | lofti_gaia/lofti.py | logan-pearce/lofti_gaia | b88940553669a134a461bb052843afa0dad4d71f | [
"BSD-3-Clause"
] | 2 | 2020-07-25T15:43:52.000Z | 2021-05-18T20:20:55.000Z | import astropy.units as u
import numpy as np
from lofti_gaia.loftitools import *
from lofti_gaia.cFunctions import calcOFTI_C
#from loftitools import *
import pickle
import time
import matplotlib.pyplot as plt
# Astroquery throws some warnings we can ignore:
import warnings
warnings.filterwarnings("ignore")
'''This mo... | 49.650615 | 170 | 0.585278 | 47,896 | 0.988341 | 0 | 0 | 0 | 0 | 0 | 0 | 20,399 | 0.420936 |
65411b851445a48f4001d24e9d3426293a327569 | 243 | py | Python | src/data_curation/dataset_manager/views.py | NovaSBE-DSKC/retention-evaluation | 5b68b9282f0b5479a9dc5238faef68067c76b861 | [
"MIT"
] | null | null | null | src/data_curation/dataset_manager/views.py | NovaSBE-DSKC/retention-evaluation | 5b68b9282f0b5479a9dc5238faef68067c76b861 | [
"MIT"
] | null | null | null | src/data_curation/dataset_manager/views.py | NovaSBE-DSKC/retention-evaluation | 5b68b9282f0b5479a9dc5238faef68067c76b861 | [
"MIT"
] | null | null | null | from src.data_curation.dataset_manager import get_meta
import pandas as pd
def view_all():
return get_meta()
def get_docs(id):
df = get_meta()
docs = df[df["id"] == id]["docs"].iloc[0]
df = pd.read_json(docs)
return df
| 17.357143 | 54 | 0.654321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.041152 |
6541203743362ff0dff952a51d471197ab93e9cb | 109 | py | Python | deid/model/layers/__init__.py | KavishBhatia/deid-training-data | 9d586cd7f52d929b2571028365587d3f96e44caa | [
"MIT"
] | 15 | 2018-10-28T13:57:55.000Z | 2022-01-03T07:25:04.000Z | deid/model/layers/__init__.py | KavishBhatia/deid-training-data | 9d586cd7f52d929b2571028365587d3f96e44caa | [
"MIT"
] | 7 | 2019-04-29T13:55:52.000Z | 2021-12-13T19:51:30.000Z | deid/model/layers/__init__.py | KavishBhatia/deid-training-data | 9d586cd7f52d929b2571028365587d3f96e44caa | [
"MIT"
] | 3 | 2019-08-01T19:02:37.000Z | 2021-01-08T09:12:25.000Z | from .gradient_reversal import GradientReversal
from .noise import Noise, AdditiveNoise, MultiplicativeNoise
| 36.333333 | 60 | 0.87156 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
654539319f4d10a8899c207b7e590fdb33eef877 | 2,344 | py | Python | db_pool/mysql/base.py | GiftLee/devops | 1d63ee32c3e9519131bf5f6f2cda19675a1ca833 | [
"MIT"
] | 300 | 2019-07-30T03:01:29.000Z | 2022-03-14T05:51:41.000Z | db_pool/mysql/base.py | nice555/devops | fe09e6a3165d92dcd2dc67a0df3c2e47c6accc41 | [
"MIT"
] | 27 | 2019-11-04T08:41:52.000Z | 2021-09-27T07:51:41.000Z | db_pool/mysql/base.py | nice555/devops | fe09e6a3165d92dcd2dc67a0df3c2e47c6accc41 | [
"MIT"
] | 124 | 2019-08-21T03:32:15.000Z | 2022-03-14T05:51:43.000Z | # -*- coding: utf-8 -*-
"""
查看 django.db.backends.mysql.base.by 源码发现 django 连接 mysql 时没有使用连接池,
导致每次数据库操作都要新建新的连接并查询完后关闭,更坑的是按照 django 的官方文档设置
CONN_MAX_AGE 参数是为了复用连接,然后设置了 CONN_MAX_AGE 后,每个新连接查询完后并不
会 close 掉,而是一直在那占着。如果在高并发模式下,很容易出现 too many connections
错误。故重写 mysql 连接库,实现连接池功能。
"""
from django.core.exceptions import I... | 32.109589 | 95 | 0.677901 | 1,825 | 0.652252 | 0 | 0 | 0 | 0 | 0 | 0 | 980 | 0.35025 |
6546238c5cc99f6434344bc2dc8680356df8f817 | 34,758 | py | Python | flowsa/flowbyfunctions.py | modelearth/flowsa | d4dcf5ef8764b4ef895080a54d0546668daf0e1a | [
"CC0-1.0"
] | 13 | 2020-04-10T20:43:00.000Z | 2022-02-12T09:00:56.000Z | flowsa/flowbyfunctions.py | modelearth/flowsa | d4dcf5ef8764b4ef895080a54d0546668daf0e1a | [
"CC0-1.0"
] | 93 | 2020-03-05T14:22:42.000Z | 2022-03-30T20:33:06.000Z | flowsa/flowbyfunctions.py | modelearth/flowsa | d4dcf5ef8764b4ef895080a54d0546668daf0e1a | [
"CC0-1.0"
] | 16 | 2020-05-03T13:54:59.000Z | 2022-01-06T16:42:53.000Z | # flowbyfunctions.py (flowsa)
# !/usr/bin/env python3
# coding=utf-8
"""
Helper functions for flowbyactivity and flowbysector data
"""
import pandas as pd
import numpy as np
from esupy.dqi import get_weighted_average
import flowsa
from flowsa.common import fbs_activity_fields, US_FIPS, get_state_FIPS, \
get_county... | 46.97027 | 100 | 0.638328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14,751 | 0.424392 |
6547bff0921c0fa8bf1ae4180062d6c76818b672 | 3,553 | py | Python | stochastic_hill_climbing/src/AdalineSGD.py | Wookhwang/Machine-Learning | 8eaf8517057d4beb3272081cb2f2092687123f3d | [
"Apache-2.0"
] | null | null | null | stochastic_hill_climbing/src/AdalineSGD.py | Wookhwang/Machine-Learning | 8eaf8517057d4beb3272081cb2f2092687123f3d | [
"Apache-2.0"
] | 1 | 2020-01-19T10:14:41.000Z | 2020-01-19T10:14:41.000Z | stochastic_hill_climbing/src/AdalineSGD.py | Wookhwang/Machine-Learning | 8eaf8517057d4beb3272081cb2f2092687123f3d | [
"Apache-2.0"
] | null | null | null | import numpy as np
# gradient descent는 tensorflow에 이미 구현이 되어있다.
# 확률적 선형 뉴런 분석기는 각 훈련 샘플에 대해서 조금씩 가중치를 업데이트 한다.
class AdalineSGD(object):
"""Adaptive Linear Neuron 분류기
매개변수
------------
eta : float
학습률 (0.0과 1.0 사이)
n_iter : int
훈련 데이터셋 반복 횟수
shuffle : bool (default ... | 30.110169 | 77 | 0.509992 | 4,363 | 0.954078 | 0 | 0 | 0 | 0 | 0 | 0 | 2,504 | 0.547562 |
65489ab1059af5d3af74f3912af4a5da4c39124a | 383 | py | Python | las1.2.py | Theskill19/sweetpotato | 7cb46c412f400bcd51838db365038a766cf593cd | [
"CC0-1.0"
] | null | null | null | las1.2.py | Theskill19/sweetpotato | 7cb46c412f400bcd51838db365038a766cf593cd | [
"CC0-1.0"
] | null | null | null | las1.2.py | Theskill19/sweetpotato | 7cb46c412f400bcd51838db365038a766cf593cd | [
"CC0-1.0"
] | null | null | null | #2. Пользователь вводит время в секундах.
# Переведите время в часы, минуты и секунды и выведите в формате чч:мм:сс.
# Используйте форматирование строк.
time = int(input("Введите время в секундах "))
hours = time // 3600
minutes = (time - hours * 3600) // 60
seconds = time - (hours * 3600 + minutes * 60)
print... | 42.555556 | 75 | 0.681462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.738007 |
654ad9f66cc00d76dc7800cff09e9d14c95e20e3 | 2,259 | py | Python | tpdatasrc/tpgamefiles/rules/char_class/class020_archmage.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | null | null | null | tpdatasrc/tpgamefiles/rules/char_class/class020_archmage.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | null | null | null | tpdatasrc/tpgamefiles/rules/char_class/class020_archmage.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | null | null | null | from toee import *
import char_class_utils
###################################################
def GetConditionName():
return "Archmage"
def GetSpellCasterConditionName():
return "Archmage Spellcasting"
def GetCategory():
return "Core 3.5 Ed Prestige Classes"
def GetClassDefinitionFlags():
return CDF_CoreClass... | 20.916667 | 135 | 0.736609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 357 | 0.158035 |
654b5be42b94507090bb99be14ad14d6bad404c8 | 427 | py | Python | src/bananas/drf/errors.py | beshrkayali/django-bananas | 8e832ca91287c5b3eed5af8de948c67fd026c4b9 | [
"MIT"
] | 26 | 2015-04-07T12:18:26.000Z | 2021-07-23T18:05:52.000Z | src/bananas/drf/errors.py | beshrkayali/django-bananas | 8e832ca91287c5b3eed5af8de948c67fd026c4b9 | [
"MIT"
] | 55 | 2016-10-25T08:13:50.000Z | 2022-03-04T12:53:24.000Z | src/bananas/drf/errors.py | beshrkayali/django-bananas | 8e832ca91287c5b3eed5af8de948c67fd026c4b9 | [
"MIT"
] | 16 | 2015-10-13T10:11:59.000Z | 2021-11-11T12:30:32.000Z | from rest_framework import status
from rest_framework.exceptions import APIException
class PreconditionFailed(APIException):
status_code = status.HTTP_412_PRECONDITION_FAILED
default_detail = "An HTTP precondition failed"
default_code = "precondition_failed"
class BadRequest(APIException):
status_co... | 28.466667 | 53 | 0.800937 | 336 | 0.786885 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.192037 |
654c820b6644777c47304297e45e886b1326f0ee | 11,749 | py | Python | tools/train_net.py | luzhenyv/sesame | 5cef18c45192f7886b1c3c0096327e0095663adc | [
"Apache-2.0"
] | null | null | null | tools/train_net.py | luzhenyv/sesame | 5cef18c45192f7886b1c3c0096327e0095663adc | [
"Apache-2.0"
] | null | null | null | tools/train_net.py | luzhenyv/sesame | 5cef18c45192f7886b1c3c0096327e0095663adc | [
"Apache-2.0"
] | null | null | null | """Train a video classification"""
import torch
import sesame.models.losses as losses
import sesame.models.optimizer as optim
import sesame.utils.distributed as du
import sesame.utils.misc as misc
import sesame.utils.metrics as metrics
import sesame.utils.logger as logger
from sesame.datasets.mixup import MixUp
log ... | 35.929664 | 97 | 0.544302 | 0 | 0 | 0 | 0 | 4,796 | 0.408205 | 0 | 0 | 2,498 | 0.212614 |
e8da2871c87cf2076690059ef9b906d674072b5a | 846 | py | Python | setup.py | stshrive/pycense | 5bfd1b7b6b326a5592f58d621ee596c6c1d8a490 | [
"MIT"
] | null | null | null | setup.py | stshrive/pycense | 5bfd1b7b6b326a5592f58d621ee596c6c1d8a490 | [
"MIT"
] | 5 | 2018-09-15T23:40:11.000Z | 2018-10-05T22:57:13.000Z | setup.py | stshrive/pycense | 5bfd1b7b6b326a5592f58d621ee596c6c1d8a490 | [
"MIT"
] | 1 | 2018-10-04T23:43:42.000Z | 2018-10-04T23:43:42.000Z | import os
import setuptools
VERSION = "1.0.0a1+dev"
INSTALL_REQUIRES = [
'pip-licenses',
]
CLASSIFIERS = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research'
]
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).... | 24.171429 | 78 | 0.682033 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.43617 |
e8db35ba967d9e65ca9d8b55e48764bb1fce3b61 | 101 | py | Python | parents/admin.py | joseph0919/Student_Management_Django | 085e839a86ac574f5ebe83a4911c5808841f50cd | [
"MIT"
] | null | null | null | parents/admin.py | joseph0919/Student_Management_Django | 085e839a86ac574f5ebe83a4911c5808841f50cd | [
"MIT"
] | null | null | null | parents/admin.py | joseph0919/Student_Management_Django | 085e839a86ac574f5ebe83a4911c5808841f50cd | [
"MIT"
] | null | null | null | from django.contrib import admin
from parents.models import Guardian
admin.site.register(Guardian)
| 16.833333 | 35 | 0.831683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e8db7b8afe28efde2a5b3d53186f27fb42108a8d | 1,912 | py | Python | src/test/tests/hybrid/missingdata.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/hybrid/missingdata.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/hybrid/missingdata.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: missingdata.py
#
# Tests: missing data
#
# Programmer: Brad Whitlock
# Date: Thu Jan 19 09:49:15 PST 2012
#
# Modifications:
#
# ------------------------------------------------------------... | 26.555556 | 78 | 0.619247 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 845 | 0.441946 |
e8dc347e2e8914b12566e7ce88c38a00dd0fd08d | 540 | py | Python | data_input/__init__.py | uabalabadubdub/ppcd-pec4 | b9b1dfae84fd987c4e9b4ea09c0197ef746b30d7 | [
"CC0-1.0"
] | null | null | null | data_input/__init__.py | uabalabadubdub/ppcd-pec4 | b9b1dfae84fd987c4e9b4ea09c0197ef746b30d7 | [
"CC0-1.0"
] | null | null | null | data_input/__init__.py | uabalabadubdub/ppcd-pec4 | b9b1dfae84fd987c4e9b4ea09c0197ef746b30d7 | [
"CC0-1.0"
] | null | null | null | from pathlib import Path
current_path = Path(".")
datafolder = current_path / "data"
imagefolder = current_path / "images"
if not datafolder.exists():
print(f"Creating {datafolder}/...")
datafolder.mkdir()
if not imagefolder.exists():
print(f"Creating {imagefolder}/...")
imagefolder.mkdir()
print("S... | 24.545455 | 49 | 0.668519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.287037 |
e8dd9680732e2d43b71a4834c51c94a4f70393dd | 4,521 | py | Python | displacy_service_tests/test_server.py | mjfox3/spacy-api-docker | 8622ae1cc3e18835d4675432f9d286794dd380f5 | [
"MIT"
] | null | null | null | displacy_service_tests/test_server.py | mjfox3/spacy-api-docker | 8622ae1cc3e18835d4675432f9d286794dd380f5 | [
"MIT"
] | 1 | 2019-11-08T14:39:55.000Z | 2019-11-08T14:39:55.000Z | displacy_service_tests/test_server.py | mjfox3/spacy-api-docker | 8622ae1cc3e18835d4675432f9d286794dd380f5 | [
"MIT"
] | 1 | 2019-11-07T14:15:37.000Z | 2019-11-07T14:15:37.000Z | import falcon.testing
import pytest
import json
from displacy_service.server import APP, MODELS
model = MODELS[0]
@pytest.fixture()
def api():
return falcon.testing.TestClient(APP)
def test_deps(api):
result = api.simulate_post(
path='/dep',
body='{{"text": "This is a test.", "model": "{m... | 47.09375 | 211 | 0.523114 | 0 | 0 | 0 | 0 | 674 | 0.149082 | 0 | 0 | 2,138 | 0.472904 |
e8df842f0c6982487b7ca3ace562a894cc9d1940 | 606 | py | Python | exposures/generate_passwords.py | jarnoln/exposures | bbae3f79078048d25b77e178db6c0801ffe9f97e | [
"MIT"
] | null | null | null | exposures/generate_passwords.py | jarnoln/exposures | bbae3f79078048d25b77e178db6c0801ffe9f97e | [
"MIT"
] | null | null | null | exposures/generate_passwords.py | jarnoln/exposures | bbae3f79078048d25b77e178db6c0801ffe9f97e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import random
import argparse
def generate_passwords(password_file_path):
password_file = open(password_file_path, 'w')
chars = 'abcdefghijklmnopqrstuvxyz01234567890_-!*'
secret_key = ''.join(random.SystemRandom().choice(chars) for _ in range(50))
password_file.write("SECRET_KEY ... | 31.894737 | 88 | 0.737624 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.255776 |
e8e12c70a26b28e73712420fd03691434cb4267c | 13,354 | py | Python | adversarial-transfer-nlp/CW_attack.py | AI-secure/Uncovering-the-Connections-BetweenAdversarial-Transferability-and-Knowledge-Transferability | a2fb10f56618c6d6dd1638967d59c4a83ffa1c05 | [
"CC0-1.0"
] | 8 | 2021-06-18T10:32:27.000Z | 2022-01-16T06:46:25.000Z | adversarial-transfer-nlp/CW_attack.py | AI-secure/Does-Adversairal-Transferability-Indicate-Knowledge-Transferability | a2fb10f56618c6d6dd1638967d59c4a83ffa1c05 | [
"CC0-1.0"
] | 2 | 2021-08-25T15:14:12.000Z | 2022-02-09T23:55:46.000Z | adversarial-transfer-nlp/CW_attack.py | AI-secure/Does-Adversairal-Transferability-Indicate-Knowledge-Transferability | a2fb10f56618c6d6dd1638967d59c4a83ffa1c05 | [
"CC0-1.0"
] | null | null | null | import sys
import torch
import numpy as np
from torch import optim
from util import args
class CarliniL2:
def __init__(self, targeted=True, search_steps=None, max_steps=None, cuda=True, debug=False, num_classes=14):
self.debug = debug
self.targeted = targeted
self.num_classes = num_class... | 44.962963 | 126 | 0.543582 | 13,261 | 0.993036 | 0 | 0 | 0 | 0 | 0 | 0 | 2,242 | 0.16789 |
e8e227fac1aeb6cb15d17a60f96b91194af13f7f | 639 | py | Python | api/cueSearch/migrations/0005_searchcardtemplate_connectiontype.py | cuebook/CueSearch | 8bf047de273b27bba41b8bf4e266aac1eee7f81a | [
"Apache-2.0"
] | 3 | 2022-02-10T17:00:19.000Z | 2022-03-29T14:31:25.000Z | api/cueSearch/migrations/0005_searchcardtemplate_connectiontype.py | cuebook/CueSearch | 8bf047de273b27bba41b8bf4e266aac1eee7f81a | [
"Apache-2.0"
] | null | null | null | api/cueSearch/migrations/0005_searchcardtemplate_connectiontype.py | cuebook/CueSearch | 8bf047de273b27bba41b8bf4e266aac1eee7f81a | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.5 on 2022-02-18 08:20
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("dataset", "0001_initial"),
("cueSearch", "0004_auto_20220217_0217"),
]
operations = [
migrations.Ad... | 24.576923 | 61 | 0.57277 | 513 | 0.802817 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.259781 |
e8e29b7b8972a06149daa7c111affc519cbc1ff4 | 629 | py | Python | FormulaAccordingPrint.py | FreeBirdsCrew/Brainstorming_Codes | 9d06216cd0772ce56586acff2c240a210b94ba1f | [
"Apache-2.0"
] | 1 | 2020-12-11T10:24:08.000Z | 2020-12-11T10:24:08.000Z | FormulaAccordingPrint.py | FreeBirdsCrew/Brainstorming_Codes | 9d06216cd0772ce56586acff2c240a210b94ba1f | [
"Apache-2.0"
] | null | null | null | FormulaAccordingPrint.py | FreeBirdsCrew/Brainstorming_Codes | 9d06216cd0772ce56586acff2c240a210b94ba1f | [
"Apache-2.0"
] | null | null | null | """
Write a program that calculates and prints the value according to the given formula:
Q = Square root of [(2 * C * D)/H]
Following are the fixed values of C and H:
C is 50. H is 30.
D is the variable whose values should be input to your program in a comma-separated sequence.
Example
Let us assume the followin... | 28.590909 | 94 | 0.694754 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 449 | 0.713831 |
e8e2e1e3ca7f9bd9067ac2608c856319f1c4cab7 | 675 | py | Python | src/django_sys_indicator/utils.py | marksweb/django-sys-indicator | 7318a7df8a6cda613a999d1129d00a181403cbaf | [
"MIT"
] | 1 | 2022-02-12T15:33:53.000Z | 2022-02-12T15:33:53.000Z | src/django_sys_indicator/utils.py | marksweb/django-sys-indicator | 7318a7df8a6cda613a999d1129d00a181403cbaf | [
"MIT"
] | null | null | null | src/django_sys_indicator/utils.py | marksweb/django-sys-indicator | 7318a7df8a6cda613a999d1129d00a181403cbaf | [
"MIT"
] | null | null | null | from __future__ import annotations
from django.template.loader import render_to_string
from .conf import settings
def django_sys_indicator_tag() -> str:
template_name = 'django_sys_indicator/system_indicator.html'
try:
color, border_color = settings.SYSTEM_INDICATOR_COLORS[
settings.SYS... | 25.961538 | 69 | 0.668148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.148148 |
e8e431aaa0e0c0342df0906099d3bfe584c4dc40 | 262 | py | Python | MUNDO 1/ex023.py | athavus/Curso-em-video-Python-3 | a32be95adbccfcbe512a1ed30d3859141a230b5e | [
"MIT"
] | 1 | 2020-11-12T14:03:32.000Z | 2020-11-12T14:03:32.000Z | MUNDO 1/ex023.py | athavus/Curso-em-video-Python-3 | a32be95adbccfcbe512a1ed30d3859141a230b5e | [
"MIT"
] | null | null | null | MUNDO 1/ex023.py | athavus/Curso-em-video-Python-3 | a32be95adbccfcbe512a1ed30d3859141a230b5e | [
"MIT"
] | 1 | 2021-01-05T22:18:46.000Z | 2021-01-05T22:18:46.000Z | n1 = int(input('Digite um número entre 0 e 9999: '))
u = n1 // 1 % 10
d = n1 // 10 % 10
c = n1 // 100 % 10
m = n1 // 1000 % 10
print(f'Analisando o número {n1}')
print(f'unidade: {u}')
print(f'dezena: {d}')
print(f'centena: {c}')
print(f'milhar: {m}')
| 23.818182 | 53 | 0.549618 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.462121 |
e8e44f8a42a8c9211af1456c9b87394460144341 | 3,366 | py | Python | openapi_server/controllers/instance_metadata_controller.py | eugenegesdisc/gmuedr | e8b3e5c7b8d18421d875f0f6f778a37a6d8ec3fd | [
"MIT"
] | null | null | null | openapi_server/controllers/instance_metadata_controller.py | eugenegesdisc/gmuedr | e8b3e5c7b8d18421d875f0f6f778a37a6d8ec3fd | [
"MIT"
] | null | null | null | openapi_server/controllers/instance_metadata_controller.py | eugenegesdisc/gmuedr | e8b3e5c7b8d18421d875f0f6f778a37a6d8ec3fd | [
"MIT"
] | null | null | null | from typing import List, Dict
from aiohttp import web
from openapi_server.models.edr_feature_collection_geo_json import EdrFeatureCollectionGeoJSON
from openapi_server.models.exception import Exception
from openapi_server.models.one_ofobjectobject import OneOfobjectobject
from openapi_server import util
async def li... | 116.068966 | 1,557 | 0.778372 | 0 | 0 | 0 | 0 | 0 | 0 | 3,057 | 0.9082 | 2,872 | 0.853238 |
e8e693322ca4748ac11e7ad6f26ec9749c3ce95e | 904 | py | Python | Python Notebook/Python files/data_utility.py | wilfy9249/Capstone-Fall-18 | 832632eb00a10240e0ad16c364449d5020814c83 | [
"MIT"
] | 2 | 2018-10-24T21:32:17.000Z | 2019-02-19T21:15:29.000Z | Python Notebook/Python files/data_utility.py | wilfy9249/Capstone-Fall-18 | 832632eb00a10240e0ad16c364449d5020814c83 | [
"MIT"
] | null | null | null | Python Notebook/Python files/data_utility.py | wilfy9249/Capstone-Fall-18 | 832632eb00a10240e0ad16c364449d5020814c83 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
import os
# In[2]:
#function to get current directory
def getCurrentDirectory():
listDirectory = os.listdir('../')
return listDirectory
# In[3]:
#function to read csv file
def readCsvFile(path):
crimes_original =... | 14.580645 | 85 | 0.692478 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.255531 |
e8e88d99dce51ba1201b6f79edf2263f1faa8d1a | 125 | py | Python | microtbs_rl/algorithms/common/__init__.py | alex-petrenko/simple-reinforcement-learning | d0da1d9026d1f05e2552d08e56fbe58ad869fafd | [
"MIT"
] | 8 | 2018-03-05T05:13:39.000Z | 2021-02-27T03:12:05.000Z | microtbs_rl/algorithms/common/__init__.py | alex-petrenko/simple-reinforcement-learning | d0da1d9026d1f05e2552d08e56fbe58ad869fafd | [
"MIT"
] | null | null | null | microtbs_rl/algorithms/common/__init__.py | alex-petrenko/simple-reinforcement-learning | d0da1d9026d1f05e2552d08e56fbe58ad869fafd | [
"MIT"
] | 4 | 2018-09-04T04:44:26.000Z | 2021-07-22T06:34:51.000Z | from microtbs_rl.algorithms.common.agent import AgentLearner
from microtbs_rl.algorithms.common.loops import run_policy_loop
| 41.666667 | 63 | 0.888 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e8e961a8029a5dbe75bc908fc0b55465398ece35 | 806 | py | Python | retrieve/GetTotalEarnings.py | TRiCAM-Lab/task-effort | 69d072470359a20dfb3eb5df84bf1331a48e59f2 | [
"MIT"
] | null | null | null | retrieve/GetTotalEarnings.py | TRiCAM-Lab/task-effort | 69d072470359a20dfb3eb5df84bf1331a48e59f2 | [
"MIT"
] | 1 | 2022-03-25T19:16:43.000Z | 2022-03-25T19:16:43.000Z | retrieve/GetTotalEarnings.py | TRiCAM-Lab/task-effort | 69d072470359a20dfb3eb5df84bf1331a48e59f2 | [
"MIT"
] | null | null | null |
import sys
from collections.abc import Mapping
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
# Use a service account
cred = credentials.Certificate('./service-account-key.json')
firebase_admin.initialize_app(cred)
db = firestore.client()
for row in sys.stdin:
... | 24.424242 | 70 | 0.636476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 296 | 0.367246 |
e8eaacdbf20c0fc2ed919b5008d2aa81872089dc | 192 | py | Python | pyGAE/handlers/ManageSubscriptionHandler.py | analyticstraining/pycocms | 29d7c3eea9377495bcafd8b8c62016c21c1a74a7 | [
"MIT"
] | null | null | null | pyGAE/handlers/ManageSubscriptionHandler.py | analyticstraining/pycocms | 29d7c3eea9377495bcafd8b8c62016c21c1a74a7 | [
"MIT"
] | null | null | null | pyGAE/handlers/ManageSubscriptionHandler.py | analyticstraining/pycocms | 29d7c3eea9377495bcafd8b8c62016c21c1a74a7 | [
"MIT"
] | null | null | null | from BaseHandler import BaseHandler, user_required
class ManageSubscriptionHandler(BaseHandler):
@user_required
def get(self):
self.render_template('manage_subscription.html') | 32 | 56 | 0.786458 | 140 | 0.729167 | 0 | 0 | 90 | 0.46875 | 0 | 0 | 26 | 0.135417 |
e8ec71dfe68f78e0bbd64c46510e470c4242fa2e | 1,228 | py | Python | aiphysim/models/spacetime.py | perovai/deepkoopman | eb6de915f5ea1f20b47cb3a22a384f55c30f0558 | [
"MIT"
] | null | null | null | aiphysim/models/spacetime.py | perovai/deepkoopman | eb6de915f5ea1f20b47cb3a22a384f55c30f0558 | [
"MIT"
] | 10 | 2021-07-07T09:24:33.000Z | 2021-09-27T14:32:59.000Z | aiphysim/models/spacetime.py | perovai/deepkoopman | eb6de915f5ea1f20b47cb3a22a384f55c30f0558 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class SpaceTime(nn.Module):
def __init__(self, opts):
# TODO: Add things like no. of hidden layers to opts
pass
class LSTM(nn.Module):
# This class is largely derived from
# https://stackabuse.com/time-series-prediction-using-lstm-with-pytorch-in-python... | 34.111111 | 98 | 0.666124 | 1,187 | 0.966612 | 0 | 0 | 0 | 0 | 0 | 0 | 359 | 0.292345 |
e8ed02dac89d480ead9705b1ad919290dfc731c8 | 934 | py | Python | fabfile/text.py | nprapps/austin | 45237e878260678bbeb57801e798b89e67ad4e0b | [
"MIT"
] | 7 | 2015-01-26T16:02:49.000Z | 2015-04-01T12:37:52.000Z | fabfile/text.py | nprapps/austin | 45237e878260678bbeb57801e798b89e67ad4e0b | [
"MIT"
] | 272 | 2015-01-26T16:37:22.000Z | 2016-04-04T17:08:55.000Z | fabfile/text.py | nprapps/austin | 45237e878260678bbeb57801e798b89e67ad4e0b | [
"MIT"
] | 4 | 2015-03-05T00:38:17.000Z | 2021-02-23T10:26:28.000Z | #!/usr/bin/env python
"""
Commands related to syncing copytext from Google Docs.
"""
from fabric.api import task
from termcolor import colored
import app_config
from etc.gdocs import GoogleDoc
@task(default=True)
def update():
"""
Downloads a Google Doc as an Excel file.
"""
if app_config.COPY_GOOGL... | 24.578947 | 175 | 0.586724 | 0 | 0 | 0 | 0 | 735 | 0.786938 | 0 | 0 | 321 | 0.343683 |
e8ed68a76b6810bfc7416102a15fd740faaea0ec | 4,699 | py | Python | program.py | jaesik817/programmable-agents_tensorflow | b64d1774803c585e87aa9769beadde31e18f8ea4 | [
"MIT"
] | 39 | 2017-09-25T02:01:18.000Z | 2019-06-18T15:17:53.000Z | program.py | jsikyoon/programmable-agents_tensorflow | b64d1774803c585e87aa9769beadde31e18f8ea4 | [
"MIT"
] | 5 | 2017-09-22T00:40:09.000Z | 2018-05-07T15:11:11.000Z | program.py | jsikyoon/programmable-agents_tensorflow | b64d1774803c585e87aa9769beadde31e18f8ea4 | [
"MIT"
] | 10 | 2017-09-25T06:49:12.000Z | 2019-06-18T10:17:03.000Z | import tensorflow as tf
import numpy as np
import math
# Parameter
order_num=2;
class Program:
def __init__(self,sess,state_dim,obj_num,fea_size,Theta,program_order,postfix):
self.sess = sess;
self.state_dim = state_dim;
self.fea_size=fea_size;
self.obj_num=obj_num;
self.order_num=order_num;
... | 53.397727 | 262 | 0.668227 | 4,615 | 0.982124 | 0 | 0 | 0 | 0 | 0 | 0 | 2,624 | 0.558417 |
e8eead32e4d9ed6fcdbc15a39026a6dc60b3a888 | 3,161 | py | Python | ism_pkg/tools/opt_gaussian.py | endsley/stochastic_ISM | 6438eb17bd391e8698e989156acb9b786c8f7299 | [
"MIT"
] | 1 | 2021-11-04T06:30:22.000Z | 2021-11-04T06:30:22.000Z | ism_pkg/tools/opt_gaussian.py | endsley/stochastic_ISM | 6438eb17bd391e8698e989156acb9b786c8f7299 | [
"MIT"
] | null | null | null | ism_pkg/tools/opt_gaussian.py | endsley/stochastic_ISM | 6438eb17bd391e8698e989156acb9b786c8f7299 | [
"MIT"
] | 2 | 2021-11-04T06:30:24.000Z | 2022-02-07T02:04:14.000Z | #!/usr/bin/env python
import sys
import matplotlib
import numpy as np
import random
import itertools
import socket
import sklearn.metrics
from scipy.optimize import minimize
from scipy.optimize import Bounds
from sklearn import preprocessing
from sklearn.preprocessing import OneHotEncoder
from sklearn.utils.random im... | 25.288 | 127 | 0.660234 | 1,797 | 0.534662 | 0 | 0 | 0 | 0 | 0 | 0 | 460 | 0.136864 |
e8eedc51b24c6143d7853efa95a31479c5ffbbd9 | 2,645 | py | Python | tests/commands/test_generate.py | pedrovelho/camp | 98105c9054b8db3377cb6a06e7b5451b97c6c285 | [
"MIT"
] | null | null | null | tests/commands/test_generate.py | pedrovelho/camp | 98105c9054b8db3377cb6a06e7b5451b97c6c285 | [
"MIT"
] | null | null | null | tests/commands/test_generate.py | pedrovelho/camp | 98105c9054b8db3377cb6a06e7b5451b97c6c285 | [
"MIT"
] | 1 | 2019-02-05T08:49:41.000Z | 2019-02-05T08:49:41.000Z | #
# CAMP
#
# Copyright (C) 2017, 2018 SINTEF Digital
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
#
from unittest import TestCase
from camp.commands import Command, Generate
class DefaultValuesAreCorrect(TestCase... | 25.190476 | 63 | 0.689981 | 2,354 | 0.889981 | 0 | 0 | 0 | 0 | 0 | 0 | 409 | 0.154631 |
e8eedebb919e5d37cf8c9784ea6066d77842d262 | 4,757 | py | Python | create_cpu_config.py | ttungl/HeteroArchGen4M2S | 85752243dc38b3d44207b6b200d6ebc88c2be8ea | [
"MIT"
] | 5 | 2018-04-29T15:33:01.000Z | 2021-11-17T11:41:45.000Z | create_cpu_config.py | berwingan/HeteroArchGen4M2S | 4922711cdfe20d120dc525a6c7cb8cd2230cba09 | [
"MIT"
] | null | null | null | create_cpu_config.py | berwingan/HeteroArchGen4M2S | 4922711cdfe20d120dc525a6c7cb8cd2230cba09 | [
"MIT"
] | 7 | 2017-07-28T02:29:59.000Z | 2021-11-20T12:01:40.000Z | #!/usr/bin/env python
# ===========================================================================
# Copyright 2017 `Tung Thanh Le`
# Email: ttungl at gmail dot com
# Heterogeneous Architecture Configurations Generator for Multi2Sim simulator
# (aka, `HeteroArchGen4M2S`)
# `HeteroArchGen4M2S` is free software, which... | 41.008621 | 115 | 0.634433 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,268 | 0.686988 |
e8ef256cd90a45f756f9b6bac7615546b4352096 | 7,475 | py | Python | app/wall_e/models/canvas_api.py | dbwebb-se/umbridge | 76dd1a15f2f481c1fc3819990ab41e20ca65afe3 | [
"MIT"
] | null | null | null | app/wall_e/models/canvas_api.py | dbwebb-se/umbridge | 76dd1a15f2f481c1fc3819990ab41e20ca65afe3 | [
"MIT"
] | 12 | 2021-09-07T12:11:31.000Z | 2022-03-22T10:05:03.000Z | app/wall_e/models/canvas_api.py | dbwebb-se/umbridge | 76dd1a15f2f481c1fc3819990ab41e20ca65afe3 | [
"MIT"
] | null | null | null | """
"""
import os
from flask import current_app
from canvasapi import submission, requester
from app.wall_e.models.requester import Requester
from app.settings import settings
class Canvas(Requester):
"""
Model class for wall_e.fetch
"""
def __init__(self, base_url, api_token, course_id, course_name)... | 34.447005 | 147 | 0.597458 | 7,328 | 0.975766 | 0 | 0 | 0 | 0 | 0 | 0 | 3,242 | 0.431691 |
e8f09f4acc1e578e6bbb291e4f8a3a87b3a0b297 | 908 | py | Python | chat/views.py | xiaoqiao99/chat | ca65ed25fbc277828390b890a50ecadf4675cfb4 | [
"MIT"
] | 2 | 2019-06-21T10:30:18.000Z | 2019-07-12T07:46:25.000Z | chat/views.py | xiaoqiao99/chat | ca65ed25fbc277828390b890a50ecadf4675cfb4 | [
"MIT"
] | 8 | 2020-06-05T19:56:53.000Z | 2022-03-11T23:41:44.000Z | chat/views.py | xiaoqiao99/chat | ca65ed25fbc277828390b890a50ecadf4675cfb4 | [
"MIT"
] | 3 | 2020-03-13T03:22:40.000Z | 2020-07-03T03:03:02.000Z | from django.shortcuts import render
# Create your views here.
# chat/views.py
from django.shortcuts import render
from django.utils.safestring import mark_safe
import json
from chat.models import Room
def index(request):
# from channels.layers import get_channel_layer
# from asgiref.sync import async_to_sync
... | 27.515152 | 93 | 0.654185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 511 | 0.536765 |
e8f180504d0fc36abc7d16119e4914419e1e1ee4 | 806 | py | Python | src/app/db.py | jorwalk/fastapi-crud-async | 000705ac977673d316a5fac2ce98adac23768b6e | [
"MIT"
] | null | null | null | src/app/db.py | jorwalk/fastapi-crud-async | 000705ac977673d316a5fac2ce98adac23768b6e | [
"MIT"
] | null | null | null | src/app/db.py | jorwalk/fastapi-crud-async | 000705ac977673d316a5fac2ce98adac23768b6e | [
"MIT"
] | null | null | null | import os
from sqlalchemy import (Column, DateTime, Integer, MetaData, String, Text, Table,
create_engine)
from sqlalchemy.sql import func
from databases import Database
DATABASE_URL = os.getenv("DATABASE_URL")
# SQLAlchemy
engine = create_engine(DATABASE_URL)
metadata = MetaData()
movies =... | 26 | 81 | 0.672457 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.193548 |
e8f1a3ca50bcfed7f7af218f87aa8a2b2ac30b0f | 3,224 | py | Python | python/greshunkel.py | qpfiffer/38-Moths | e7985b3ee655bca965c37b8fefde6c6ad70fdd4f | [
"MIT"
] | 14 | 2015-02-23T07:16:36.000Z | 2021-05-05T11:49:57.000Z | python/greshunkel.py | qpfiffer/futility | e7985b3ee655bca965c37b8fefde6c6ad70fdd4f | [
"MIT"
] | 19 | 2015-03-21T22:14:28.000Z | 2017-01-25T17:07:21.000Z | python/greshunkel.py | qpfiffer/futility | e7985b3ee655bca965c37b8fefde6c6ad70fdd4f | [
"MIT"
] | 3 | 2015-02-23T07:17:08.000Z | 2015-03-23T18:05:34.000Z | from ctypes import cdll, c_char_p, c_size_t, c_void_p, Union,\
LittleEndianStructure, c_char, POINTER,\
c_int, byref, CFUNCTYPE, create_string_buffer
class greshunkel_var(Union):
_fields_ = [
("str", c_char * 513),
("arr", c_void_p),
("sub_c... | 45.408451 | 109 | 0.715261 | 729 | 0.226117 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.049938 |
e8f205c39839ed18e131eea74299ddd64618a420 | 11,443 | py | Python | objects/paginators.py | fossabot/KiwiBot | cd077ce742775ed69ea7a14796c967ed878e1abc | [
"MIT"
] | null | null | null | objects/paginators.py | fossabot/KiwiBot | cd077ce742775ed69ea7a14796c967ed878e1abc | [
"MIT"
] | null | null | null | objects/paginators.py | fossabot/KiwiBot | cd077ce742775ed69ea7a14796c967ed878e1abc | [
"MIT"
] | null | null | null | from collections import OrderedDict
from asyncio import TimeoutError, wait
from concurrent.futures import FIRST_COMPLETED
import time
from discord import TextChannel, DMChannel
from discord.errors import Forbidden, NotFound
from objects.context import Context
class PaginatorABC:
def __init__(self, bot, looped... | 31.874652 | 131 | 0.589094 | 11,182 | 0.976082 | 0 | 0 | 0 | 0 | 8,562 | 0.747381 | 1,159 | 0.10117 |
e8f4043d5536bdca2c37406c6cd15241be633a78 | 21,362 | py | Python | tests/test_managedblockchain/test_managedblockchain_proposalvotes.py | junelife/moto | e61d794cbc9c18b06c11014da666e25f3fce637b | [
"Apache-2.0"
] | 1 | 2021-12-12T04:23:06.000Z | 2021-12-12T04:23:06.000Z | tests/test_managedblockchain/test_managedblockchain_proposalvotes.py | junelife/moto | e61d794cbc9c18b06c11014da666e25f3fce637b | [
"Apache-2.0"
] | 2 | 2018-08-07T10:47:18.000Z | 2018-08-08T15:13:04.000Z | tests/test_managedblockchain/test_managedblockchain_proposalvotes.py | junelife/moto | e61d794cbc9c18b06c11014da666e25f3fce637b | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import os
import boto3
import sure # noqa
from freezegun import freeze_time
from unittest import SkipTest
from moto import mock_managedblockchain, settings
from . import helpers
@mock_managedblockchain
def test_vote_on_proposal_one_member_total_yes():
conn = boto3.clien... | 31.836066 | 87 | 0.679805 | 0 | 0 | 0 | 0 | 21,101 | 0.987782 | 0 | 0 | 4,962 | 0.232282 |
e8f4751164f0af5c0a64d647c72d41648acdaa32 | 752 | py | Python | docs/Others/Python_leetcode/Codes/1.Two_Sum.py | mheanng/PythonNote | e3e5ede07968fab0a45f6ac4db96e62092c17026 | [
"Apache-2.0"
] | 2 | 2020-04-09T05:56:23.000Z | 2021-03-25T18:42:36.000Z | docs/Others/Python_leetcode/Codes/1.Two_Sum.py | mheanng/PythonNote | e3e5ede07968fab0a45f6ac4db96e62092c17026 | [
"Apache-2.0"
] | 22 | 2020-04-09T06:09:14.000Z | 2021-01-06T01:05:32.000Z | docs/Others/Python_leetcode/Codes/1.Two_Sum.py | mheanng/PythonNote | e3e5ede07968fab0a45f6ac4db96e62092c17026 | [
"Apache-2.0"
] | 6 | 2020-03-09T07:19:21.000Z | 2021-01-05T23:23:42.000Z | """
给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。
你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。
示例:
给定 nums = [2, 7, 11, 15], target = 9
因为 nums[0] + nums[1] = 2 + 7 = 9
所以返回 [0, 1]
"""
# %%
class Solution:
def twoSum(self, nums, target):
S = set(nums)
for num in S:
pre = ... | 22.117647 | 66 | 0.542553 | 395 | 0.417107 | 0 | 0 | 0 | 0 | 0 | 0 | 396 | 0.418163 |
e8f4b23ed19c18a99bdef84f2585aee923db8769 | 3,306 | py | Python | pyathena/util/rebin.py | changgoo/pyathena-1 | c461ac3390d773537ce52393e3ebf68a3282aa46 | [
"MIT"
] | 1 | 2019-10-03T13:59:14.000Z | 2019-10-03T13:59:14.000Z | pyathena/util/rebin.py | changgoo/pyathena-1 | c461ac3390d773537ce52393e3ebf68a3282aa46 | [
"MIT"
] | 3 | 2020-09-23T23:36:17.000Z | 2022-01-11T06:16:56.000Z | pyathena/util/rebin.py | changgoo/pyathena-1 | c461ac3390d773537ce52393e3ebf68a3282aa46 | [
"MIT"
] | 2 | 2019-06-10T04:26:16.000Z | 2019-12-04T22:27:02.000Z | from __future__ import print_function
import numpy as np
def rebin_xyz(arr, bin_factor, fill_value=None):
"""
Function to rebin masked 3d array.
Parameters
----------
arr : ndarray
Masked or unmasked 3d numpy array. Shape is assumed to be (nz, ny, nx).
bin_factor : int
bin... | 28.747826 | 109 | 0.578947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,686 | 0.509982 |
e8f589ed3e76934af8053deea1546715e9acd247 | 9,095 | py | Python | fn_utilities/fn_utilities/components/utilities_shell_command.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | 1 | 2020-08-25T03:43:07.000Z | 2020-08-25T03:43:07.000Z | fn_utilities/fn_utilities/components/utilities_shell_command.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | 1 | 2019-07-08T16:57:48.000Z | 2019-07-08T16:57:48.000Z | fn_utilities/fn_utilities/components/utilities_shell_command.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# (c) Copyright IBM Corp. 2018. All Rights Reserved.
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation"""
import os
import logging
import time
import shlex
import subprocess
import json
import chardet
import winrm
import re
from resilient_circuits import Resilien... | 45.934343 | 119 | 0.534469 | 8,639 | 0.949863 | 8,092 | 0.88972 | 8,305 | 0.913139 | 0 | 0 | 2,417 | 0.26575 |
e8f5e5aaaf237abae1b7ee4f6b5a71282972a181 | 428 | py | Python | snapmerge/home/migrations/0010_project_email.py | R4356th/smerge | 2f2a6a4acfe3903ed4f71d90537f7277248e8b59 | [
"MIT"
] | 13 | 2018-07-16T09:59:55.000Z | 2022-01-27T19:07:17.000Z | snapmerge/home/migrations/0010_project_email.py | R4356th/smerge | 2f2a6a4acfe3903ed4f71d90537f7277248e8b59 | [
"MIT"
] | 55 | 2018-07-16T12:17:58.000Z | 2022-03-17T16:10:30.000Z | snapmerge/home/migrations/0010_project_email.py | R4356th/smerge | 2f2a6a4acfe3903ed4f71d90537f7277248e8b59 | [
"MIT"
] | 4 | 2019-10-10T20:16:49.000Z | 2021-03-12T07:15:50.000Z | # Generated by Django 2.0.1 on 2018-07-26 12:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0009_auto_20180726_1214'),
]
operations = [
migrations.AddField(
model_name='project',
name='email',
... | 22.526316 | 97 | 0.61215 | 335 | 0.78271 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.235981 |
e8f70cb35f8f35780ab43f567c03a983bf3f8b23 | 5,512 | py | Python | othello.py | edjacob25/Intelligent-Systems | ae24c7e1039c98cd2940a5a813aae27fabadb99f | [
"MIT"
] | null | null | null | othello.py | edjacob25/Intelligent-Systems | ae24c7e1039c98cd2940a5a813aae27fabadb99f | [
"MIT"
] | null | null | null | othello.py | edjacob25/Intelligent-Systems | ae24c7e1039c98cd2940a5a813aae27fabadb99f | [
"MIT"
] | null | null | null | from games import (GameState, Game, query_player, random_player,
alphabeta_player, play_game, minimax_decision,
alphabeta_full_search, alphabeta_search)
class Othello(Game):
"""Juega Othello en un tablero 8 x 8, con Max (primer jugador) jugando con
las fichas negras.... | 40.529412 | 80 | 0.502903 | 5,314 | 0.962681 | 0 | 0 | 0 | 0 | 0 | 0 | 1,321 | 0.239312 |
e8fb499b8bff3a7d1f52fd19a5495fe47b6684e5 | 2,165 | py | Python | bot/lib/controller/GetCommentTask.py | nullwriter/ig-actor | a089107657ccdf11ba213160c4cc5d3690cecd76 | [
"MIT"
] | null | null | null | bot/lib/controller/GetCommentTask.py | nullwriter/ig-actor | a089107657ccdf11ba213160c4cc5d3690cecd76 | [
"MIT"
] | null | null | null | bot/lib/controller/GetCommentTask.py | nullwriter/ig-actor | a089107657ccdf11ba213160c4cc5d3690cecd76 | [
"MIT"
] | null | null | null | import time
import re
from FileLogger import FileLogger as FL
import datetime
class GetCommentTask:
def __init__(self, task, name="extract-comment"):
self.task = task
self.name = name
self.comments = []
self.log = FL('Extracted Comments {:%Y-%m-%d %H:%M:%S}.txt'.format(datetime.da... | 28.116883 | 100 | 0.525635 | 2,083 | 0.962125 | 0 | 0 | 0 | 0 | 0 | 0 | 405 | 0.187067 |
e8fc53ef376367f7c8b17273ac9b30e8bcf26788 | 4,981 | py | Python | scripts/mc_counting_same_origin.py | jonassagild/Track-to-Track-Fusion | 6bb7fbe6a6e2d9a2713c47f211899226485eee79 | [
"MIT"
] | 4 | 2021-06-16T19:33:56.000Z | 2022-03-14T06:47:41.000Z | scripts/mc_counting_same_origin.py | jonassagild/Track-to-Track-Fusion | 6bb7fbe6a6e2d9a2713c47f211899226485eee79 | [
"MIT"
] | 2 | 2021-06-08T16:18:45.000Z | 2021-11-25T09:38:08.000Z | scripts/mc_counting_same_origin.py | jonassagild/Track-to-Track-Fusion | 6bb7fbe6a6e2d9a2713c47f211899226485eee79 | [
"MIT"
] | 4 | 2020-09-28T04:54:17.000Z | 2021-10-15T15:58:38.000Z | """
script to run mc sims on the three associations techniques when the tracks origin are equal. Used to calculate the
total number of correctly associating tracks and total # falsly not associating tracks from the same target.
"""
import numpy as np
from stonesoup.types.state import GaussianState
from data_associati... | 49.81 | 116 | 0.682995 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,295 | 0.259988 |
e8fc72a77fdd416f9afae8ddad6132491cc5fabf | 4,405 | py | Python | c4/system/history.py | Brewgarten/c4-system-manager | 6fdec33ced4b1cb32d82a24cd168447a899b7e10 | [
"MIT"
] | null | null | null | c4/system/history.py | Brewgarten/c4-system-manager | 6fdec33ced4b1cb32d82a24cd168447a899b7e10 | [
"MIT"
] | 1 | 2017-10-17T21:51:40.000Z | 2017-10-17T21:51:40.000Z | c4/system/history.py | Brewgarten/c4-system-manager | 6fdec33ced4b1cb32d82a24cd168447a899b7e10 | [
"MIT"
] | null | null | null | """
Copyright (c) IBM 2015-2017. All Rights Reserved.
Project name: c4-system-manager
This project is licensed under the MIT License, see LICENSE
"""
from abc import ABCMeta, abstractmethod
class DeviceHistory(object):
"""
Device manager history
"""
__metaclass__ = ABCMeta
@abstractmethod
def... | 26.065089 | 90 | 0.595687 | 4,208 | 0.955278 | 0 | 0 | 3,568 | 0.809989 | 0 | 0 | 3,444 | 0.781839 |
e8fe259271609942f6b02a56e3c6e11a5d2eed49 | 1,060 | py | Python | Modules/Helpers/Bomb/SerialNumber.py | cweeks12/KTANE-Solver | b162bd107c0ac90a892659461819214772a04f9d | [
"MIT"
] | null | null | null | Modules/Helpers/Bomb/SerialNumber.py | cweeks12/KTANE-Solver | b162bd107c0ac90a892659461819214772a04f9d | [
"MIT"
] | null | null | null | Modules/Helpers/Bomb/SerialNumber.py | cweeks12/KTANE-Solver | b162bd107c0ac90a892659461819214772a04f9d | [
"MIT"
] | null | null | null | class SerialNumber:
def __init__(self, serialNumber):
if not (len(serialNumber) == 6):
raise ValueError('Serial Number must be 6 digits long')
self._serialNumber = serialNumber
def __str__(self):
return 'S/N: {}'.format(self._serialNumber)
def __repr__(self):
... | 27.894737 | 68 | 0.565094 | 1,058 | 0.998113 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.074528 |
e8ff4205f8efbe6454dce1e931b810fa2782cb7c | 5,876 | py | Python | zkfarmer/utils.py | artarik/zkfarmer | e1297bd27347ac8a5333b4b10aaae3868f457222 | [
"MIT"
] | null | null | null | zkfarmer/utils.py | artarik/zkfarmer | e1297bd27347ac8a5333b4b10aaae3868f457222 | [
"MIT"
] | null | null | null | zkfarmer/utils.py | artarik/zkfarmer | e1297bd27347ac8a5333b4b10aaae3868f457222 | [
"MIT"
] | null | null | null | import json
import operator
import logging
import re
import time
from socket import socket, AF_INET, SOCK_DGRAM
from functools import reduce
logger = logging.getLogger(__name__)
def ip():
"""Find default IP"""
ip = None
s = socket(AF_INET, SOCK_DGRAM)
try:
s.connect(('239.255.0.0', 9))
... | 31.934783 | 96 | 0.536079 | 2,257 | 0.384105 | 0 | 0 | 120 | 0.020422 | 0 | 0 | 704 | 0.119809 |
e8ff9e109d1e3411f4ef5d970014c1908546fefe | 6,168 | py | Python | support/update_dht_servers.py | sonofmom/ton-zabbix-scripts | b43471d058873c5ba78a92fa79d334380df5f6fc | [
"MIT"
] | null | null | null | support/update_dht_servers.py | sonofmom/ton-zabbix-scripts | b43471d058873c5ba78a92fa79d334380df5f6fc | [
"MIT"
] | null | null | null | support/update_dht_servers.py | sonofmom/ton-zabbix-scripts | b43471d058873c5ba78a92fa79d334380df5f6fc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
import argparse
import Libraries.arguments as ar
import Libraries.tools.general as gt
import Libraries.tools.zabbix as zt
import Classes.AppConfig as AppConfig
import requests
import copy
def r... | 35.245714 | 148 | 0.50989 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,710 | 0.277237 |
330000bbbc4cd1509f76a97c2471648387f8c603 | 332 | py | Python | src/data/dbConnection.py | leonardoleyva/api-agenda-uas | 697740a0a3feebb2ada01133db020fcf5127e1de | [
"MIT"
] | 1 | 2022-03-13T02:28:29.000Z | 2022-03-13T02:28:29.000Z | src/data/dbConnection.py | leonardoleyva/api-agenda-uas | 697740a0a3feebb2ada01133db020fcf5127e1de | [
"MIT"
] | null | null | null | src/data/dbConnection.py | leonardoleyva/api-agenda-uas | 697740a0a3feebb2ada01133db020fcf5127e1de | [
"MIT"
] | null | null | null | from firebase_admin import firestore
from google.cloud.firestore_v1.base_client import BaseClient
from ..core.app import App
class DBConnection(App):
def __init__(self) -> None:
super().__init__()
self.__db: BaseClient = firestore.client()
def getDBInstance(self) -> BaseClient:
retur... | 23.714286 | 60 | 0.710843 | 203 | 0.611446 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3300e6cf675f4b79e58bd1692aff8eee2b9eee77 | 124 | py | Python | math/PowerModPower.py | silvioedu/HackerRank-Python-Practice | e31ebe49d431c0a23fed0cd67a6984e2b0b7a260 | [
"MIT"
] | null | null | null | math/PowerModPower.py | silvioedu/HackerRank-Python-Practice | e31ebe49d431c0a23fed0cd67a6984e2b0b7a260 | [
"MIT"
] | null | null | null | math/PowerModPower.py | silvioedu/HackerRank-Python-Practice | e31ebe49d431c0a23fed0cd67a6984e2b0b7a260 | [
"MIT"
] | null | null | null | if __name__ == '__main__':
a, b, m = int(input()),int(input()),int(input())
print(pow(a,b))
print(pow(a,b,m)) | 31 | 53 | 0.532258 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.080645 |
3301f92fef2ea95eab5a3e90a808b11c54276e49 | 273 | py | Python | test_autolens/integration/tests/imaging/lens_only/mock_nlo/lens_light__hyper_bg_noise.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | 1 | 2020-04-06T20:07:56.000Z | 2020-04-06T20:07:56.000Z | test_autolens/integration/tests/imaging/lens_only/mock_nlo/lens_light__hyper_bg_noise.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | null | null | null | test_autolens/integration/tests/imaging/lens_only/mock_nlo/lens_light__hyper_bg_noise.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | null | null | null | from test_autolens.integration.tests.imaging.lens_only import lens_light__hyper_bg_noise
from test_autolens.integration.tests.imaging.runner import run_a_mock
class TestCase:
def _test__lens_light__hyper_bg_noise(self):
run_a_mock(lens_light__hyper_bg_noise)
| 34.125 | 88 | 0.849817 | 111 | 0.406593 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
33026e3d3385ab0a61779b22eebf7f1ae1b53d97 | 3,047 | py | Python | pyleecan/Methods/Slot/HoleM51/_comp_point_coordinate.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 95 | 2019-01-23T04:19:45.000Z | 2022-03-17T18:22:10.000Z | pyleecan/Methods/Slot/HoleM51/_comp_point_coordinate.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 366 | 2019-02-20T07:15:08.000Z | 2022-03-31T13:37:23.000Z | pyleecan/Methods/Slot/HoleM51/_comp_point_coordinate.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 74 | 2019-01-24T01:47:31.000Z | 2022-02-25T05:44:42.000Z | from numpy import exp, pi, cos, sin, tan
from ....Functions.Geometry.inter_line_circle import inter_line_circle
def _comp_point_coordinate(self):
"""Compute the point coordinates needed to plot the Slot.
Parameters
----------
self : HoleM51
A HoleM51 object
Returns
-------
point_... | 31.091837 | 81 | 0.535609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 678 | 0.222514 |
3302f95944549893e6c718830b8f06c614895c10 | 8,700 | py | Python | Python/cs611python.py | david145/CS6112018 | 7a74c239bf5157507594157b5871c9d0c70fcc23 | [
"MIT"
] | null | null | null | Python/cs611python.py | david145/CS6112018 | 7a74c239bf5157507594157b5871c9d0c70fcc23 | [
"MIT"
] | 1 | 2018-10-29T17:41:08.000Z | 2018-10-29T17:41:08.000Z | Python/cs611python.py | david145/CS6112018 | 7a74c239bf5157507594157b5871c9d0c70fcc23 | [
"MIT"
] | null | null | null | print("\n")
print("PythonExercises-v2 by David Bochan")
print("\n")
print("=== EXERCISE 1 ===")
print("\n")
print("(a) 5 / 3 = " + str(5 / 3))
print("=> with python3 you can receive a float even if you divide two \
integers")
print("\n")
print("(b) 5 % 3 = " + str(5 % 3))
print("=> % is the modulus which divides lef... | 23.138298 | 79 | 0.608046 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,031 | 0.463333 |
33030065b5b2083f8a15967babebd9c665e0b507 | 5,774 | py | Python | src/usgsgeomag.py | jake9wi/spaceweather | a0e08033c3dc34835f8d5d46c6263b5f4b5f0877 | [
"MIT"
] | null | null | null | src/usgsgeomag.py | jake9wi/spaceweather | a0e08033c3dc34835f8d5d46c6263b5f4b5f0877 | [
"MIT"
] | null | null | null | src/usgsgeomag.py | jake9wi/spaceweather | a0e08033c3dc34835f8d5d46c6263b5f4b5f0877 | [
"MIT"
] | null | null | null | """Plot USGS geomag data."""
import argparse
import pathlib as pl
import datetime as dt
import matplotlib; matplotlib.use('cairo')
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import matplotlib.ticker as mticker
import requests
import pandas as pd
import funcs
funcs.check_cwd(pl.Path.cwd())
DTG_F... | 20.621429 | 72 | 0.574991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,222 | 0.211638 |
3304cda4bb7181483694fd293ce4ad5249b9bc1e | 2,178 | py | Python | checkov/terraform/checks/resource/kubernetes/PodSecurityContext.py | pmalkki/checkov | b6cdf386dd976fe27c16fed6d550756a678a5d7b | [
"Apache-2.0"
] | null | null | null | checkov/terraform/checks/resource/kubernetes/PodSecurityContext.py | pmalkki/checkov | b6cdf386dd976fe27c16fed6d550756a678a5d7b | [
"Apache-2.0"
] | null | null | null | checkov/terraform/checks/resource/kubernetes/PodSecurityContext.py | pmalkki/checkov | b6cdf386dd976fe27c16fed6d550756a678a5d7b | [
"Apache-2.0"
] | null | null | null | from checkov.common.models.enums import CheckCategories, CheckResult
from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
class PodSecurityContext(BaseResourceCheck):
def __init__(self):
# CIS-1.5 5.7.3
name = "Apply security context to your pods and containers"
... | 41.09434 | 106 | 0.596878 | 1,991 | 0.914141 | 0 | 0 | 0 | 0 | 0 | 0 | 412 | 0.189164 |
33050cf010c98c8d6ee47a3c7fc7081460e0df92 | 345 | py | Python | hardware/demo_i2c.py | leeehuang/MaixPy_scripts | 79a5485ec983e67bb8861305a52418b29e0dc205 | [
"MIT"
] | null | null | null | hardware/demo_i2c.py | leeehuang/MaixPy_scripts | 79a5485ec983e67bb8861305a52418b29e0dc205 | [
"MIT"
] | null | null | null | hardware/demo_i2c.py | leeehuang/MaixPy_scripts | 79a5485ec983e67bb8861305a52418b29e0dc205 | [
"MIT"
] | null | null | null | from machine import I2C
# i2c = I2C(I2C.I2C0, freq=100000, scl=28, sda=29) # hardware i2c
i2c = I2C(I2C.I2C3, freq=100000, scl=28, sda=29) # software i2c
devices = i2c.scan()
print(devices)
for device in devices:
i2c.writeto(device, b'123')
i2c.readfrom(device, 3)
# tmp = bytearray(6)
# i2c.readfrom_... | 23 | 65 | 0.672464 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.414493 |
3305691c62826956ff8ed131b9e4f86523e06726 | 1,431 | py | Python | repos/system_upgrade/common/models/selinux.py | sm00th/leapp-repository | 1c171ec3a5f9260a3c6f84a9b15cad78a875ac61 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/common/models/selinux.py | sm00th/leapp-repository | 1c171ec3a5f9260a3c6f84a9b15cad78a875ac61 | [
"Apache-2.0"
] | 1 | 2022-03-07T15:34:11.000Z | 2022-03-07T15:35:15.000Z | repos/system_upgrade/common/models/selinux.py | sm00th/leapp-repository | 1c171ec3a5f9260a3c6f84a9b15cad78a875ac61 | [
"Apache-2.0"
] | null | null | null | from leapp.models import fields, Model
from leapp.topics import SystemInfoTopic, TransactionTopic
class SELinuxModule(Model):
"""SELinux module in cil including priority"""
topic = SystemInfoTopic
name = fields.String()
priority = fields.Integer()
content = fields.String()
# lines removed due ... | 31.108696 | 70 | 0.716981 | 1,321 | 0.923131 | 0 | 0 | 0 | 0 | 0 | 0 | 625 | 0.436758 |
33057f162f9d778470bc3e8176490e3594ced17b | 76 | py | Python | dateinfer/__init__.py | avishai-o/dateinfer | 894fe26b3b60c94d003f2ae0a55f1d9f1e40cf80 | [
"Apache-2.0"
] | null | null | null | dateinfer/__init__.py | avishai-o/dateinfer | 894fe26b3b60c94d003f2ae0a55f1d9f1e40cf80 | [
"Apache-2.0"
] | null | null | null | dateinfer/__init__.py | avishai-o/dateinfer | 894fe26b3b60c94d003f2ae0a55f1d9f1e40cf80 | [
"Apache-2.0"
] | null | null | null | __author__ = '[email protected]'
from .infer import infer
| 19 | 49 | 0.802632 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.473684 |
330597e751b125d41e61a3b1d6607b8ceee7379c | 21,902 | py | Python | annotator_web.py | j20100/Seg_Annotator | 49b2806be9450c901cf4977633a4ec29b3b6bdca | [
"CC-BY-4.0"
] | null | null | null | annotator_web.py | j20100/Seg_Annotator | 49b2806be9450c901cf4977633a4ec29b3b6bdca | [
"CC-BY-4.0"
] | null | null | null | annotator_web.py | j20100/Seg_Annotator | 49b2806be9450c901cf4977633a4ec29b3b6bdca | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import argparse
import base64
from bson import ObjectId
import datetime
from flask import Flask, Markup, Response, abort, escape, flash, redirect, \
render_template, request, url_for
from flask_login import LoginManager, UserMixin, current_user, login_requir... | 34.98722 | 103 | 0.630079 | 421 | 0.019222 | 0 | 0 | 14,075 | 0.642635 | 0 | 0 | 6,932 | 0.316501 |
3306b230b7b452f85e6bb142239de2540a26cb53 | 72 | py | Python | marrow/interface/__init__.py | marrow/interface | 4d60f9fc16e949c5da3b3756c77d60fe84f0ed2d | [
"MIT"
] | 2 | 2016-03-22T15:21:48.000Z | 2017-02-21T23:52:46.000Z | marrow/interface/__init__.py | marrow/interface | 4d60f9fc16e949c5da3b3756c77d60fe84f0ed2d | [
"MIT"
] | 1 | 2019-01-21T22:09:00.000Z | 2019-01-21T22:09:00.000Z | marrow/interface/__init__.py | marrow/interface | 4d60f9fc16e949c5da3b3756c77d60fe84f0ed2d | [
"MIT"
] | 2 | 2015-12-21T03:24:06.000Z | 2016-11-10T15:19:27.000Z | from .meta import Interface
from .release import version as __version__
| 24 | 43 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3307dce436fdb7329f82703b2fd7a200624c248e | 11,934 | py | Python | apps/steam.py | nestorcalvo/Buencafe_dashboard | e2fbe5dfc5b679ab4d27acea2a23e3dfdeb2699c | [
"MIT"
] | null | null | null | apps/steam.py | nestorcalvo/Buencafe_dashboard | e2fbe5dfc5b679ab4d27acea2a23e3dfdeb2699c | [
"MIT"
] | null | null | null | apps/steam.py | nestorcalvo/Buencafe_dashboard | e2fbe5dfc5b679ab4d27acea2a23e3dfdeb2699c | [
"MIT"
] | null | null | null | import dash
import dash_core_components as dcc
import dash_bootstrap_components as dbc
import dash_html_components as html
import pandas as pd
import plotly.express as px
import plotly.graph_objs as go
from datetime import date
import dash_loading_spinners as dls
from dash.dependencies import Input, Output, ClientsideF... | 35.730539 | 114 | 0.483576 | 0 | 0 | 0 | 0 | 6,353 | 0.532345 | 0 | 0 | 3,916 | 0.328138 |
33080713e8553a0893a3ef2c3f6b5b130877799e | 9,755 | py | Python | ibeatles/step1/data_handler.py | indudhiman/bragg-edge | 56af0a448534ef9cb5428879ba900e194dc05db2 | [
"MIT"
] | null | null | null | ibeatles/step1/data_handler.py | indudhiman/bragg-edge | 56af0a448534ef9cb5428879ba900e194dc05db2 | [
"MIT"
] | null | null | null | ibeatles/step1/data_handler.py | indudhiman/bragg-edge | 56af0a448534ef9cb5428879ba900e194dc05db2 | [
"MIT"
] | null | null | null | import sys
import os
import glob
import pprint
import numpy as np
try:
import PyQt4.QtGui as QtGui
from PyQt4.QtGui import QFileDialog
except:
import PyQt5.QtGui as QtGui
from PyQt5.QtWidgets import QFileDialog
from ibeatles.utilities.load_files import LoadFiles, LoadTimeSpectra
from ibeatles.utilitie... | 44.747706 | 123 | 0.598462 | 9,321 | 0.95551 | 0 | 0 | 0 | 0 | 0 | 0 | 1,161 | 0.119016 |
330bc2029c1246f778fe532317958ef2c30db80a | 10,719 | py | Python | touca/_case.py | trytouca/touca-python | dab4bb6760a173952b63ea14fd4bc30c3877744e | [
"Apache-2.0"
] | 11 | 2021-06-29T04:51:28.000Z | 2022-03-22T05:58:44.000Z | touca/_case.py | trytouca/touca-python | dab4bb6760a173952b63ea14fd4bc30c3877744e | [
"Apache-2.0"
] | null | null | null | touca/_case.py | trytouca/touca-python | dab4bb6760a173952b63ea14fd4bc30c3877744e | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Touca, Inc. Subject to Apache-2.0 License.
from ._types import IntegerType, VectorType, ToucaType
from datetime import datetime, timedelta
from enum import Enum
from typing import Dict, Tuple
class ResultCategory(Enum):
""" """
Check = 1
Assert = 2
class ResultEntry:
"""
Wrapp... | 35.376238 | 88 | 0.612184 | 10,500 | 0.979569 | 265 | 0.024722 | 0 | 0 | 0 | 0 | 4,960 | 0.46273 |
330bcb8284fec7ff83c5b51b2973e481ae9b2a12 | 1,376 | py | Python | app/main/models/utils.py | tmeftah/e-invoice | 7cfe31e9391eb60ab3d06f0055bd2f1e9a524971 | [
"MIT"
] | 2 | 2019-06-10T19:30:06.000Z | 2020-04-30T01:05:04.000Z | app/main/models/utils.py | tmeftah/e-invoice | 7cfe31e9391eb60ab3d06f0055bd2f1e9a524971 | [
"MIT"
] | null | null | null | app/main/models/utils.py | tmeftah/e-invoice | 7cfe31e9391eb60ab3d06f0055bd2f1e9a524971 | [
"MIT"
] | 3 | 2019-01-23T21:37:29.000Z | 2020-04-08T13:22:29.000Z | from datetime import datetime
import sqlalchemy as sa
from flask_sqlalchemy import Model
from sqlalchemy import ForeignKey
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import relationship
from app.main.extensions import db
class BaseMixin(Model):
def save_to_db(self):
try:
... | 23.322034 | 62 | 0.634448 | 1,117 | 0.811773 | 0 | 0 | 671 | 0.487645 | 0 | 0 | 42 | 0.030523 |
330cecf3fdced7629c465eecd0baccde4887eb04 | 759 | py | Python | source/tides.py | agstub/viscoelastic-glines | 924230b2c79b6ec90177718417d26d7bf62c4b50 | [
"MIT"
] | null | null | null | source/tides.py | agstub/viscoelastic-glines | 924230b2c79b6ec90177718417d26d7bf62c4b50 | [
"MIT"
] | 2 | 2021-12-16T20:27:35.000Z | 2021-12-20T17:43:21.000Z | source/tides.py | agstub/viscoelastic-glines | 924230b2c79b6ec90177718417d26d7bf62c4b50 | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# This function defines the sea level change timeseries for marine ice sheet problem.
# *Default = sinusoidal tidal cycle if 'tides' with 1m amplitude if 'tides' turned 'on', OR...
# = zero if 'tides' turned 'off'
#---------------... | 44.647059 | 94 | 0.44664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 465 | 0.612648 |
330e0026ec6f48bff70e4f7fa2738cc955a1b78d | 1,397 | py | Python | nucleotidefrequencies.py | TaliaferroLab/AnalysisScripts | 3df37d2f8fca9bc402afe5ea870c42200fca1ed3 | [
"MIT"
] | null | null | null | nucleotidefrequencies.py | TaliaferroLab/AnalysisScripts | 3df37d2f8fca9bc402afe5ea870c42200fca1ed3 | [
"MIT"
] | null | null | null | nucleotidefrequencies.py | TaliaferroLab/AnalysisScripts | 3df37d2f8fca9bc402afe5ea870c42200fca1ed3 | [
"MIT"
] | 1 | 2021-10-30T07:37:19.000Z | 2021-10-30T07:37:19.000Z | #Usage: python nucleotidefrequencies.py <fasta file> <output file>
#Output is tab delimited frequencies of A, G, C, U
from Bio import SeqIO
import sys
def getfreqs(fasta):
freqs = [] #[afreq, gfreq, cfreq, ufreq]
a = 0
u = 0
c = 0
g = 0
tot = 0
for record in SeqIO.parse(fasta, 'fasta'):
seq = str(record.seq.... | 26.865385 | 104 | 0.602004 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 417 | 0.298497 |
330e3ca54e42e429e7b117d2305fd38be4387ed0 | 17 | py | Python | pytuber/version.py | tefra/pytube.fm | d8e8d5dfe928497f69d208df4c21b049a726dbda | [
"MIT"
] | 8 | 2019-01-27T00:52:20.000Z | 2021-07-15T15:57:19.000Z | pytuber/version.py | tefra/pytube.fm | d8e8d5dfe928497f69d208df4c21b049a726dbda | [
"MIT"
] | 22 | 2019-01-25T14:57:08.000Z | 2021-12-13T19:55:04.000Z | pytuber/version.py | tefra/pytube.fm | d8e8d5dfe928497f69d208df4c21b049a726dbda | [
"MIT"
] | 4 | 2019-02-17T09:56:30.000Z | 2021-04-17T17:53:13.000Z | version = "20.1"
| 8.5 | 16 | 0.588235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.352941 |
330e71b3b4bc8bea5b484ce2931ef4411a75120b | 2,311 | py | Python | 2d-lin_sep.py | rzepinskip/optimization-svm | 9682980e19d5fc9f09353aa1284e86874e954aec | [
"MIT"
] | null | null | null | 2d-lin_sep.py | rzepinskip/optimization-svm | 9682980e19d5fc9f09353aa1284e86874e954aec | [
"MIT"
] | 2 | 2020-01-16T21:35:43.000Z | 2020-03-24T18:02:41.000Z | 2d-lin_sep.py | rzepinskip/optimization-svm | 9682980e19d5fc9f09353aa1284e86874e954aec | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
from optsvm.svm import SVM
x_neg = np.array([[3, 4], [1, 4], [2, 3]])
y_neg = np.array([-1, -1, -1])
x_pos = np.array([[6, -1], [7, -1], [5, -3]])
y_pos = np.array([1, 1, 1])
x1 = np.linspace(-10, 10)
x = np.vstack((np.linspace(-10, 10), np.linspace(-10, 10)))
#... | 30.012987 | 85 | 0.568585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 508 | 0.219818 |
330ecd444c0b51c103fe8429f61156a567b6cff4 | 3,574 | py | Python | src/decorators/location_decorator.py | AAU-PSix/canary | 93b07d23cd9380adc03a6aa1291a13eaa3b3008c | [
"MIT"
] | null | null | null | src/decorators/location_decorator.py | AAU-PSix/canary | 93b07d23cd9380adc03a6aa1291a13eaa3b3008c | [
"MIT"
] | null | null | null | src/decorators/location_decorator.py | AAU-PSix/canary | 93b07d23cd9380adc03a6aa1291a13eaa3b3008c | [
"MIT"
] | null | null | null |
from typing import List, Dict
from ts.c_syntax import CSyntax
from ts import Tree
from cfa import CFANode, CFA, CFAEdge
from cfa import LocalisedCFA, LocalisedNode
from .tweet_handler import TweetHandler
from .decoration_strategy import StandardDecorationStrategy, DecorationStrategy
from .conversion_strategy import Co... | 40.613636 | 141 | 0.665921 | 3,236 | 0.905428 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.092334 |
330f0c3baa6b73293fcd4fabbaa5457656f166bd | 22,550 | py | Python | pydicom_ext/pydicom_series.py | shinaji/pydicom_ext | bc3d716eb488589ba5906a0722474682987dafb8 | [
"MIT"
] | null | null | null | pydicom_ext/pydicom_series.py | shinaji/pydicom_ext | bc3d716eb488589ba5906a0722474682987dafb8 | [
"MIT"
] | null | null | null | pydicom_ext/pydicom_series.py | shinaji/pydicom_ext | bc3d716eb488589ba5906a0722474682987dafb8 | [
"MIT"
] | null | null | null | # dicom_series.py
"""
By calling the function read_files with a directory name or list
of files as an argument, a list of DicomSeries instances can be
obtained. A DicomSeries object has some attributes that give
information about the serie (such as shape, sampling, suid) and
has an info attribute, which is a pydi... | 32.823872 | 80 | 0.587095 | 10,259 | 0.454945 | 0 | 0 | 1,614 | 0.071574 | 0 | 0 | 10,048 | 0.445588 |
3310fadeca0f260ba9d2c8cc23013446b8c2b5d0 | 1,216 | py | Python | tutorials/poplar/tut3_vertices/test/test_tut3.py | xihuaiwen/chinese_bert | 631afbc76c40b0ac033be2186e717885246f446c | [
"MIT"
] | null | null | null | tutorials/poplar/tut3_vertices/test/test_tut3.py | xihuaiwen/chinese_bert | 631afbc76c40b0ac033be2186e717885246f446c | [
"MIT"
] | null | null | null | tutorials/poplar/tut3_vertices/test/test_tut3.py | xihuaiwen/chinese_bert | 631afbc76c40b0ac033be2186e717885246f446c | [
"MIT"
] | null | null | null | # Copyright 2020 Graphcore Ltd.
from pathlib import Path
import pytest
# NOTE: The import below is dependent on 'pytest.ini' in the root of
# the repository
from examples_tests.test_util import SubProcessChecker
working_path = Path(__file__).parent
class TestBuildAndRun(SubProcessChecker):
def setUp(self):
... | 32 | 81 | 0.626645 | 962 | 0.791118 | 0 | 0 | 611 | 0.502467 | 0 | 0 | 465 | 0.382401 |
33119609fa28c4ed894cccea42375ff194c70e59 | 4,719 | py | Python | mboxstats/mboxstats.py | ruettet/mailboxstatistics | ba1296ca441ab646fc92b9bcc5962a8ccf532f19 | [
"Apache-2.0"
] | null | null | null | mboxstats/mboxstats.py | ruettet/mailboxstatistics | ba1296ca441ab646fc92b9bcc5962a8ccf532f19 | [
"Apache-2.0"
] | null | null | null | mboxstats/mboxstats.py | ruettet/mailboxstatistics | ba1296ca441ab646fc92b9bcc5962a8ccf532f19 | [
"Apache-2.0"
] | null | null | null | import codecs
import locale
from mailbox import mbox
from re import sub
from re import compile
from re import IGNORECASE
from datetime import datetime
from collections import Counter
class MailboxStatistics(object):
def __init__(self):
""" Generic MailboxStatistics object that contains the statistics calc... | 43.293578 | 116 | 0.647171 | 4,184 | 0.886629 | 0 | 0 | 0 | 0 | 0 | 0 | 2,038 | 0.431871 |
331242fc9eb2f4e6ef5b97e6f92e0e0380cba84e | 3,787 | py | Python | utils.py | Project-VULMA/street-vulma | 9aa8170c2342926657189b399943c674a2ac7919 | [
"MIT"
] | null | null | null | utils.py | Project-VULMA/street-vulma | 9aa8170c2342926657189b399943c674a2ac7919 | [
"MIT"
] | null | null | null | utils.py | Project-VULMA/street-vulma | 9aa8170c2342926657189b399943c674a2ac7919 | [
"MIT"
] | null | null | null | from PIL import Image
import imagehash
from dotenv import load_dotenv
load_dotenv()
import google_streetview.api
import os
from shapely.geometry import shape, Polygon, Point
def get_point_photo(coords, download_folder):
# Define parameters for street view api
params_0 = [{
'size': '640x640', # max 640x640 pixels
... | 27.845588 | 108 | 0.691841 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 955 | 0.252179 |
3314a88348ec3d3aad1f983f402dff14af15d941 | 1,044 | py | Python | 19/solution.py | studiosi/AoC2015 | 371c0ca7a48cb1e53c487f35bc3b3533cc9d8a7e | [
"MIT",
"Unlicense"
] | null | null | null | 19/solution.py | studiosi/AoC2015 | 371c0ca7a48cb1e53c487f35bc3b3533cc9d8a7e | [
"MIT",
"Unlicense"
] | null | null | null | 19/solution.py | studiosi/AoC2015 | 371c0ca7a48cb1e53c487f35bc3b3533cc9d8a7e | [
"MIT",
"Unlicense"
] | null | null | null | import re
import copy
import random
changes = {}
chain = ""
lines = open('input.txt').readlines()
moreChanges = True
for l in lines:
l = l.strip()
if moreChanges and l != "":
x = l.split("=>")
if x[0].strip() not in changes.keys():
changes[x[0].strip()] = []
changes[x[0].str... | 23.727273 | 73 | 0.509579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.071839 |
3315429c0aa928801a1243413b1efad540cf1405 | 1,102 | py | Python | core/migrations/0002_meetup.py | hatsem78/django_docker_nginex_nginx_gunicorn | 15cb7d2d9ecfd2a2f9bf054997a35903c2ee0ce3 | [
"MIT"
] | null | null | null | core/migrations/0002_meetup.py | hatsem78/django_docker_nginex_nginx_gunicorn | 15cb7d2d9ecfd2a2f9bf054997a35903c2ee0ce3 | [
"MIT"
] | null | null | null | core/migrations/0002_meetup.py | hatsem78/django_docker_nginex_nginx_gunicorn | 15cb7d2d9ecfd2a2f9bf054997a35903c2ee0ce3 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.16 on 2020-09-29 23:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Meetup',
fields=[
('id', mod... | 36.733333 | 115 | 0.579855 | 1,008 | 0.914701 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.248639 |
33156382baf687b9fd221a48d7bcf67c2edeac93 | 4,124 | py | Python | src/attendance/card_reader.py | JakubBatel/Attendance-Recorder | 18d7d019d0284b7fcccf5bbbfc450ba70c922fc2 | [
"MIT"
] | null | null | null | src/attendance/card_reader.py | JakubBatel/Attendance-Recorder | 18d7d019d0284b7fcccf5bbbfc450ba70c922fc2 | [
"MIT"
] | null | null | null | src/attendance/card_reader.py | JakubBatel/Attendance-Recorder | 18d7d019d0284b7fcccf5bbbfc450ba70c922fc2 | [
"MIT"
] | null | null | null | from .resources.config import config
from .utils import reverse_endianness
from abc import ABC
from abc import abstractmethod
from logging import getLogger
from logging import Logger
from time import sleep
from typing import Final
import re
import serial
class ICardReader(ABC):
"""Class representation of card r... | 31.242424 | 103 | 0.617119 | 3,855 | 0.934772 | 0 | 0 | 446 | 0.108147 | 0 | 0 | 1,872 | 0.453928 |
331608bfaa1bbeecfc3dd18a2fde05596fb4e203 | 2,754 | py | Python | medios/diarios/diario.py | miglesias91/dicenlosmedios | 1f8867cd09689006f35447ad8540359d9429b518 | [
"MIT"
] | 1 | 2020-10-20T20:50:51.000Z | 2020-10-20T20:50:51.000Z | medios/diarios/diario.py | miglesias91/dicenlosmedios | 1f8867cd09689006f35447ad8540359d9429b518 | [
"MIT"
] | 8 | 2021-03-19T01:17:28.000Z | 2022-03-02T14:57:48.000Z | medios/diarios/diario.py | miglesias91/dicenlosmedios | 1f8867cd09689006f35447ad8540359d9429b518 | [
"MIT"
] | null | null | null | import dateutil
import yaml
import feedparser as fp
import newspaper as np
from medios.medio import Medio
from medios.diarios.noticia import Noticia
from bd.entidades import Kiosco
class Diario(Medio):
def __init__(self, etiqueta):
Medio.__init__(self, etiqueta)
self.noticias = []
self.f... | 34.860759 | 160 | 0.579521 | 2,570 | 0.933188 | 0 | 0 | 0 | 0 | 0 | 0 | 210 | 0.076253 |
3316542a2058418ad1159222b80cb45ab969c4ba | 1,230 | py | Python | yocto/poky/bitbake/lib/bb/ui/crumbs/hobcolor.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 16 | 2017-01-17T15:20:43.000Z | 2021-03-19T05:45:14.000Z | yocto/poky/bitbake/lib/bb/ui/crumbs/hobcolor.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 415 | 2016-12-20T17:20:45.000Z | 2018-09-23T07:59:23.000Z | yocto/poky/bitbake/lib/bb/ui/crumbs/hobcolor.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 10 | 2016-12-20T13:24:50.000Z | 2021-03-19T05:46:43.000Z | #
# BitBake Graphical GTK User Interface
#
# Copyright (C) 2012 Intel Corporation
#
# Authored by Shane Wang <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundat... | 31.538462 | 73 | 0.662602 | 447 | 0.363415 | 0 | 0 | 0 | 0 | 0 | 0 | 870 | 0.707317 |