hexsha stringlengths 40 40 | size int64 6 782k | ext stringclasses 7
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 72 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 53k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 184 | max_issues_repo_name stringlengths 6 72 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 27.1k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 184 | max_forks_repo_name stringlengths 6 72 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 12.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 782k | avg_line_length float64 2.75 664k | max_line_length int64 5 782k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
305155e3bc85d1610d00ef3eb471e5645e3be9cf | 1,012 | py | Python | migrations/versions/b128cc637447_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | migrations/versions/b128cc637447_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | migrations/versions/b128cc637447_.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | """empty message
Revision ID: b128cc637447
Revises: 41512b20e07c
Create Date: 2020-07-26 15:20:17.685921
"""
import sqlalchemy as sa
import sqlalchemy_utils
from alembic import op
from project import dbtypes
# revision identifiers, used by Alembic.
revision = "b128cc637447"
down_revision = "41512b20e07c"
branch_lab... | 25.948718 | 87 | 0.686759 |
d190c34bee74f1d4fadd6239bdca4f5f8f0817a1 | 158 | py | Python | aecb/api/admin.py | snvc00/aecb-backend | 96847008d7b8d986099c0ce08e1026926ef3c68d | [
"MIT"
] | null | null | null | aecb/api/admin.py | snvc00/aecb-backend | 96847008d7b8d986099c0ce08e1026926ef3c68d | [
"MIT"
] | null | null | null | aecb/api/admin.py | snvc00/aecb-backend | 96847008d7b8d986099c0ce08e1026926ef3c68d | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
admin.site.register([Employee, Report, PreapprovalRequest, Client, CreditCard, Promotion, Insurance]) | 31.6 | 101 | 0.803797 |
0608b5d826695a61d70dee5e036cbc482a8dbfd4 | 746 | py | Python | src/pfun/immutable.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 126 | 2019-09-16T15:28:20.000Z | 2022-03-20T10:57:53.000Z | src/pfun/immutable.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 54 | 2019-09-30T08:44:01.000Z | 2022-03-20T11:10:00.000Z | src/pfun/immutable.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 11 | 2020-01-02T08:32:46.000Z | 2022-03-20T11:10:24.000Z | from dataclasses import dataclass
class Immutable:
"""
Super class that makes subclasses immutable using dataclasses
Example:
>>> class A(Immutable):
... a: str
>>> class B(A):
... b: str
>>> b = B('a', 'b')
>>> b.a = 'new value'
AttributeEr... | 24.064516 | 74 | 0.558981 |
88300ef5000523ab7d6e0672a636b4088e61181d | 10,229 | py | Python | spotify_gender_ex/replacement_table.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | 1 | 2022-02-05T16:40:13.000Z | 2022-02-05T16:40:13.000Z | spotify_gender_ex/replacement_table.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | 31 | 2021-06-17T11:59:33.000Z | 2022-03-19T07:05:18.000Z | spotify_gender_ex/replacement_table.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | null | null | null | # coding=utf-8
import hashlib
import json
import os
from typing import Optional, Tuple, Dict, Callable
import click
from spotify_gender_ex import lang_file
class ReplacementManager:
"""ReplacementManager holds multiple ReplacementTables"""
def __init__(self, dir_apk: str, get_missing_replacement: Optional[... | 32.680511 | 115 | 0.598299 |
11da6f3550a5642d25e61788180333e956c12858 | 2,055 | py | Python | src/visitpy/visit_flow/visit_flow_vpe/visit_exec_example_workspace.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_flow/visit_flow_vpe/visit_exec_example_workspace.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/visit_flow/visit_flow_vpe/visit_exec_example_workspace.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: visit_exec_flow_workspace.py
author: Cyrus Harrison <cyrush@llnl.gov>
created: 1/04/20... | 26.012658 | 73 | 0.637956 |
fef63612ec4cff56e6e12cb491f9fa329b9ecd86 | 572 | py | Python | 6th_sem/souptik_codes/matlabprograms/Actor_01/recordplay.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | 6th_sem/souptik_codes/matlabprograms/Actor_01/recordplay.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | 6th_sem/souptik_codes/matlabprograms/Actor_01/recordplay.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import pyaudio
CHUNK = 1024
WIDTH = 2
CHANNELS = 2
RATE = 44100
RECORD_SECONDS = 5
p = pyaudio.PyAudio()
stream = p.open(format=p.get_format_from_width(WIDTH),
channels=CHANNELS,
rate=RATE,
input=True,
output=True,
frames_per_buffer=CHUN... | 19.724138 | 54 | 0.624126 |
3a7fa5becb1938873b41acea7208155f4ca78433 | 1,650 | py | Python | src/main/python/floatingpoints/floating_points_resizeable_view.py | mkisser-tgm/floating_points | ef6c93c1d1fa5bbb38615c0d2fc7632b31f06e8e | [
"MIT"
] | null | null | null | src/main/python/floatingpoints/floating_points_resizeable_view.py | mkisser-tgm/floating_points | ef6c93c1d1fa5bbb38615c0d2fc7632b31f06e8e | [
"MIT"
] | null | null | null | src/main/python/floatingpoints/floating_points_resizeable_view.py | mkisser-tgm/floating_points | ef6c93c1d1fa5bbb38615c0d2fc7632b31f06e8e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/my_floating_points_resizable.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
... | 42.307692 | 89 | 0.716364 |
6e7b1d71d4f8ca4f7df80de8c703c2c50e0ce197 | 365 | py | Python | src/onegov/town6/views/search.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/views/search.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/views/search.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.security import Public
from onegov.org.views.search import search
from onegov.town6 import TownApp
from onegov.org.models import Search
from onegov.town6.layout import DefaultLayout
@TownApp.html(model=Search, template='search.pt', permission=Public)
def town_search(self, request):
return search(... | 33.181818 | 68 | 0.808219 |
6e1aa0485c3888691f142b6d89acfafff15a6e17 | 2,390 | py | Python | server.py | Bym24v/FAS | efbcf606c49dd591857e0e537bc5b9f082c13405 | [
"MIT"
] | 3 | 2018-02-11T11:34:30.000Z | 2020-05-06T12:11:03.000Z | server.py | Bym24v/FAS | efbcf606c49dd591857e0e537bc5b9f082c13405 | [
"MIT"
] | null | null | null | server.py | Bym24v/FAS | efbcf606c49dd591857e0e537bc5b9f082c13405 | [
"MIT"
] | null | null | null | from bottle import route, run, template, redirect, request, post, response, error
from modules.fstatic import staticFile
from modules.fadb.adbBin import FAStartADB, FASDevices
from modules.fmongodb.fClient import FASClient
from modules.fapi.api import *
import datetime
import hashlib
import uuid
instClient = FASClien... | 22.12963 | 81 | 0.664435 |
283941241cb09f4bdb8f4de2db6258b2b849db06 | 14,257 | py | Python | ppyt/models/orm.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 4 | 2016-08-16T07:47:15.000Z | 2017-12-11T10:08:47.000Z | ppyt/models/orm.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | null | null | null | ppyt/models/orm.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 2 | 2018-06-15T04:43:15.000Z | 2020-05-02T07:47:15.000Z | # coding: utf-8
import logging
from contextlib import contextmanager
from datetime import datetime
from sqlalchemy import (
create_engine, event, Column, Integer, String,
Float, Date, DateTime, SmallInteger, Boolean,
ForeignKeyConstraint
)
from sqlalchemy.engine import Engine
from sqlalchemy.ext.declarative... | 29.155419 | 95 | 0.601319 |
c252ae178191e6e5cdbb5f1d9e7fca77de4a05c7 | 13,128 | py | Python | repo/repo_prep.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/repo_prep.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/repo_prep.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | script_name = "repo_prep.py"
revision_number = 5
homepage = 'http://forum.xbmc.org/showthread.php?tid=129401'
script_credits = 'All code copyleft (GNU GPL v3) by Unobtanium @ XBMC Forums'
"""
Please bump the version number one decimal point and add your name to credits when making changes.
This is an:
- addons.xml ge... | 41.025 | 166 | 0.56947 |
6c326f2eb2fa7667f99cd9a7f2154d6978841ae2 | 1,421 | py | Python | server/apps/user_operation/migrations/0004_auto_20190422_2006.py | Mayandev/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 129 | 2019-04-20T08:23:25.000Z | 2022-03-14T10:02:23.000Z | server/apps/user_operation/migrations/0004_auto_20190422_2006.py | heartplus/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 9 | 2019-05-19T15:06:17.000Z | 2021-12-14T06:47:14.000Z | server/apps/user_operation/migrations/0004_auto_20190422_2006.py | heartplus/django_morec | 8d115f76ad69d7aa78b07dc06aa7047979ad134b | [
"MIT"
] | 34 | 2019-05-06T06:37:17.000Z | 2021-12-09T02:27:58.000Z | # Generated by Django 2.1.4 on 2019-04-22 20:06
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('user_operation', '0003_a... | 36.435897 | 137 | 0.603096 |
dd1e7a3026daf6bf1d4679f96484af4d0c88c799 | 2,836 | py | Python | src/lecture1/new_classifier/main.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 1 | 2020-08-17T07:09:09.000Z | 2020-08-17T07:09:09.000Z | src/lecture1/new_classifier/main.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | null | null | null | src/lecture1/new_classifier/main.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 2 | 2020-07-26T07:27:57.000Z | 2020-08-17T07:09:15.000Z | from get_data.get_data import read_image
from binary_classification.binary_classification import get_hog,get_roc_data,draw_roc_data
from sklearn.model_selection import train_test_split
import configparser
"""
set_config:
set the path of file
@params:
None
@rets:
ipath(str) : t... | 30.170213 | 94 | 0.662906 |
9fdd5580e11e88244141d153de3a75d29fe188a0 | 18,067 | py | Python | Packs/Thycotic/Integrations/Thycotic/Thycotic.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Thycotic/Integrations/Thycotic/Thycotic.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Thycotic/Integrations/Thycotic/Thycotic.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
from typing import Dict
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' CONSTANTS '''
DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
class Client(BaseClient):
"""
Client will implement the se... | 34.024482 | 126 | 0.635468 |
a56d47a32ece2865caef0104e5688c71a9416afc | 397 | py | Python | sdiff/errors.py | KeepSafe/html-structure-diff | 83ea2b8ad4b78b140bb5f69e3f2966c9fda01a89 | [
"Apache-2.0"
] | 3 | 2016-05-10T13:57:14.000Z | 2016-09-29T21:01:53.000Z | sdiff/errors.py | KeepSafe/html-structure-diff | 83ea2b8ad4b78b140bb5f69e3f2966c9fda01a89 | [
"Apache-2.0"
] | 3 | 2015-10-20T22:29:37.000Z | 2022-01-18T18:20:06.000Z | sdiff/errors.py | KeepSafe/html-structure-diff | 83ea2b8ad4b78b140bb5f69e3f2966c9fda01a89 | [
"Apache-2.0"
] | 1 | 2016-11-05T04:23:05.000Z | 2016-11-05T04:23:05.000Z | class DiffError(object):
def __str__(self):
return self.message
class InsertError(DiffError):
def __init__(self, node):
self.node = node
self.message = 'There is a missing element `%s`.' % node.name
class DeleteError(DiffError):
def __init__(self, node):
self.node = no... | 20.894737 | 73 | 0.632242 |
593ee65e778d2c5e4d1c3795e0f469493b42e8ac | 1,950 | py | Python | scripts/file-management/subsetter.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | scripts/file-management/subsetter.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | scripts/file-management/subsetter.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# subsetter.py: pick out a subset of acquisitions in an experiment directory.
# usage: python subsetter.py expdir
# TODO test both options (delete, not delete)
import os, sys, glob, shutil
import argparse
def read_stimfile(stimfile):
with open(stimfile, "r") as stfile:
stim = stfile.read().... | 26.351351 | 77 | 0.682051 |
0581a14c973a763cc6a0d423152fc3c02f2633bc | 184 | py | Python | site/public/courses/CS-1.1/Examples/ControlFlowExamples/scope.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/CS-1.1/Examples/ControlFlowExamples/scope.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/CS-1.1/Examples/ControlFlowExamples/scope.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | """Program to demonstrate variable scope. Try it out to see what happens!"""
num_widgets = 10
def change_widgets():
num_widgets = 5
change_widgets()
print(num_widgets) | 18.4 | 77 | 0.701087 |
34c8a1965bd6a5a062a95fd7f460150cf4902570 | 107 | py | Python | demos/System_Dynamics/Compartment_Models/stochastic_seir/model/state_variables.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 56 | 2020-07-08T23:23:15.000Z | 2022-03-11T20:43:09.000Z | demos/System_Dynamics/Compartment_Models/stochastic_seir/model/state_variables.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 41 | 2020-07-11T23:24:06.000Z | 2022-01-28T13:28:07.000Z | demos/System_Dynamics/Compartment_Models/stochastic_seir/model/state_variables.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 39 | 2020-07-15T11:35:04.000Z | 2022-02-01T16:02:51.000Z | genesis_states = {
'susceptible': 999990,
'exposed': 10,
'infected': 10,
'recovered': 0,
}
| 15.285714 | 26 | 0.560748 |
2f56804002368cb6642d23dfffdbaa6db0561bd6 | 161 | py | Python | lib/util/decorators/imagestrategy.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 5 | 2018-02-06T22:48:34.000Z | 2020-01-07T20:19:05.000Z | lib/util/decorators/imagestrategy.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 11 | 2018-01-31T21:47:49.000Z | 2018-04-21T16:42:52.000Z | lib/util/decorators/imagestrategy.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 2 | 2020-06-18T05:40:03.000Z | 2022-02-02T03:46:30.000Z | STRATEGIES = []
def imagestrategy(processing_function):
STRATEGIES.append(processing_function)
def process_image(image):
return processing_function(image)
| 20.125 | 39 | 0.813665 |
c0a9b6f1a9c07081d64d9af62f528486f9ef141c | 565 | py | Python | tex-table-generator/Doku table_py/pyCode/Beispiel1.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 3 | 2016-04-27T17:07:00.000Z | 2022-02-02T15:43:15.000Z | tex-table-generator/Doku table_py/pyCode/Beispiel1.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 5 | 2016-04-27T17:10:03.000Z | 2017-06-20T14:54:20.000Z | tex-table-generator/Doku table_py/pyCode/Beispiel1.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | null | null | null | write('build/Tabelle_b_texformat.tex', make_full_table(
caption = 'Messdaten Kapazitätsmessbrücke.',
label = 'table:A2',
source_table = 'build/Tabelle_b.tex',
stacking = [1,2,3,4,5], # default = None
units = ['Wert', # default = None
r'$C_2 \:/\: \si{\nano\... | 43.461538 | 61 | 0.490265 |
cdaf86d38d2f96b1aebb655ff813ba25172ab13c | 624 | py | Python | 2020/RoundC/a.py | Akash671/KickStart | 7cf7e572408203c881d56989fb37e6270bd696f0 | [
"CC0-1.0"
] | 1 | 2021-03-12T08:39:01.000Z | 2021-03-12T08:39:01.000Z | 2020/RoundC/a.py | Akash671/KickStart | 7cf7e572408203c881d56989fb37e6270bd696f0 | [
"CC0-1.0"
] | null | null | null | 2020/RoundC/a.py | Akash671/KickStart | 7cf7e572408203c881d56989fb37e6270bd696f0 | [
"CC0-1.0"
] | 1 | 2021-03-20T18:55:52.000Z | 2021-03-20T18:55:52.000Z | for i in range(int(input())):
n,cd=map(int, input().split())
# for j in range(n):
a = list(map(int, input().split()[:n]))
c=0
for i1 in range(n):
if a[i1]==cd:
# print(i1)
# t=i1
# s=0
for j1 in range(cd):
if i1<n and ((a[i1])==(cd-... | 26 | 48 | 0.299679 |
93e07044bb5a9301bc0bb2d8ae00120ece9f2adb | 2,814 | py | Python | python/en/archive/dropbox/setting_fonts/multithreading_in_python-4.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/setting_fonts/multithreading_in_python-4.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/setting_fonts/multithreading_in_python-4.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
multithreading_in_python-4.py
# Using Locks
threading module provides a Lock class to deal with the race conditions.
Lock is implemented using a Semaphore object provided by the Operating System.
A semaphore is a synchronization object that controls access by multip... | 33.5 | 89 | 0.689765 |
f532e18b029737c5e4b09fded0bfd9d6383e5d5f | 4,260 | py | Python | standardize.py | thahnen/labelbox-export-minifier | df83effaa8923d4f75997b76898e8b34ebea55ce | [
"MIT"
] | null | null | null | standardize.py | thahnen/labelbox-export-minifier | df83effaa8923d4f75997b76898e8b34ebea55ce | [
"MIT"
] | null | null | null | standardize.py | thahnen/labelbox-export-minifier | df83effaa8923d4f75997b76898e8b34ebea55ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import json
def standardize(path :str) -> int:
BREITE :int = 768
HOEHE :int = 640
# Die Klasse für ein Objekt, was man bei Labelbox NICHT erkannt hat
STANDARD_KLASSE :str = "nicht-erkannt"
if os.path.isdir(path):
files =... | 39.444444 | 180 | 0.474178 |
e34b9bfad8cc9fe484162dbeb296bd0cd8548a81 | 313 | py | Python | algorithms/greedy/algorithmic_crush.py | PlamenHristov/HackerRank | 2c875995f0d51d7026c5cf92348d9fb94fa509d6 | [
"MIT"
] | null | null | null | algorithms/greedy/algorithmic_crush.py | PlamenHristov/HackerRank | 2c875995f0d51d7026c5cf92348d9fb94fa509d6 | [
"MIT"
] | null | null | null | algorithms/greedy/algorithmic_crush.py | PlamenHristov/HackerRank | 2c875995f0d51d7026c5cf92348d9fb94fa509d6 | [
"MIT"
] | null | null | null | import itertools, sys
if __name__ == '__main__':
N, M = list(map(int, sys.stdin.readline().split()))
x = [0] * N
for _ in range(M):
a, b, k = list(map(int, sys.stdin.readline().split()))
x[a - 1] += k
if b < N:
x[b] -= k
print(max(itertools.accumulate(x))) | 20.866667 | 62 | 0.501597 |
e36b393fc84b787895af352d9abf4b4fb8f560f6 | 456 | py | Python | BugInThere/python/BugInThere.py | Lian0123/TextArt | 26a2378a48fb1e49df067240fcb1dbd50e346a8e | [
"MIT"
] | 2 | 2018-07-29T05:02:53.000Z | 2021-08-16T10:52:59.000Z | BugInThere/python/BugInThere.py | Lian0123/TextArt | 26a2378a48fb1e49df067240fcb1dbd50e346a8e | [
"MIT"
] | null | null | null | BugInThere/python/BugInThere.py | Lian0123/TextArt | 26a2378a48fb1e49df067240fcb1dbd50e346a8e | [
"MIT"
] | null | null | null | #
# ┌────\ ╭──────╮ │
# │ \ │ │ │ │ │
# │ / │ │ │ │ │ Σ(⊙ д ⊙ )
# ├────< │ │ │ │ in there!!!
# │ \ │ │ │ ___ │
# │ ... | 50.666667 | 62 | 0.032895 |
efe75dfd864838fbd74fd70c9a79ea168df319b5 | 2,753 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/meta/topic_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/meta/topic_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/meta/topic_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import List, Optional
from watchmen_auth import PrincipalService
from watchmen_data_kernel.cache import CacheService
from watchmen_data_kernel.common import DataKernelException
from watchmen_data_kernel.topic_schema import TopicSchema
from watchmen_meta.admin import TopicService as TopicStorageService
from... | 37.202703 | 109 | 0.791137 |
9d576491a490a8453c9f351206cbaf3c07c53e05 | 1,881 | py | Python | zk_tool.py | persquare/ZK2 | 5c00d0a5a59123931848259286bb13bb86c5396b | [
"MIT"
] | 2 | 2020-03-05T16:01:17.000Z | 2020-09-25T11:28:27.000Z | zk_tool.py | persquare/ZK2 | 5c00d0a5a59123931848259286bb13bb86c5396b | [
"MIT"
] | null | null | null | zk_tool.py | persquare/ZK2 | 5c00d0a5a59123931848259286bb13bb86c5396b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# zk - create a new zettelkasten entry and return the path
import sys
import os
import argparse
import urllib.parse
import zk2
def create_zk(body, notesdir):
note = zk2.ZKNote()
note.body = body or ''
note.write(notesdir)
return note.filepath(notesdir)
def txmt_URI(path):
... | 25.418919 | 78 | 0.623073 |
a03e13d2dd8b2d96a42ef1ad445b3d3b905b5d76 | 608 | py | Python | src/server/bo/Grading.py | muenstermannmarius/ElectionSystem | a6e60d9147423787e869587b808def4771f89cb7 | [
"RSA-MD"
] | null | null | null | src/server/bo/Grading.py | muenstermannmarius/ElectionSystem | a6e60d9147423787e869587b808def4771f89cb7 | [
"RSA-MD"
] | null | null | null | src/server/bo/Grading.py | muenstermannmarius/ElectionSystem | a6e60d9147423787e869587b808def4771f89cb7 | [
"RSA-MD"
] | null | null | null | from server.bo import BusinessObject as bo
class Grading(bo.BusinessObject):
"""The implementation of a exemplary grading class.
"""
def __init__(self):
super().__init__()
self._grade = 0.0
def get_grade(self):
"""Reads out the grading"""
return self._grade
def se... | 20.965517 | 57 | 0.595395 |
26cfddaadd835624520bb12172590bffe83a094b | 59 | py | Python | Python/Exercícios_Python/LerNumeroReal.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/LerNumeroReal.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/LerNumeroReal.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | real = float(input('Digite um número real: '))
print(real)
| 19.666667 | 46 | 0.694915 |
3e2aebdd4f60f7057ba02b2992ce139a76aee376 | 358 | py | Python | Algorithms/Implementation/apple_and_orange.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Algorithms/Implementation/apple_and_orange.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Algorithms/Implementation/apple_and_orange.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | s,t = map(int, input().split())
a,b = map(int, input().split())
m,n = map(int, input().split())
da = list(map(int, input().split()))
do = list(map(int, input().split()))
mda = s - a # max distance for apples
mdo = b - t # max distance for oranges
aoh = sum(s <= a + d <= t for d in da)
ooh = sum(s <= b + d <=... | 23.866667 | 42 | 0.561453 |
397b9d44c793fc6298be2e866e84692bb99bc496 | 7,416 | py | Python | Packs/AzureCompute/Integrations/AzureCompute_v2/AzureCompute_v2_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 1 | 2021-11-02T05:36:38.000Z | 2021-11-02T05:36:38.000Z | Packs/AzureCompute/Integrations/AzureCompute_v2/AzureCompute_v2_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 61 | 2021-10-07T08:54:38.000Z | 2022-03-31T10:25:35.000Z | Packs/AzureCompute/Integrations/AzureCompute_v2/AzureCompute_v2_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | import pytest
import json
from AzureCompute_v2 import MsGraphClient, screen_errors, assign_image_attributes, list_vms_command,\
create_vm_parameters, get_network_interface_command, get_public_ip_details_command, create_nic_command
# test_create_vm_parameters data:
CREATE_VM_PARAMS_ARGS = {"resource_group": "compu... | 39.238095 | 122 | 0.591963 |
f2e620858f423f7f8b0f066c9d335f82b11f3236 | 782 | py | Python | hello/hello_sqlalchemy.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | hello/hello_sqlalchemy.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | hello/hello_sqlalchemy.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 导入:
from sqlalchemy import Column, String, create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# 创建对象的基类:
Base = declarative_base()
# 定义User对象:
class User(Base):
# 表的名字:
__tablename__ = 'user'
# 表的... | 21.135135 | 58 | 0.703325 |
ffdf0f7437e780256dab5e2d6982091a55a4701d | 600 | py | Python | 2imageclassify/ml_svm.py | anjiang2016/rcnn-xilie | d68ead1504732bd92cde59f8246f9bb2ebc6fe5c | [
"MIT"
] | null | null | null | 2imageclassify/ml_svm.py | anjiang2016/rcnn-xilie | d68ead1504732bd92cde59f8246f9bb2ebc6fe5c | [
"MIT"
] | null | null | null | 2imageclassify/ml_svm.py | anjiang2016/rcnn-xilie | d68ead1504732bd92cde59f8246f9bb2ebc6fe5c | [
"MIT"
] | null | null | null | # 课程可以围绕这个文档展开
# https://scikit-learn.org/stable/modules/svm.html
# 内部计算是依赖libsvm和liblinear库的
# libsvm:https://www.csie.ntu.edu.tw/~cjlin/libsvm/
# liblinear:https://www.csie.ntu.edu.tw/~cjlin/liblinear/
from sklearn import svm
X = [[0,0],[1,1]]
y = [0,1]
# 二分类
clf = svm.SVC()
clf.fit(X,y)
clf.predict([[2.,2.]])
# 获取支... | 19.354839 | 57 | 0.686667 |
29e08a8c9392dd4d8625a04078d49813c3a147e7 | 669 | py | Python | etc/db/consumer.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | etc/db/consumer.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | etc/db/consumer.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | # tinydb.readthedocs.io/en/latest/getting-started.html
from tinydb import TinyDB, Query, where
from tinydb.operations import delete
# delete example:
# db.update(delete('key1'), User.name == 'John')
# delete(key), increment(key), decrement(key), add(key, value), subtract(key,
# value), set(key, value)
db = TinyDB('... | 23.892857 | 77 | 0.671151 |
8a5f056cc6fb337ca4faa9f6e1aa7fc1075e5432 | 4,682 | py | Python | 0-newbooks/bitcoin_prediction/get_twitter_new.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | 0-newbooks/bitcoin_prediction/get_twitter_new.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | 0-newbooks/bitcoin_prediction/get_twitter_new.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | #Import the necessary methods from tweepy library
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from textblob import TextBlob
import re
import json
import datetime
import traceback
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argum... | 36.866142 | 155 | 0.611704 |
8a9879dd55bae40f3bb83e7b7fe3234ecb35e545 | 41,842 | py | Python | Packs/TAXIIServer/Integrations/TAXII2Server/TAXII2Server.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | null | null | null | Packs/TAXIIServer/Integrations/TAXII2Server/TAXII2Server.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2021-12-26T07:34:37.000Z | 2021-12-26T07:49:34.000Z | Packs/TAXIIServer/Integrations/TAXII2Server/TAXII2Server.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | null | null | null | import functools
import uuid
from typing import Callable
from flask import Flask, request, make_response, jsonify, Response
from urllib.parse import ParseResult, urlparse
from secrets import compare_digest
from dateutil.parser import parse
from requests.utils import requote_uri
from werkzeug.exceptions import Requested... | 38.142206 | 119 | 0.635773 |
8abd84d91afbba1a88877892b407adad57f1fb25 | 46,073 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/redfish/get_handler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/redfish/get_handler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/redfish/get_handler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
import vie... | 39.718103 | 105 | 0.674451 |
8acee675a1286a0e5abf5341fc6eab7b60d1fca6 | 242 | py | Python | data/episode5/cat.py | AkademieOlympia/nlp-mit-python | 39b36c65bf7e0fc9e3bc0388e0250732b909c689 | [
"CC-BY-4.0"
] | 2 | 2020-03-03T09:40:24.000Z | 2020-04-09T07:23:59.000Z | data/episode5/cat.py | AkademieOlympia/nlp-mit-python | 39b36c65bf7e0fc9e3bc0388e0250732b909c689 | [
"CC-BY-4.0"
] | null | null | null | data/episode5/cat.py | AkademieOlympia/nlp-mit-python | 39b36c65bf7e0fc9e3bc0388e0250732b909c689 | [
"CC-BY-4.0"
] | 1 | 2022-01-31T13:07:09.000Z | 2022-01-31T13:07:09.000Z | import sys
from os.path import exists
if len(sys.argv) < 2:
print("No file given")
else:
if exists(sys.argv[1]):
with open(sys.argv[1], 'r') as f:
print(f.read())
else:
print("Datei existiert nicht!")
| 20.166667 | 41 | 0.570248 |
0a807f0659646089af52ed59471de468c3ca9f42 | 35,909 | py | Python | cr4ck-main/orbxd.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 16 | 2021-09-03T03:56:49.000Z | 2022-03-23T04:49:57.000Z | cr4ck-main/orbxd.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 1 | 2021-10-03T12:01:15.000Z | 2021-10-03T12:01:15.000Z | cr4ck-main/orbxd.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 23 | 2021-09-02T14:53:59.000Z | 2022-03-12T16:03:10.000Z | #coding=utf-8
Massage_Author = """
~~> Open Source Code Syarat? Subrek Channel Gua & Jangan Ganti Bot Follow! Cukup Tambahkan Bot Follow Sajah!
~~> Ingat Ini Hanya Untuk Contoh Project!. Kalo Mau Recode, Recode Ajah Itung² Buat Latihan Lu
~~> Kalo Mau Izin, Izin lewat instgrm/email/fb Ajah
~~> insgrm : https://www... | 44.942428 | 620 | 0.589852 |
0acad658af480c60f56a0ce6cf22a2b6661212d3 | 476 | py | Python | elements/python/13/16/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/13/16/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/13/16/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | RESULTS = {1: True}
def check_collatz(x):
if x in RESULTS:
return RESULTS[x]
nxt = x//2 if x%2 == 0 else 3*x+1
r = check_collatz(nxt)
RESULTS[x] = r
return r
def verify_collatz(n):
"""
Verifies the collatz conjecture for all integers less than n.
"""
return all(map(check_c... | 15.866667 | 65 | 0.598739 |
8634f4b8e74d354b1c3b2e1dff9843db2cbf099d | 3,818 | py | Python | plugins/tff_backend/bizz/agenda.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/bizz/agenda.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/bizz/agenda.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 35.682243 | 107 | 0.718177 |
865e8de0e9f7a1bd53758aa2f7d60595b64f2c19 | 8,992 | py | Python | hashing/scripts/latency_figure2.py | ShuhaoZhangTony/WalnutDB | 9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050 | [
"MIT"
] | null | null | null | hashing/scripts/latency_figure2.py | ShuhaoZhangTony/WalnutDB | 9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050 | [
"MIT"
] | null | null | null | hashing/scripts/latency_figure2.py | ShuhaoZhangTony/WalnutDB | 9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050 | [
"MIT"
] | null | null | null | import itertools as it
import os
import matplotlib
import matplotlib.pyplot as plt
import pylab
from matplotlib.font_manager import FontProperties
from matplotlib.ticker import MaxNLocator, LinearLocator, ScalarFormatter
from matplotlib import rc
OPT_FONT_NAME = 'Helvetica'
TICK_FONT_SIZE = 24
LABEL_FONT_SIZE = 28
LE... | 35.68254 | 133 | 0.596419 |
86e2301a969a3ca1f3e108b434328521c31bbe8f | 43,358 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/_callback.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/_callback.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/_callback.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.11
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path impo... | 43.840243 | 104 | 0.8377 |
813975dc6c2dbde117f9e446c0a089b9e80154d0 | 734 | py | Python | BITs/2014/Borsheva_ V_O/task_7_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Borsheva_ V_O/task_7_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Borsheva_ V_O/task_7_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 7. Вариант 6
#компьютер загадывает название одного из семи городов России, имеющих действующий метрополитен, а игрок должен его угадать.
#Борщёва В.О
#28.03.2016
import random
subways=('Москва','Санкт-Петербург','Нижний Новгород','Новосибирск','Самара','Екатеринбург','Казань')
subway=random.randint(0,... | 29.36 | 124 | 0.666213 |
d4b2c9999d3673f3211ebf0646a6a3d92486e986 | 3,111 | py | Python | tutorials/robots_and_marbles/videos/robot-marbles-part-4/config.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 56 | 2020-07-08T23:23:15.000Z | 2022-03-11T20:43:09.000Z | tutorials/robots_and_marbles/videos/robot-marbles-part-4/config.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 41 | 2020-07-11T23:24:06.000Z | 2022-01-28T13:28:07.000Z | tutorials/robots_and_marbles/videos/robot-marbles-part-4/config.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 39 | 2020-07-15T11:35:04.000Z | 2022-02-01T16:02:51.000Z | # import libraries
from decimal import Decimal
import numpy as np
from datetime import timedelta
from cadCAD.configuration import append_configs
from cadCAD.configuration.utils import bound_norm_random, ep_time_step, config_sim
seeds = {
# 'z': np.random.RandomState(1),
# 'a': np.random.RandomState(2)
}
sim_c... | 29.913462 | 149 | 0.662488 |
6af67372c3219c2f6fa233f42b1c3bd1e5875a73 | 24,195 | py | Python | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/InstancesCheck_FailedCategories/test_data/constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/InstancesCheck_FailedCategories/test_data/constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/InstancesCheck_FailedCategories/test_data/constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | INCIDENTS_RESULTS = [
{'ModuleName': 'InnerServicesModule', 'Brand': 'Builtin', 'Category': 'Builtin', 'ID': '', 'Version': 0, 'Type': 1,
'Contents': {'ErrorsPrivateDoNotUse': None, 'data': [{'CustomFields': {
'dbotpredictionprobability': 0,
'detectionsla': {'accumulatedPause': 0,
... | 58.868613 | 294 | 0.497499 |
9c43e13f82859e6c1e0653f330618f9dbe6031db | 890 | py | Python | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_soma_pos_pares_pos_impares.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_soma_pos_pares_pos_impares.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_soma_pos_pares_pos_impares.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício Processa Números
# --------------------------
# Classe responsável por calcular a soma dos números em posições pares e ímpares de uma lista de números.
from view.paineis.painel_abstrato import PainelAbstrato
from model.processa_numeros import soma_p... | 40.454545 | 131 | 0.658427 |
b9dc17844d4620804c0ee33717643e3f81343116 | 1,028 | py | Python | Automaten/Python/dea_abaca.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 2 | 2020-09-24T12:11:16.000Z | 2022-03-31T04:47:24.000Z | Automaten/Python/dea_abaca.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-27T15:06:27.000Z | 2021-03-01T16:32:48.000Z | Automaten/Python/dea_abaca.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-24T05:12:35.000Z | 2021-02-24T05:12:35.000Z | # Übergangsfunktion
# Zustand, Buchstabe => Neuer Zustand
def transition(state, char):
new_state = -1
if state == 0:
if char == "a":
new_state = 1
elif state == 1:
if char == "a":
new_state = 1
elif char in "bc":
new_state = 2
elif state == 2:... | 24.47619 | 70 | 0.598249 |
6a073abf3cd3057b3868df5643ea3127177121cd | 342 | py | Python | 2020-11-10.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | 2020-11-10.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | 2020-11-10.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | def napln(n):
return [i for i in range(1,n+1)]
def rozpocitavadlo(l, n):
out = []
i = 0
a = 0
while len(l) > 0:
a += 1
if i >= len(l):
i = 0
if a == n:
out.append(l.pop(i))
a = 0
i-=1
i += 1
return out
print(rozpoc... | 17.1 | 36 | 0.397661 |
5da0c76fdac960b58d5e580229b5055438891c5c | 2,119 | py | Python | aula13/soma_quadrados.py | andrevictor17/aulasRenzoEd | 931d73f5d20e7a3c837f175131bf3a271c7f375f | [
"MIT"
] | null | null | null | aula13/soma_quadrados.py | andrevictor17/aulasRenzoEd | 931d73f5d20e7a3c837f175131bf3a271c7f375f | [
"MIT"
] | null | null | null | aula13/soma_quadrados.py | andrevictor17/aulasRenzoEd | 931d73f5d20e7a3c837f175131bf3a271c7f375f | [
"MIT"
] | null | null | null | from collections import Counter
def soma_quadrados(n):
if n == 0:
return [0]
quadrado = []
max = 1
while (max * max <= n):
quadrado.append(max * max)
max = max + 1
historico = {0: 0}
while len(quadrado)> 0:
numero = n
quadrado1 = quadrado.copy()
... | 30.271429 | 73 | 0.555451 |
f8d50b97d8bde6f295cc2d14897f62fad1d6439b | 44,211 | py | Python | pghoard/restore.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | null | null | null | pghoard/restore.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | null | null | null | pghoard/restore.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 1 | 2022-03-31T06:09:34.000Z | 2022-03-31T06:09:34.000Z | """
pghoard - list and restore basebackups
Copyright (c) 2016 Ohmu Ltd
See LICENSE for details
"""
import abc
import argparse
import base64
import contextlib
import datetime
import enum
import errno
import io
import logging
import multiprocessing
import multiprocessing.pool
import os
import re
import shutil
import sub... | 42.065652 | 125 | 0.616249 |
54d016bf5f66deafd37074a2763648a33235d2e2 | 452 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v4_1/set_outgoing_email_footer.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v4_1/set_outgoing_email_footer.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_1/set_outgoing_email_footer.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from erpnext.setup.install import default_mail_footer
def execute():
return
mail_footer = frappe.db.get_default('mail_footer') or ''
m... | 34.769231 | 97 | 0.794248 |
54ffea2005bc8c2c12715f1ca7b6318decb638c6 | 8,957 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/remote_management/oneview/oneview_ethernet_network.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/remote_management/oneview/oneview_ethernet_network.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/remote_management/oneview/oneview_ethernet_network.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 35.543651 | 129 | 0.687507 |
91dcc12261f902158d0f237c9c2f9b42540f5534 | 1,458 | py | Python | tests/envs/base/mdp_test.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 34 | 2021-12-09T07:12:57.000Z | 2022-03-11T08:17:20.000Z | tests/envs/base/mdp_test.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | null | null | null | tests/envs/base/mdp_test.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 4 | 2021-12-11T07:48:01.000Z | 2022-03-01T23:50:33.000Z | import chex
import jax
import jax.numpy as jnp
import shinrl as srl
dS = 10
dA = 5
obs_shape = (2,)
act_shape = (3,)
init_probs = jnp.array([0.2, 0.8, 0, 0, 0, 0, 0, 0, 0, 0])
discount = 0.99
def tran_fn(state, action):
next_state = jnp.array([state, (state + action) % 10], dtype=int)
prob = jnp.array([0.2,... | 23.142857 | 69 | 0.623457 |
22aa8110e0cff9bb882bef15d612dd438c8eca6c | 706 | py | Python | exercises/fr/solution_03_15.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/solution_03_15.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/solution_03_15.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import json
from spacy.lang.fr import French
from spacy.tokens import Doc
with open("exercises/fr/bookquotes.json", encoding="utf8") as f:
DATA = json.loads(f.read())
nlp = French()
# Déclare l'extension de Doc "author" (défaut None)
Doc.set_extension("author", default=None)
# Déclare l'extension de Doc "book" ... | 30.695652 | 75 | 0.706799 |
fe123111bce02c807c6961bdf443e3676a617246 | 2,218 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_9/add_setup_progress_actions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_9/add_setup_progress_actions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_9/add_setup_progress_actions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null |
from __future__ import unicode_literals
import frappe
from frappe import _
def execute():
"""Add setup progress actions"""
frappe.reload_doc("setup", "doctype", "setup_progress")
frappe.reload_doc("setup", "doctype", "setup_progress_action")
actions = [
{"action_name": "Add Company", "action_doctype": "Company... | 49.288889 | 107 | 0.669973 |
435411e451b1e3713267d70d8337431164961070 | 485 | py | Python | python/celery/usage/run_chord.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/celery/usage/run_chord.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/celery/usage/run_chord.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # run_chord.py
from celery import chord
from tasks import add, tsum
# task signature 생성
sigs = [add.s(i, i + 1) for i in range(5)]
c = chord(sigs)
res = c(tsum.s())
print(" 작업 조회 ".center(50, "="))
print(f" task id: {res.id}")
print(f" result type: {type(res)}")
print(" 상태 조회 ".center(50, "="))
print(f" task re... | 20.208333 | 42 | 0.593814 |
43904f4d002e2fe0685e9c39e744f7660cbcb70f | 21,553 | py | Python | tests/onegov/activity/test_matching_memory.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/activity/test_matching_memory.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/activity/test_matching_memory.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import sys
import time
from datetime import date, timedelta, datetime
from functools import partial
from itertools import count
from onegov.activity.utils import dates_overlap
from onegov.activity.matching import deferred_acceptance
from onegov.activity.matching import MatchableBooking
from onegov.activity.matching im... | 28.063802 | 78 | 0.615228 |
6050b580281ae93bf7e8f7d7b5f53ed3ba3cffaf | 625 | py | Python | Praeambel/table.py | smjhnits/Praktikum | 92c9df3ee7dfa2417f464036d18ac33b70765fdd | [
"MIT"
] | 2 | 2019-03-07T08:55:36.000Z | 2019-04-22T18:13:03.000Z | Praeambel/table.py | smjhnits/Praktikum | 92c9df3ee7dfa2417f464036d18ac33b70765fdd | [
"MIT"
] | null | null | null | Praeambel/table.py | smjhnits/Praktikum | 92c9df3ee7dfa2417f464036d18ac33b70765fdd | [
"MIT"
] | 2 | 2017-10-27T13:26:43.000Z | 2018-01-13T09:12:24.000Z | import numpy as np
import csv
csv.register_dialect(
'mydialect',
delimiter = ',',
quotechar = '"',
doublequote = True,
skipinitialspace = True,
lineterminator = '\r\n',
quoting = csv.QUOTE_MINIMAL)
x, y, i, k= np.genfromtxt('data.txt', unpack = True)
print(x)
print(y)
header = ['Messwerte... | 21.551724 | 62 | 0.6496 |
1c4083fd4d6b1dde4ea9b1f21d7bd6b84a73e3f6 | 2,802 | py | Python | SOP/t4/q1.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 10 | 2020-12-08T20:18:15.000Z | 2021-06-07T20:00:07.000Z | SOP/t4/q1.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-06-28T03:42:13.000Z | 2021-06-28T16:53:13.000Z | SOP/t4/q1.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-01-14T19:59:20.000Z | 2021-06-15T11:53:21.000Z | def dist(a, b):
return abs(a - b)
def find_min(diff):
index = -1
mini = float("inf")
for i in range(len(diff)):
if not diff[i][1] and mini > diff[i][0]:
mini = diff[i][0]
index = i
return index
def ssf_sorting(requests):
head = requests[0]
l = len(request... | 26.685714 | 113 | 0.586724 |
c739f27a4eda5e284f17d4ad8df760e75be5fbec | 700 | py | Python | packages/watchmen-inquiry-trino/src/watchmen_inquiry_trino/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-inquiry-trino/src/watchmen_inquiry_trino/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-inquiry-trino/src/watchmen_inquiry_trino/settings.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from logging import getLogger
from typing import Optional, Tuple
from pydantic import BaseSettings
logger = getLogger(__name__)
class KernelSettings(BaseSettings):
TRINO_HOST: str = '127.0.0.1'
TRINO_PORT: int = 5678
TRINO_USER: str = 'admin'
TRINO_PASSWORD: Optional[str] = None
class Config:
# secrets_dir ... | 21.875 | 58 | 0.747143 |
c797fa6621fad04deac55234017ebb7c3c8c85ed | 1,654 | py | Python | rbac/common/role/__init__.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | rbac/common/role/__init__.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 1 | 2019-07-08T22:32:43.000Z | 2019-07-08T22:32:43.000Z | rbac/common/role/__init__.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 34.458333 | 79 | 0.722491 |
4018cf5bada544908731ae872746cd4104129772 | 1,159 | py | Python | Packs/CommonScripts/Scripts/IsListExist/IsListExist_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/IsListExist/IsListExist_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/IsListExist/IsListExist_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from IsListExist import main
import pytest
import demistomock as demisto
@pytest.mark.parametrize('list_name,get_list_res,expected', [
(
'list1',
[
{
'Type': 1,
'Contents': 'list content',
}
],
'yes',
),
(
'l... | 23.18 | 103 | 0.549612 |
dc0569891ba975f85e6e553adb42348988ea2d99 | 636 | py | Python | src/onegov/town6/views/exceptionviews.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/views/exceptionviews.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/views/exceptionviews.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.security import Public
from onegov.org.views.exceptionviews import handle_forbidden, handle_notfound
from onegov.town6 import TownApp
from webob.exc import HTTPForbidden, HTTPNotFound
from onegov.town6.layout import DefaultLayout
@TownApp.html(model=HTTPForbidden, permission=Public, template='forbid... | 37.411765 | 78 | 0.820755 |
90bc9b5931b942ebea6780d7dd07cc4fae8322de | 837 | py | Python | Packs/Cisco-umbrella-enforcement/Integrations/CiscoUmbrellaEnforcement/CiscoUmbrellaEnforcement_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Cisco-umbrella-enforcement/Integrations/CiscoUmbrellaEnforcement/CiscoUmbrellaEnforcement_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Cisco-umbrella-enforcement/Integrations/CiscoUmbrellaEnforcement/CiscoUmbrellaEnforcement_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CiscoUmbrellaEnforcement import prepare_suffix
def test_domains_list_suffix():
"""Unit test
Given
- fetch incidents command
- command args
When
- mock the Clients's get token function.
- mock the Demisto's getIntegrationContext.
... | 34.875 | 112 | 0.622461 |
29464d73b443fe979b157e06ad0a81cd2bdf8697 | 5,719 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/scripts/peak_pie.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/scripts/peak_pie.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/scripts/peak_pie.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/env python
"""
Make a pie chart where peaks fall in annotations; see \
:mod:`pybedtools.contrib.Classifier` for more flexibility.
The results here are similar to CEAS (http://liulab.dfci.harvard.edu/CEAS/).
However, multi-featuretype classes are reported. That is, if a peak falls in
an exon in one isoform... | 33.25 | 79 | 0.55779 |
465acdf22f8383f6436dd8dceb4cc87f466306d6 | 1,923 | py | Python | app/t1health_app/static/fusioncharts-suite-xt/integrations/django/samples/fusioncharts/samples/special_chart_type_api.py | siyaochen/Tier1Health | 536591a7534bbb3fb27fe889bfed9de152ec1864 | [
"MIT"
] | 14 | 2016-11-03T19:06:21.000Z | 2021-11-24T09:05:09.000Z | app/t1health_app/static/fusioncharts-suite-xt/integrations/django/samples/fusioncharts/samples/special_chart_type_api.py | siyaochen/Tier1Health | 536591a7534bbb3fb27fe889bfed9de152ec1864 | [
"MIT"
] | 10 | 2022-02-16T07:17:49.000Z | 2022-03-08T12:43:51.000Z | asset/integrations/django/samples/fusioncharts/samples/special_chart_type_api.py | Piusshungu/catherine-junior-school | 5356f4ff5a5c8383849d32e22a60d638c35b1a48 | [
"MIT"
] | 17 | 2016-05-19T13:16:34.000Z | 2021-04-30T14:38:42.000Z | from django.shortcuts import render
from django.http import HttpResponse
# Include the `fusioncharts.py` file which has required functions to embed the charts in html page
from ..fusioncharts import FusionCharts
# Loading Data from a Static JSON String
# It is a example to show how to attach event in chart.
# The `ch... | 40.914894 | 126 | 0.539262 |
4662195519206b75f156ce77cf56f90d81bfc536 | 24,558 | py | Python | myems-api/core/distributioncircuit.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | myems-api/core/distributioncircuit.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | myems-api/core/distributioncircuit.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | import falcon
import simplejson as json
import mysql.connector
import config
import uuid
from core.useractivity import user_logger, access_control
class DistributionCircuitCollection:
@staticmethod
def __init__():
"""Initializes DistributionCircuitCollection"""
pass
@staticmethod
def ... | 43.697509 | 110 | 0.53734 |
d3d9af2c6d2ff3d7ff51de6a090ff5e57372a025 | 3,157 | py | Python | mashlife.py | ikeikeikeike/scrapy-2ch-summary-spider | 7142693f25025a09390377649a727cfd33d15af3 | [
"MIT"
] | 2 | 2015-01-12T08:23:35.000Z | 2017-07-28T15:02:26.000Z | mashlife.py | ikeikeikeike/scrapy-2ch-summary-spider | 7142693f25025a09390377649a727cfd33d15af3 | [
"MIT"
] | null | null | null | mashlife.py | ikeikeikeike/scrapy-2ch-summary-spider | 7142693f25025a09390377649a727cfd33d15af3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import re
import itertools
from scrapy import log
from scrapy.selector import Selector
from summaries.items import SummariesItem
from thread_float_bbs import (
SequenceAppend,
ThreadFloatBbsSpider
)
class MashlifeSpider(ThreadFloatBbsSpider):
""" for mashlife.doorblog.jp
"""... | 30.355769 | 96 | 0.504593 |
31d36bed92d7536236a0346bcb96d7823be22921 | 953 | py | Python | Communication/server.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | Communication/server.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | Communication/server.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | import socket
from _thread import *
# SETTINGS
HOST = ''
PORT = 2345
BUFFER_SIZE = 1024
# SOCKET
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind((HOST, PORT))
sock.listen(2)
rotation = 456
forward = 123
def recv():
global forward, rotation
while True:
a = input("> ")
if a.strip() != "":
... | 20.717391 | 67 | 0.603358 |
9edc32812d77a34416e97776145ccff3ea08cc0f | 585 | py | Python | 0-notes/job-search/Cracking the Coding Interview/C06MathLogicPuzzles/questions/6.10-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C06MathLogicPuzzles/questions/6.10-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C06MathLogicPuzzles/questions/6.10-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # 6.10 Poison
# You have 100 bottles of soda and exactly one is poisoned.
# You have 10 test strips which can be used to detect poison.
# A single drop of poison will turn the test strip positive permanently.
# You can put any number of drops on a test strip at once and you can reuse a
# test strip as many times ... | 45 | 81 | 0.745299 |
9ef16cfa0a5e8c72b6a2ee530741b99839087bdd | 1,877 | py | Python | src/bo4e/bo/preisblattnetznutzung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/bo/preisblattnetznutzung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/bo/preisblattnetznutzung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains PreisblattNetnutzung class and corresponding marshmallow schema for de-/serialization
"""
import attr
from marshmallow_enum import EnumField # type:ignore[import]
from bo4e.bo.preisblatt import Preisblatt, PreisblattSchema
from bo4e.enum.bilanzierungsmethode import Bilanzierungsmethode
from bo4e.enum.bo... | 39.93617 | 196 | 0.790623 |
b47879c08d87251cd59db49ab5f6c6c64de957d0 | 2,030 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_1/gst_fixes.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_1/gst_fixes.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_1/gst_fixes.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe
from frappe.custom.doctype.custom_field.custom_field import create_custom_field
from erpnext.regional.india.setup import update_address_template
def execute():
company = frappe.get_all('Company', filters = {'country': 'India'})
if not company:
return
update_existing_custom_fields()
add_custom_fiel... | 34.40678 | 90 | 0.739409 |
c32bc3d1c1014e738e6a841dc8ed61f1824d0e7b | 1,705 | py | Python | nodes/ue10_real_turtleBot_experience/teleop_gamepad_real_bot.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | nodes/ue10_real_turtleBot_experience/teleop_gamepad_real_bot.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | nodes/ue10_real_turtleBot_experience/teleop_gamepad_real_bot.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/env python3
""" teleop_gamepad_real_bot.py"""
# Author: Olaf Just
# This ROS Node converts Joystick inputs from the joy node
# into commands for the real TurtleBot3
# based on the works of
# https://andrewdai.co/xbox-controller-ros.html#rosjoy
import rospy
from geometry_msgs.msg import Twist
from sensor_msg... | 29.396552 | 69 | 0.649853 |
48b5ad1cea1db0f99ce7f22c16a6c2cb6c57a22c | 22,517 | py | Python | examples/model_interpretation/task/senti/saliency_map/sentiment_interpretable.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/model_interpretation/task/senti/saliency_map/sentiment_interpretable.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/model_interpretation/task/senti/saliency_map/sentiment_interpretable.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # !/usr/bin/env python3
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | 40.865699 | 117 | 0.573744 |
96146eba0462dc744d771148ef60ad074be25477 | 741 | py | Python | other/remove_second_onwarrds.py | yujungcheng/algorithm_and_data_structure | 3742238227067217b82bf35ca3a968db4375f3c9 | [
"Apache-2.0"
] | null | null | null | other/remove_second_onwarrds.py | yujungcheng/algorithm_and_data_structure | 3742238227067217b82bf35ca3a968db4375f3c9 | [
"Apache-2.0"
] | null | null | null | other/remove_second_onwarrds.py | yujungcheng/algorithm_and_data_structure | 3742238227067217b82bf35ca3a968db4375f3c9 | [
"Apache-2.0"
] | 1 | 2020-04-16T01:17:04.000Z | 2020-04-16T01:17:04.000Z | #!/usr/bin/python2.7
def second_onwards_deduplicate(input_list):
# {"data_string": count, ... }
data_count = dict()
index = 0
while index < len(input_list):
key = input_list[index]
if data_count.has_key(key):
if data_count[key] >= 2:
del input_list[inde... | 26.464286 | 83 | 0.530364 |
82dd1b09c6e1878b4416c5ed9ac1ca15e320960f | 1,011 | py | Python | 5_Closures_and_Decorators/decorators.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 5_Closures_and_Decorators/decorators.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 5_Closures_and_Decorators/decorators.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | # Decorators:
# - wraps a function by another function - "ummantelt eine Funktion mit weiteren Funktionalitäten"
# - takes a function as an argument, returns a closure
# - the clousure runs the previous passed in function with the *args and **kwargs arguments
def decorator(fn):
print("Start decorator function from... | 33.7 | 98 | 0.682493 |
81e0550b314267f7944c124a0d5a1d3140900f4a | 3,937 | py | Python | RL_HW2/tictactoe.py | cherninkiy/advanced-ml-hw | f290b5560e6e773fbdf80ae159b227a4a01555b7 | [
"MIT"
] | null | null | null | RL_HW2/tictactoe.py | cherninkiy/advanced-ml-hw | f290b5560e6e773fbdf80ae159b227a4a01555b7 | [
"MIT"
] | null | null | null | RL_HW2/tictactoe.py | cherninkiy/advanced-ml-hw | f290b5560e6e773fbdf80ae159b227a4a01555b7 | [
"MIT"
] | null | null | null | import gym
import copy
import numpy as np
N_ROWS, N_COLS, N_WIN = 3, 3, 3
class TicTacToe(gym.Env):
def __init__(self, n_rows=N_ROWS, n_cols=N_COLS, n_win=N_WIN, clone=None):
if clone is not None:
self.n_rows, self.n_cols, self.n_win = clone.n_rows, clone.n_cols, clone.n_win
self.... | 35.468468 | 107 | 0.508255 |
d20f7a1d9183355ef4873b3e18f432fb799dc808 | 7,392 | py | Python | ciphey/basemods/Crackers/vigenere.py | joesitton/Ciphey | 862555f13e3915428a2f4ada5538fdf0be77ffcd | [
"MIT"
] | 1 | 2020-10-05T11:25:18.000Z | 2020-10-05T11:25:18.000Z | ciphey/basemods/Crackers/vigenere.py | joesitton/Ciphey | 862555f13e3915428a2f4ada5538fdf0be77ffcd | [
"MIT"
] | 1 | 2021-04-21T06:02:32.000Z | 2021-04-21T06:02:32.000Z | ciphey/basemods/Crackers/vigenere.py | joesitton/Ciphey | 862555f13e3915428a2f4ada5538fdf0be77ffcd | [
"MIT"
] | null | null | null | """
██████╗██╗██████╗ ██╗ ██╗███████╗██╗ ██╗
██╔════╝██║██╔══██╗██║ ██║██╔════╝╚██╗ ██╔╝
██║ ██║██████╔╝███████║█████╗ ╚████╔╝
██║ ██║██╔═══╝ ██╔══██║██╔══╝ ╚██╔╝
╚██████╗██║██║ ██║ ██║███████╗ ██║
© Brandon Skerritt
Github: brandonskerritt
"""
from copy import copy
from distutils import util
f... | 36.776119 | 119 | 0.534361 |
fb60e30ff999d6be399cfc328e27a60550f53343 | 556 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section_4_Dictionary/76. remove duplicates from a dictionary.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_4_Dictionary/76. remove duplicates from a dictionary.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_4_Dictionary/76. remove duplicates from a dictionary.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | """
Write a Python function to remove duplicates from Dictionary.
Input data:
input_dict = {'Box1':'Apple', 'Box2':'Mango', 'Box3':'Orange', 'Box4':'Apple', 'Box5':'Orange', 'Box6':'Orange','Box7':'Strawberry','Box8':'Apple'}
Expected output = {'Box2': 'Mango', 'Box6': 'Orange', 'Box7': 'Strawberry', 'Box8': 'Apple... | 27.8 | 148 | 0.631295 |
fb68e7368b767ebdfc5c1e21f12c88fd52c966cf | 1,611 | py | Python | shinrl/solvers/discrete_pi/_build_net_act_mixin.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 34 | 2021-12-09T07:12:57.000Z | 2022-03-11T08:17:20.000Z | shinrl/solvers/discrete_pi/_build_net_act_mixin.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | null | null | null | shinrl/solvers/discrete_pi/_build_net_act_mixin.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 4 | 2021-12-11T07:48:01.000Z | 2022-03-01T23:50:33.000Z | """MixIn building act_functions for GymExplore and GymEval MixIns.
Author: Toshinori Kitamura
Affiliation: NAIST & OSX
"""
from typing import Callable, Optional
import gym
import shinrl as srl
from .config import PiConfig
class BuildNetActMixIn:
def initialize(self, env: gym.Env, config: Optional[PiConfig] = N... | 30.980769 | 82 | 0.59342 |
f772a67e200bdeda156939bead6893328b40e74b | 7,073 | py | Python | Packs/SecBI/Integrations/SecBI/SecBI.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/SecBI/Integrations/SecBI/SecBI.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/SecBI/Integrations/SecBI/SecBI.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
''' IMPORTS '''
import requests
from typing import Dict, Tuple
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' GLOBALS/PARAMS '''
SECBI_API_ROOT = '/api/v1'
SECBI_API_ENDPOINT_STATUS = SE... | 35.722222 | 127 | 0.654036 |
e399fe5fcf0c1e6920f68426ef487a84b205eb7a | 2,448 | py | Python | benchmark/keras_interval_evaluation.py | zentonllo/tfg-tensorflow | 095469a906de26984b4d781699e76bec02b1ef75 | [
"MIT"
] | null | null | null | benchmark/keras_interval_evaluation.py | zentonllo/tfg-tensorflow | 095469a906de26984b4d781699e76bec02b1ef75 | [
"MIT"
] | null | null | null | benchmark/keras_interval_evaluation.py | zentonllo/tfg-tensorflow | 095469a906de26984b4d781699e76bec02b1ef75 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Callback class for Keras which keeps track of AUC over validation data during training
Code mostly adapted from https://github.com/keunwoochoi/keras_callbacks_example
and https://gist.github.com/smly/d29d079100f8d81b905e
"""
from sklearn.metrics import roc_auc_score
from keras.callbacks im... | 30.987342 | 86 | 0.629493 |
5891692a22ddbdfacc804cfff68f6ca329a25d4f | 11,788 | py | Python | modules/conversions.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | modules/conversions.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | modules/conversions.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | """Handles the conversion of variables from TRANSP format to MMM format
The conversion process includes converting units used in TRANSP to those used
by MMM, followed by one or two interpolation steps. The first interpolation
step is used to put all TRANSP variables on the same radial grid, since some
variables are d... | 40.508591 | 115 | 0.699695 |
3fa72d2487331177e717cf99c76fc42bd98560f6 | 4,733 | py | Python | sel.py | IIIT-ECell/website_2019 | 9b57cb06a8db843d219007d01f3c3a30c0921d8f | [
"MIT"
] | 4 | 2019-06-28T21:14:05.000Z | 2019-11-01T10:06:00.000Z | sel.py | victorknox/website_2019 | 97e9f2864c795299687d2628e578689a5911e6bf | [
"MIT"
] | 20 | 2019-05-13T02:55:54.000Z | 2021-07-02T11:38:31.000Z | sel.py | victorknox/website_2019 | 97e9f2864c795299687d2628e578689a5911e6bf | [
"MIT"
] | 6 | 2020-01-12T09:40:15.000Z | 2021-06-13T10:09:26.000Z | """
Install chromedriver from here https://sites.google.com/a/chromium.org/chromedriver/downloads for your chrome version
Run pip install selenium xlrd in working directory
Fill your username below
I assume the list of CAs is in your home directory as ~/cas.csv.
"""
import re
import csv
import xlrd
import os
import sy... | 30.733766 | 117 | 0.669765 |
b7d5fcf30963ac12a0c54796a79f98e59695ca5b | 2,970 | py | Python | moviemon/classes/games.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | null | null | null | moviemon/classes/games.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | null | null | null | moviemon/classes/games.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | 1 | 2019-01-12T10:42:25.000Z | 2019-01-12T10:42:25.000Z |
import random
from django.conf import settings
from .movies import Movies
from .map import Map
from .players import Players
# 1 = moviemon, 2 = movieballs, 3 = rien
EVENTS = [1, 2, 3]
class Games(Movies, Map, Players):
def __init__(self):
self.event_current = None
self.moviedex = list()
Map.__init__(... | 22 | 81 | 0.626599 |
4dd5acf49a02dc71699d0c7b66e2b1d2ccc86f7e | 1,518 | py | Python | packages/watchmen-model/src/watchmen_model/admin/space.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/admin/space.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/admin/space.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import List, Optional, Union
from pydantic import BaseModel
from watchmen_model.common import construct_parameter_joint, DataModel, OptimisticLock, ParameterJoint, SpaceId, \
TenantBasedTuple, TopicId, UserGroupId
from watchmen_utilities import ArrayHelper
# noinspection PyRedundantParentheses,Duplicat... | 27.107143 | 114 | 0.767457 |
12cf8284caf24bf24f2ae090be190166117c009b | 3,443 | py | Python | test/test_npu/test_network_ops/test_all.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_all.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_all.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 39.125 | 90 | 0.651467 |
12e7f7bee3b5301791cdf6dc2db2927e8900ab0a | 919 | py | Python | src/server/jobs/analysis.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 156 | 2021-11-19T18:50:14.000Z | 2022-03-31T19:48:59.000Z | src/server/jobs/analysis.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 30 | 2021-12-27T19:30:56.000Z | 2022-03-30T17:49:00.000Z | src/server/jobs/analysis.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 14 | 2022-01-17T23:24:34.000Z | 2022-03-29T09:27:47.000Z | from dataclasses import dataclass, field
import json
import logging
from typing import List
from ingestion.destinations import Destination
from server.models import Metric
from server.middleware.db import db
class ZScoreShim(Destination):
def _retrieve_metrics_by_attrs(self, database, schema):
metrics = db... | 28.71875 | 67 | 0.678999 |
12f6cd8618c524412a357ffeccd82211ca48c530 | 1,211 | py | Python | app/xlib/states.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | 1 | 2020-12-07T13:30:59.000Z | 2020-12-07T13:30:59.000Z | app/xlib/states.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | null | null | null | app/xlib/states.py | marwanad/music_bot | c7a9c704f510d455fc6d1d7c057d5cfa31dcd7cf | [
"MIT"
] | null | null | null | class StateType(object):
INITIAL = 'initial'
GENRE_SELECT = "genre_select"
ARTIST_SELECT = "artist_select"
ANSWER_TIME = "answer_time"
SETTINGS = "settings"
class StateString(object):
INTRO = 'Welcome to MusIQ! How well do you know your music? I send you music clips, and you guess the song nam... | 50.458333 | 120 | 0.638315 |
425456b2c9c78e163fb245a4eeb7a4a7fc1d39c5 | 746 | py | Python | Packs/CommonScripts/Scripts/PortListenCheck/PortListenCheck.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/PortListenCheck/PortListenCheck.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/PortListenCheck/PortListenCheck.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import socket
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
port = int(demisto.args()["port"])
host = demisto.args()["host"]
result = sock.connect_ex((host, port))
openPort = False
if result == 0:
resp = "Port " ... | 32.434783 | 63 | 0.604558 |
c486f0eddb3855b2a0b886b88d4a977ed42ed3c6 | 5,068 | py | Python | rbac/common/task/create_task.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | rbac/common/task/create_task.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 1 | 2019-07-08T22:32:43.000Z | 2019-07-08T22:32:43.000Z | rbac/common/task/create_task.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 37.540741 | 89 | 0.647198 |
674dcfbd203fd9926806480ff143c88714d73cc1 | 817 | py | Python | Projekt/PrepareDataSetNew.py | Griizz/ComputerVisionPraktikum | 30276eb0b039ea42728d7433c573414d2dfe1ec2 | [
"MIT"
] | null | null | null | Projekt/PrepareDataSetNew.py | Griizz/ComputerVisionPraktikum | 30276eb0b039ea42728d7433c573414d2dfe1ec2 | [
"MIT"
] | null | null | null | Projekt/PrepareDataSetNew.py | Griizz/ComputerVisionPraktikum | 30276eb0b039ea42728d7433c573414d2dfe1ec2 | [
"MIT"
] | 3 | 2019-11-17T01:33:07.000Z | 2020-03-26T10:13:39.000Z | from os import walk
from shutil import copyfile
_, folders, _ = walk("./DataSet").__next__()
for folder in folders:
sourceTr = "./DataSet/" + folder + "/Training/"
sourceTest = "./DataSet/" + folder + "/Test/"
destinationTr = "./DataSetNew/Training/" + folder + "/"
destinationTest = "./DataSetNew/Tes... | 32.68 | 83 | 0.652387 |
e1fa4ffa37baeef7b8ffec53aaefacd6ec455771 | 727 | py | Python | generate_readme.py | fmtree-dev/md-toc-action | 8b7749c54fd684f716d896c7e9a8eea2d023aac8 | [
"MIT"
] | null | null | null | generate_readme.py | fmtree-dev/md-toc-action | 8b7749c54fd684f716d896c7e9a8eea2d023aac8 | [
"MIT"
] | 1 | 2021-03-09T01:04:47.000Z | 2021-03-09T01:04:47.000Z | generate_readme.py | fmtree-dev/md-toc-action | 8b7749c54fd684f716d896c7e9a8eea2d023aac8 | [
"MIT"
] | null | null | null | from jinja2 import Environment, FileSystemLoader
import argparse
import pathlib2
__dir__ = pathlib2.Path(__file__).parent.absolute()
parser = argparse.ArgumentParser("generate README parser")
parser.add_argument("-i", "--input", required=True, help="toc.txt path")
parser.add_argument("-d", "--template_directory", requ... | 31.608696 | 91 | 0.767538 |
c02439b60f34815fa9eb1cce9f565700e0e5f37a | 213 | py | Python | Exercicios/ex09-3a.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | Exercicios/ex09-3a.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | Exercicios/ex09-3a.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | #calculo da área de um triângulo
altura = float(input('Insira a altura: '))
base = float(input('Insira o comprimento da base: '))
area = (base*altura)/2
msg = 'A àrea do triângulo é {}'
print(msg.format(area))
| 21.3 | 53 | 0.685446 |
c069f9c7eb74905d6c87f194fb08709148be0201 | 332 | py | Python | 10.1111/nph.17101/topgo/athgosilim2csv.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.1111/nph.17101/topgo/athgosilim2csv.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.1111/nph.17101/topgo/athgosilim2csv.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null |
h = {}
with open('ATH_GO_GOSLIM.20180605.txt', 'r') as infh:
for buf in infh:
r = buf.split('\t')
#if (r[7] == 'P'):
if r[0] not in h:
h[r[0]] = set()
h[r[0]].add(r[5])
for k, v in h.items():
if len(v) > 0 and len(v) < 500:
print(k + '\t' + ','... | 18.444444 | 53 | 0.400602 |
22008555d7d98b931515a16b6b31081eec1512c2 | 2,111 | py | Python | nginx-nr-agent/entrypoint.py | realityone/Dockerfiles | bd9eca40e3494c1e00badb36a72d8e6240ddb71e | [
"MIT"
] | null | null | null | nginx-nr-agent/entrypoint.py | realityone/Dockerfiles | bd9eca40e3494c1e00badb36a72d8e6240ddb71e | [
"MIT"
] | null | null | null | nginx-nr-agent/entrypoint.py | realityone/Dockerfiles | bd9eca40e3494c1e00badb36a72d8e6240ddb71e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import socket
import StringIO
import subprocess
import ConfigParser
NGINX = '/usr/sbin/nginx'
NGINX_NR_AGENT = '/usr/bin/nginx-nr-agent.py'
NGINX_NR_AGENT_CONFIG = '/etc/nginx-nr-agent/nginx-nr-agent.ini'
class NginxNRAgentConfig(object):
TEMPLATE = StringIO.StringIO("""# global... | 21.540816 | 81 | 0.662719 |
97d730184d16faaf2fd1958f42ba35b5ecd3840f | 878 | py | Python | challenges/imageTruncation/python3/imageTruncation.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 5 | 2020-05-21T03:02:34.000Z | 2021-09-06T04:24:26.000Z | challenges/imageTruncation/python3/imageTruncation.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 6 | 2019-04-24T03:39:26.000Z | 2019-05-03T02:10:59.000Z | challenges/imageTruncation/python3/imageTruncation.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 1 | 2021-09-06T04:24:27.000Z | 2021-09-06T04:24:27.000Z | def imageTruncation(image, threshold):
return [[y if y < threshold else threshold for y in x] for x in image]
if __name__ == '__main__':
input0 = [[[0,100,100], [1,255,103]], [[0,100,100], [1,255,103]], [[1], [2]]]
input1 = [102, 0, 1]
expectedOutput = [[[0,100,100], [1,102,102]], [[0,0,0], [0,0,0]], [[1], [1]]]
... | 67.538462 | 130 | 0.651481 |
450ecb60d0657dedd46b2ad3fd45dc0c5550540f | 189 | py | Python | n-th-tribonacci-number/n-th-tribonacci-number.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | n-th-tribonacci-number/n-th-tribonacci-number.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | n-th-tribonacci-number/n-th-tribonacci-number.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def tribonacci(self, n: int) -> int:
dp=[0,1,1,2,4,7]
for i in range(6,n+1):
dp.append(dp[i-1]+dp[i-2]+dp[i-3])
return dp[n]
| 27 | 46 | 0.465608 |
18a5abf796302225ca6263ec3f7656b666befff9 | 17,243 | py | Python | spo/spo/report/mwst_deklaration/mwst_deklaration.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | null | null | null | spo/spo/report/mwst_deklaration/mwst_deklaration.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | 6 | 2019-08-23T18:36:26.000Z | 2019-11-12T13:12:12.000Z | spo/spo/report/mwst_deklaration/mwst_deklaration.py | libracore/spo | c6617a4624d683e27ee3fde745313c30504f3fd1 | [
"MIT"
] | 1 | 2021-08-14T22:22:43.000Z | 2021-08-14T22:22:43.000Z | # Copyright (c) 2020-2021, libracore and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from datetime import datetime, timedelta
from frappe import _
def execute(filters=None):
columns = get_columns()
data = get_data(filters.from_date, fil... | 59.66436 | 170 | 0.530012 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.