hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c0341a8f6335f43bf129d7aa5413234c9b783dd
2,780
py
Python
test/test_modify_issued_document_request.py
fattureincloud/fattureincloud-python-sdk
f3a40fac345751014ea389680efdaef90f03bac1
[ "MIT" ]
2
2022-02-17T08:33:17.000Z
2022-03-22T09:27:00.000Z
test/test_modify_issued_document_request.py
fattureincloud/fattureincloud-python-sdk
f3a40fac345751014ea389680efdaef90f03bac1
[ "MIT" ]
null
null
null
test/test_modify_issued_document_request.py
fattureincloud/fattureincloud-python-sdk
f3a40fac345751014ea389680efdaef90f03bac1
[ "MIT" ]
null
null
null
""" Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. # noq...
42.769231
537
0.649281
import json import sys import unittest import datetime import fattureincloud_python_sdk from functions import json_serial from functions import create_from_json from fattureincloud_python_sdk.model.issued_document import IssuedDocument from fattureincloud_python_sdk.model.issued_document_type import IssuedDocumentType...
true
true
1c0342bafafe35b2a31595b859e28d628722dd1f
1,017
py
Python
tests/core/test_component_repr.py
spaceone/circuits
ed6d5464f1f83034109ed3d23d126c715450cfd2
[ "MIT" ]
null
null
null
tests/core/test_component_repr.py
spaceone/circuits
ed6d5464f1f83034109ed3d23d126c715450cfd2
[ "MIT" ]
null
null
null
tests/core/test_component_repr.py
spaceone/circuits
ed6d5464f1f83034109ed3d23d126c715450cfd2
[ "MIT" ]
null
null
null
"""Component Repr Tests Test Component's representation string. """ import os from circuits import Component, Event try: from threading import current_thread except ImportError: from threading import currentThread as current_thread # NOQA class App(Component): def test(self, event, *args, **kwargs): ...
20.755102
65
0.580138
import os from circuits import Component, Event try: from threading import current_thread except ImportError: from threading import currentThread as current_thread class App(Component): def test(self, event, *args, **kwargs): pass class test(Event): pass def test_main(): id = "%s:%...
true
true
1c034409395527177aca6bbfcb05cdffe73a6610
50,263
py
Python
env/lib/python3.7/site-packages/scipy/ndimage/measurements.py
MarcoMancha/BreastCancerDetector
be0dfdcebd1ae66da6d0cf48e2525c24942ae877
[ "Apache-2.0" ]
366
2019-04-07T20:34:48.000Z
2022-03-29T07:35:38.000Z
env/lib/python3.7/site-packages/scipy/ndimage/measurements.py
MarcoMancha/BreastCancerDetector
be0dfdcebd1ae66da6d0cf48e2525c24942ae877
[ "Apache-2.0" ]
30
2020-04-15T19:37:40.000Z
2020-04-22T21:19:35.000Z
env/lib/python3.7/site-packages/scipy/ndimage/measurements.py
MarcoMancha/BreastCancerDetector
be0dfdcebd1ae66da6d0cf48e2525c24942ae877
[ "Apache-2.0" ]
61
2019-04-08T00:58:14.000Z
2022-03-20T23:04:28.000Z
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
33.531021
124
0.593538
from __future__ import division, print_function, absolute_import import numpy import numpy as np from . import _ni_support from . import _ni_label from . import _nd_image from . import morphology __all__ = ['label', 'find_objects', 'labeled_comprehension', 'sum', 'mean', 'variance', 'standard_deviation', ...
true
true
1c0344841fb4162d063e9494cfbd2746bb5873c5
667
py
Python
Chapter13/04_pixels.py
PacktPublishing/MicroPython-Cookbook
ffd6aa15c303459570a89ba31b5bc734f05cb387
[ "MIT" ]
16
2019-07-01T16:24:22.000Z
2022-03-03T06:54:57.000Z
Chapter13/04_pixels.py
ccwu0918/MicroPython-Cookbook
ffd6aa15c303459570a89ba31b5bc734f05cb387
[ "MIT" ]
null
null
null
Chapter13/04_pixels.py
ccwu0918/MicroPython-Cookbook
ffd6aa15c303459570a89ba31b5bc734f05cb387
[ "MIT" ]
19
2019-04-17T08:30:12.000Z
2022-01-14T03:05:37.000Z
import adafruit_ssd1306 import board import busio BLACK = 0 WHITE = 1 def animate_pixel(oled, x, y, step_x, step_y, count): for i in range(count): x += step_x y += step_y oled.pixel(x, y, WHITE) oled.show() def zig_zag(oled): animate_pixel(oled, x=0, y=0, step_x=1, step_y=1,...
21.516129
66
0.635682
import adafruit_ssd1306 import board import busio BLACK = 0 WHITE = 1 def animate_pixel(oled, x, y, step_x, step_y, count): for i in range(count): x += step_x y += step_y oled.pixel(x, y, WHITE) oled.show() def zig_zag(oled): animate_pixel(oled, x=0, y=0, step_x=1, step_y=1,...
true
true
1c0345c3cc2ca1f8a8242224dc9e4d0a06b335b8
89
py
Python
api/projeto/__main__.py
ldynczuki/iris-model-api
0519f5d3d8158f7560326219bd2263a234ad0cbe
[ "MIT" ]
null
null
null
api/projeto/__main__.py
ldynczuki/iris-model-api
0519f5d3d8158f7560326219bd2263a234ad0cbe
[ "MIT" ]
null
null
null
api/projeto/__main__.py
ldynczuki/iris-model-api
0519f5d3d8158f7560326219bd2263a234ad0cbe
[ "MIT" ]
null
null
null
def start(): print(__package__, ' started.') if __name__ == '__main__': start()
14.833333
35
0.606742
def start(): print(__package__, ' started.') if __name__ == '__main__': start()
true
true
1c0346584e32e32f21822988eff6a26f18cc083b
6,360
py
Python
openpeerpower/components/workday/binary_sensor.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
openpeerpower/components/workday/binary_sensor.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
openpeerpower/components/workday/binary_sensor.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""Sensor to indicate whether the current day is a workday.""" from datetime import timedelta import logging from typing import Any import holidays import voluptuous as vol from openpeerpower.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity from openpeerpower.const import CONF_NAME, WEEKDAYS import...
32.121212
86
0.662579
from datetime import timedelta import logging from typing import Any import holidays import voluptuous as vol from openpeerpower.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity from openpeerpower.const import CONF_NAME, WEEKDAYS import openpeerpower.helpers.config_validation as cv import openpeerp...
true
true
1c0348c756c4fb4ff89cacbb831e5edd4b56e1c3
6,350
py
Python
LexData/language.py
DiFronzo/LexData-2.0
1c283df31d86245056a2ab18e84953262aac5711
[ "MIT" ]
null
null
null
LexData/language.py
DiFronzo/LexData-2.0
1c283df31d86245056a2ab18e84953262aac5711
[ "MIT" ]
null
null
null
LexData/language.py
DiFronzo/LexData-2.0
1c283df31d86245056a2ab18e84953262aac5711
[ "MIT" ]
null
null
null
""" This module simply contains a few common Languages with their language-codes and QIDs for easier use. """ from dataclasses import dataclass @dataclass class Language: """Dataclass representing a language""" short: str qid: str # https://w.wiki/qeu lang_aa = Language("aa", "Q27811") lang_ab = Langua...
32.901554
76
0.655118
from dataclasses import dataclass @dataclass class Language: short: str qid: str lang_aa = Language("aa", "Q27811") lang_ab = Language("ab", "Q5111") lang_af = Language("af", "Q14196") lang_ak = Language("ak", "Q28026") lang_am = Language("am", "Q28244") lang_an = Language("an", "Q8765") lang_ar = Language...
true
true
1c03491c5614df535ac3f61b3c99db45d964b427
12,526
py
Python
python/tvm/auto_scheduler/utils.py
Exhorder6/tvm
7e3f068373937c0ae08d58f67b84030a027db1c9
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
90
2019-01-26T00:38:49.000Z
2022-03-11T23:12:34.000Z
python/tvm/auto_scheduler/utils.py
Exhorder6/tvm
7e3f068373937c0ae08d58f67b84030a027db1c9
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
91
2019-02-27T00:17:01.000Z
2022-02-21T18:08:21.000Z
python/tvm/auto_scheduler/utils.py
Exhorder6/tvm
7e3f068373937c0ae08d58f67b84030a027db1c9
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
41
2019-01-28T14:37:03.000Z
2022-03-31T03:58:57.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
28.339367
98
0.634201
from typing import Hashable import json import multiprocessing import multiprocessing.pool import queue import signal import threading import traceback import os import numpy as np try: import psutil except ImportError: psutil = None import tvm from tvm import rpc from tvm.tir import expr from tvm.tir.tran...
true
true
1c034996209be2faa9c036919ac47c71e40986da
48,408
py
Python
pyocd/coresight/ap.py
claymation/pyOCD
7f1db3b64c16e54a791421cdf4946418f13848ff
[ "Apache-2.0" ]
276
2020-09-30T16:43:24.000Z
2022-03-27T09:52:01.000Z
pyocd/coresight/ap.py
claymation/pyOCD
7f1db3b64c16e54a791421cdf4946418f13848ff
[ "Apache-2.0" ]
282
2020-10-02T17:45:29.000Z
2022-03-31T10:37:30.000Z
pyocd/coresight/ap.py
claymation/pyOCD
7f1db3b64c16e54a791421cdf4946418f13848ff
[ "Apache-2.0" ]
106
2020-10-01T10:06:44.000Z
2022-03-29T10:06:06.000Z
# pyOCD debugger # Copyright (c) 2015-2020 Arm Limited # Copyright (c) 2021 Chris Reed # SPDX-License-Identifier: Apache-2.0 # # 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...
40.474916
130
0.626901
import logging from contextlib import contextmanager from functools import total_ordering from enum import Enum from ..core import (exceptions, memory_interface) from ..core.target import Target from ..utility.concurrency import locked LOG = logging.getLogger(__name__) TRACE = LOG.getChild("trace") TRACE.setLevel(l...
true
true
1c0349b7245d61766580eb80ac5ac7b85af303cc
6,284
py
Python
auditbeat/scripts/docs_collector.py
IzekChen/beats
0e52267c104181eb4c4422a4d939f68c9e994ced
[ "ECL-2.0", "Apache-2.0" ]
8
2019-01-14T14:49:09.000Z
2020-07-24T18:32:06.000Z
auditbeat/scripts/docs_collector.py
IzekChen/beats
0e52267c104181eb4c4422a4d939f68c9e994ced
[ "ECL-2.0", "Apache-2.0" ]
1
2019-11-26T22:32:53.000Z
2019-11-28T03:11:30.000Z
auditbeat/scripts/docs_collector.py
IzekChen/beats
0e52267c104181eb4c4422a4d939f68c9e994ced
[ "ECL-2.0", "Apache-2.0" ]
1
2019-09-01T05:47:58.000Z
2019-09-01T05:47:58.000Z
import os import argparse import yaml import six # Collects docs for all modules and metricset def collect(base_paths): # Always use the auditbeat/docs/ directory, regardless # of where this script was called from. docs_path = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir, "docs")) be...
33.604278
120
0.60487
import os import argparse import yaml import six def collect(base_paths): docs_path = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir, "docs")) beat_name = os.path.basename(base_paths[0]) generated_note = """//// This file is generated! See scripts/docs_collector.py //// """ ...
true
true
1c034a6d99e50fe9048946009866476afc1a5b00
402
py
Python
0901-1000/0954-Array of Doubled Pairs/0954-Array of Doubled Pairs.py
jiadaizhao/LeetCode
4ddea0a532fe7c5d053ffbd6870174ec99fc2d60
[ "MIT" ]
49
2018-05-05T02:53:10.000Z
2022-03-30T12:08:09.000Z
0901-1000/0954-Array of Doubled Pairs/0954-Array of Doubled Pairs.py
jolly-fellow/LeetCode
ab20b3ec137ed05fad1edda1c30db04ab355486f
[ "MIT" ]
11
2017-12-15T22:31:44.000Z
2020-10-02T12:42:49.000Z
0901-1000/0954-Array of Doubled Pairs/0954-Array of Doubled Pairs.py
jolly-fellow/LeetCode
ab20b3ec137ed05fad1edda1c30db04ab355486f
[ "MIT" ]
28
2017-12-05T10:56:51.000Z
2022-01-26T18:18:27.000Z
import collections class Solution: def canReorderDoubled(self, A): """ :type A: List[int] :rtype: bool """ table = collections.Counter(A) keys = list(table.keys()) keys.sort(key=abs) for key in keys: if table[key] > table[key * 2]: ...
25.125
43
0.497512
import collections class Solution: def canReorderDoubled(self, A): table = collections.Counter(A) keys = list(table.keys()) keys.sort(key=abs) for key in keys: if table[key] > table[key * 2]: return False table[key * 2] -= table[key] re...
true
true
1c034b4e3768d84ec56f5a7a620e8f456786a1cb
2,097
py
Python
nn_meter/dataset/bench_dataset.py
JiahangXu/nn-Meter
c11b8223ecf8b5ba881528071a8ae18df80584ba
[ "MIT" ]
null
null
null
nn_meter/dataset/bench_dataset.py
JiahangXu/nn-Meter
c11b8223ecf8b5ba881528071a8ae18df80584ba
[ "MIT" ]
null
null
null
nn_meter/dataset/bench_dataset.py
JiahangXu/nn-Meter
c11b8223ecf8b5ba881528071a8ae18df80584ba
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os, sys from nn_meter.prediction import latency_metrics from glob import glob from nn_meter.nn_meter import list_latency_predictors, load_latency_predictor, get_user_data_folder from nn_meter import download_from_url import jsonlines impor...
39.566038
103
0.615165
import os, sys from nn_meter.prediction import latency_metrics from glob import glob from nn_meter.nn_meter import list_latency_predictors, load_latency_predictor, get_user_data_folder from nn_meter import download_from_url import jsonlines import logging __user_dataset_folder__ = os.path.join(get_user_data_folder()...
true
true
1c034b84e089a15907e5b95ca47db0e05fb479e2
752
py
Python
recipes/opencv/4.x/test_package/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
1
2021-11-11T03:07:13.000Z
2021-11-11T03:07:13.000Z
recipes/opencv/4.x/test_package/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
1
2021-11-22T13:54:48.000Z
2021-11-22T14:09:45.000Z
recipes/opencv/4.x/test_package/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
null
null
null
from conans import ConanFile, CMake, tools import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" def build(self): cmake = CMake(self) cmake.definitions["built_with_ade"] = self.options["opencv"].with...
35.809524
118
0.670213
from conans import ConanFile, CMake, tools import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" def build(self): cmake = CMake(self) cmake.definitions["built_with_ade"] = self.options["opencv"].with...
true
true
1c034bf247652a1b1e1a094c16f49453ceb53d4c
949
py
Python
delete-cell-english/MainPage.py
yr-github/excel-common-operations
0dedcf0cdcf8beaa206cd9d2bf753ea6833d7db7
[ "MIT" ]
null
null
null
delete-cell-english/MainPage.py
yr-github/excel-common-operations
0dedcf0cdcf8beaa206cd9d2bf753ea6833d7db7
[ "MIT" ]
null
null
null
delete-cell-english/MainPage.py
yr-github/excel-common-operations
0dedcf0cdcf8beaa206cd9d2bf753ea6833d7db7
[ "MIT" ]
null
null
null
import ReadConfigClass import PretreatmentClass import DeleteEnglishClass import TranslationByHistoryClass import os if __name__ == '__main__': rd_conf_obj = ReadConfigClass.ReadConfigClass(os.getcwd()+"\\config.ini") pretreatment_obj = PretreatmentClass.PretreatmentClass(rd_conf_obj.get_work_path()) file...
41.26087
118
0.689146
import ReadConfigClass import PretreatmentClass import DeleteEnglishClass import TranslationByHistoryClass import os if __name__ == '__main__': rd_conf_obj = ReadConfigClass.ReadConfigClass(os.getcwd()+"\\config.ini") pretreatment_obj = PretreatmentClass.PretreatmentClass(rd_conf_obj.get_work_path()) file...
true
true
1c034ca314579cac386c142e921a8a3059c58a8f
4,027
py
Python
Semantik/project/word_overlap_clustering.py
lyubadimitrova/cl-classes
00cb100a7b3aeb50c21c235710f3a73905fd5a77
[ "MIT" ]
null
null
null
Semantik/project/word_overlap_clustering.py
lyubadimitrova/cl-classes
00cb100a7b3aeb50c21c235710f3a73905fd5a77
[ "MIT" ]
null
null
null
Semantik/project/word_overlap_clustering.py
lyubadimitrova/cl-classes
00cb100a7b3aeb50c21c235710f3a73905fd5a77
[ "MIT" ]
null
null
null
import bag_of_wording import argparse from collections import Iterable, OrderedDict def find_most_similar(bags_of_words): biggest_overlap = [0, (0, 0)] keys = list(bags_of_words) for i in range(len(keys) - 1): for j in range(i + 1, len(keys)): seq1 = bags_of_words[...
37.635514
186
0.605662
import bag_of_wording import argparse from collections import Iterable, OrderedDict def find_most_similar(bags_of_words): biggest_overlap = [0, (0, 0)] keys = list(bags_of_words) for i in range(len(keys) - 1): for j in range(i + 1, len(keys)): seq1 = bags_of_words[...
true
true
1c034e1c175da4ac7651cc3716fff8c451340415
1,271
py
Python
dags/infra/variables.py
digitalearthafrica/deafrica-airflow
2993495671dbf3a6f2dd08dd23c44adcee330493
[ "Apache-2.0" ]
1
2020-12-08T21:38:02.000Z
2020-12-08T21:38:02.000Z
dags/infra/variables.py
digitalearthafrica/deafrica-airflow
2993495671dbf3a6f2dd08dd23c44adcee330493
[ "Apache-2.0" ]
31
2020-06-01T22:55:43.000Z
2021-08-18T01:03:39.000Z
dags/infra/variables.py
digitalearthafrica/deafrica-airflow
2993495671dbf3a6f2dd08dd23c44adcee330493
[ "Apache-2.0" ]
2
2020-06-01T23:28:37.000Z
2021-02-26T05:44:52.000Z
""" # Variables provided from infra to dags # audit: 11/05/2021 """ from airflow.models import Variable REGION = Variable.get("region", "af-south-1") INDEXING_FROM_SQS_USER_SECRET = Variable.get("indexing_from_sqs_user_secret", "indexing-user-creds-dev") ODC_ADMIN_USER_SECRET = Variable.get("odc_admin_user_secret", "o...
42.366667
104
0.779701
from airflow.models import Variable REGION = Variable.get("region", "af-south-1") INDEXING_FROM_SQS_USER_SECRET = Variable.get("indexing_from_sqs_user_secret", "indexing-user-creds-dev") ODC_ADMIN_USER_SECRET = Variable.get("odc_admin_user_secret", "odc-admin-user-creds") DB_DATABASE = Variable.get("db_database", "od...
true
true
1c034e89ed6b292554a53f01db145989f4e76df7
3,716
py
Python
app.py
aditibsharma/Localwork_project3
a9cec0cd8eca5b25a696b82b360357923459a316
[ "Unlicense" ]
null
null
null
app.py
aditibsharma/Localwork_project3
a9cec0cd8eca5b25a696b82b360357923459a316
[ "Unlicense" ]
null
null
null
app.py
aditibsharma/Localwork_project3
a9cec0cd8eca5b25a696b82b360357923459a316
[ "Unlicense" ]
null
null
null
# import necessary libraries import os import numpy as np import pandas as pd from flask import ( Flask, render_template, jsonify, request, redirect, url_for) from config import config from werkzeug.utils import secure_filename from flask import send_from_directory #sys.path.insert(0, './db') f...
29.492063
101
0.586114
import os import numpy as np import pandas as pd from flask import ( Flask, render_template, jsonify, request, redirect, url_for) from config import config from werkzeug.utils import secure_filename from flask import send_from_directory from db.analysis import fx_analysis, fx_result app = Flas...
true
true
1c0350331dd7e73e16c04aa7596ef15da4a517d9
558
py
Python
tests/kyu_7_tests/test_what_dominates_your_array.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
tests/kyu_7_tests/test_what_dominates_your_array.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
tests/kyu_7_tests/test_what_dominates_your_array.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
import unittest from katas.kyu_7.what_dominates_your_array import dominator class DominatorTestCase(unittest.TestCase): def test_equals(self): self.assertEqual(dominator([3, 4, 3, 2, 3, 1, 3, 3]), 3) def test_equals_2(self): self.assertEqual(dominator([1, 2, 3, 4, 5]), -1) def test_equa...
26.571429
64
0.636201
import unittest from katas.kyu_7.what_dominates_your_array import dominator class DominatorTestCase(unittest.TestCase): def test_equals(self): self.assertEqual(dominator([3, 4, 3, 2, 3, 1, 3, 3]), 3) def test_equals_2(self): self.assertEqual(dominator([1, 2, 3, 4, 5]), -1) def test_equa...
true
true
1c0351e941092cb4e97cc1f8790e432ae7848183
105
py
Python
lesson2/homework/Task3.py
shkutaa/teache_me_skills
e4ac5292ca391b01c09f427f65cd7251d218cf7d
[ "MIT" ]
null
null
null
lesson2/homework/Task3.py
shkutaa/teache_me_skills
e4ac5292ca391b01c09f427f65cd7251d218cf7d
[ "MIT" ]
null
null
null
lesson2/homework/Task3.py
shkutaa/teache_me_skills
e4ac5292ca391b01c09f427f65cd7251d218cf7d
[ "MIT" ]
null
null
null
phrase = 'Hello world' a = list(phrase) var = a[0:5] b = "".join(var) print (b) print(type(b) == str)
10.5
22
0.571429
phrase = 'Hello world' a = list(phrase) var = a[0:5] b = "".join(var) print (b) print(type(b) == str)
true
true
1c035272ce7ab46d10a2e1e79eb390436647d4cd
2,273
py
Python
appengine/bigquery/main.py
117null/python-docs-samples
c77d0cf5ac860d37e6c7ffb38a089f54f6ec3aaa
[ "Apache-2.0" ]
2
2017-09-23T04:23:46.000Z
2021-06-11T01:23:06.000Z
appengine/standard/bigquery/main.py
DalavanCloud/python-docs-samples
439ca4c552940284743f5f22a590cc4b6dae1bef
[ "Apache-2.0" ]
2
2021-06-10T23:54:32.000Z
2021-06-10T23:54:33.000Z
appengine/standard/bigquery/main.py
DalavanCloud/python-docs-samples
439ca4c552940284743f5f22a590cc4b6dae1bef
[ "Apache-2.0" ]
1
2018-09-24T04:53:12.000Z
2018-09-24T04:53:12.000Z
# Copyright 2015 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 required by applicable law or a...
32.942029
78
0.710955
import json import os from googleapiclient.discovery import build from oauth2client.appengine import OAuth2DecoratorFromClientSecrets import webapp2 PROJECTID = '<your-project-id>' # Create the method decorator for oauth. decorator = OAuth2DecoratorFromClientSecrets( os.path.join(os.path.dirname(__file__), '...
true
true
1c0352895c0274abcb162980c38689e542d094bc
303
py
Python
example/example_CMA_ES.py
Basvanstein/MIP-EGO
e1ed0b0ea020850c72c4de5efd5dda0a99de571f
[ "MIT" ]
23
2018-07-20T17:22:28.000Z
2022-02-23T15:41:30.000Z
example/example_CMA_ES.py
Basvanstein/MIP-EGO
e1ed0b0ea020850c72c4de5efd5dda0a99de571f
[ "MIT" ]
5
2019-03-05T22:09:13.000Z
2021-10-08T08:48:43.000Z
example/example_CMA_ES.py
Basvanstein/MIP-EGO
e1ed0b0ea020850c72c4de5efd5dda0a99de571f
[ "MIT" ]
14
2018-05-15T21:47:57.000Z
2021-12-07T02:04:38.000Z
import sys import numpy as np sys.path.insert(0, '../') from BayesOpt.optimizer import OnePlusOne_CMA, OnePlusOne_Cholesky_CMA def obj_fun(x): return np.sum(x ** 2) opt = OnePlusOne_Cholesky_CMA( 2, obj_fun, lb=-5, ub=5, sigma0=0.2, ftarget=1e-8, verbose=True ) opt.run() print(opt.stop_dict)
21.642857
70
0.719472
import sys import numpy as np sys.path.insert(0, '../') from BayesOpt.optimizer import OnePlusOne_CMA, OnePlusOne_Cholesky_CMA def obj_fun(x): return np.sum(x ** 2) opt = OnePlusOne_Cholesky_CMA( 2, obj_fun, lb=-5, ub=5, sigma0=0.2, ftarget=1e-8, verbose=True ) opt.run() print(opt.stop_dict)
true
true
1c0352e5c958691c9f096724f93dd83a3e84eb79
1,699
py
Python
PyBank/main.py
jhills5821/python-challenge
8b2dda15a503771c938a23ad5bdcad331d34e958
[ "MIT" ]
null
null
null
PyBank/main.py
jhills5821/python-challenge
8b2dda15a503771c938a23ad5bdcad331d34e958
[ "MIT" ]
null
null
null
PyBank/main.py
jhills5821/python-challenge
8b2dda15a503771c938a23ad5bdcad331d34e958
[ "MIT" ]
null
null
null
import os import csv months = [] pnls=[] changes = [] losstest = 0 profittest = 0 bank_csv_path = os.path.join(".", "Input File", "02-Homework_03-Python_Instructions_PyBank_Resources_budget_data.csv") with open(bank_csv_path, newline="") as csvfile: csv_read = csv.reader(csvfile, delimiter=",") csv_header =...
35.395833
118
0.628016
import os import csv months = [] pnls=[] changes = [] losstest = 0 profittest = 0 bank_csv_path = os.path.join(".", "Input File", "02-Homework_03-Python_Instructions_PyBank_Resources_budget_data.csv") with open(bank_csv_path, newline="") as csvfile: csv_read = csv.reader(csvfile, delimiter=",") csv_header =...
true
true
1c035397e891c75a6d7ef3abcbd079066660c4b0
150
py
Python
routelift_api/Logistics/apps.py
BitMask-Technologies/route-lift-api
7ac78c6cce523fc5a3852dca7b289fe3a5f3afa8
[ "MIT" ]
null
null
null
routelift_api/Logistics/apps.py
BitMask-Technologies/route-lift-api
7ac78c6cce523fc5a3852dca7b289fe3a5f3afa8
[ "MIT" ]
7
2021-06-24T16:12:09.000Z
2021-08-05T16:09:22.000Z
routelift_api/Logistics/apps.py
BitMask-Technologies/route-lift-api
7ac78c6cce523fc5a3852dca7b289fe3a5f3afa8
[ "MIT" ]
null
null
null
from django.apps import AppConfig class LogisticsConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'Logistics'
21.428571
56
0.766667
from django.apps import AppConfig class LogisticsConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'Logistics'
true
true
1c0353c2cf5fbd512b6dc28d211fe68dcd6555aa
8,539
py
Python
jax/abstract_arrays.py
michiboo/jax
7083b0a78edd8f2e88abe3f395ee0f51ac915082
[ "ECL-2.0", "Apache-2.0" ]
1
2020-07-09T18:19:14.000Z
2020-07-09T18:19:14.000Z
jax/abstract_arrays.py
michiboo/jax
7083b0a78edd8f2e88abe3f395ee0f51ac915082
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/abstract_arrays.py
michiboo/jax
7083b0a78edd8f2e88abe3f395ee0f51ac915082
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.842308
80
0.705001
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as onp import six from . import core from . import ad_util from . import dtypes from . util import prod, partialmethod def concretization_err_msg(fun): fname = getattr(fun, "__name__", fun) ...
true
true
1c0355475b80e286969753ea36d76f4c3c2141e1
20
py
Python
mocking/__init__.py
spradeepv/dive-into-python
ec27d4686b7b007d21f9ba4f85d042be31ee2639
[ "MIT" ]
null
null
null
mocking/__init__.py
spradeepv/dive-into-python
ec27d4686b7b007d21f9ba4f85d042be31ee2639
[ "MIT" ]
null
null
null
mocking/__init__.py
spradeepv/dive-into-python
ec27d4686b7b007d21f9ba4f85d042be31ee2639
[ "MIT" ]
null
null
null
__author__ = 'dell'
10
19
0.7
__author__ = 'dell'
true
true
1c03562782a2e23b66da04aabbaea70d9cdfb4a9
3,413
py
Python
rllib/agents/ddpg/tests/test_td3.py
PidgeyBE/ray
7a2d7964d8f944bd60c1f03d58d6cc190c7a7015
[ "Apache-2.0" ]
null
null
null
rllib/agents/ddpg/tests/test_td3.py
PidgeyBE/ray
7a2d7964d8f944bd60c1f03d58d6cc190c7a7015
[ "Apache-2.0" ]
null
null
null
rllib/agents/ddpg/tests/test_td3.py
PidgeyBE/ray
7a2d7964d8f944bd60c1f03d58d6cc190c7a7015
[ "Apache-2.0" ]
null
null
null
import numpy as np import unittest import ray.rllib.agents.ddpg.td3 as td3 from ray.rllib.utils.framework import try_import_tf from ray.rllib.utils.test_utils import check, check_compute_single_action, \ framework_iterator tf1, tf, tfv = try_import_tf() class TestTD3(unittest.TestCase): def test_td3_compila...
40.152941
78
0.592148
import numpy as np import unittest import ray.rllib.agents.ddpg.td3 as td3 from ray.rllib.utils.framework import try_import_tf from ray.rllib.utils.test_utils import check, check_compute_single_action, \ framework_iterator tf1, tf, tfv = try_import_tf() class TestTD3(unittest.TestCase): def test_td3_compila...
true
true
1c03569d2b6fe2e48970d12a1eef66fa9cfeeb47
15,528
py
Python
RL/AgentNetwork.py
zhangtjtongxue/DL_RL_Zoo
fe8393a941a8c22205b9dc5534f399cf7860f409
[ "Apache-2.0" ]
1
2021-06-08T08:20:31.000Z
2021-06-08T08:20:31.000Z
RL/AgentNetwork.py
zhangtjtongxue/DL_RL_Zoo
fe8393a941a8c22205b9dc5534f399cf7860f409
[ "Apache-2.0" ]
null
null
null
RL/AgentNetwork.py
zhangtjtongxue/DL_RL_Zoo
fe8393a941a8c22205b9dc5534f399cf7860f409
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn # import torch.nn.functional as F import numpy as np # import numpy.random as rd """ 2019-07-01 ZenJiaHao, GitHub: YonV1943 DL_RL_Zoo RL 2019-11-11 Issay-0.0 [Essay Consciousness] 2020-02-02 Issay-0.1 Deep Learning Techniques (spectral norm, DenseNet, etc.) 2020-04-04 Issay-0.1 [A...
37.326923
109
0.60027
import torch import torch.nn as nn import numpy as np class ActorCritic(nn.Module): def __init__(self, state_dim, action_dim, mid_dim, use_densenet): super(ActorCritic, self).__init__() self.enc_s = nn.Sequential( nn.Linear(state_dim, mid_dim), nn.ReLU(), nn.Linear(mid_...
true
true
1c03569f42692e8864a61429d2959eecdbb1fc26
3,596
py
Python
genomics_data_index/test/integration/api/query/test_TreeBuilderReferenceMutations.py
apetkau/genomics-data-index
d0cc119fd57b8cbd701affb1c84450cf7832fa01
[ "Apache-2.0" ]
12
2021-05-03T20:56:05.000Z
2022-01-04T14:52:19.000Z
genomics_data_index/test/integration/api/query/test_TreeBuilderReferenceMutations.py
apetkau/thesis-index
6c96e9ed75d8e661437effe62a939727a0b473fc
[ "Apache-2.0" ]
30
2021-04-26T23:03:40.000Z
2022-02-25T18:41:14.000Z
genomics_data_index/test/integration/api/query/test_TreeBuilderReferenceMutations.py
apetkau/genomics-data-index
d0cc119fd57b8cbd701affb1c84450cf7832fa01
[ "Apache-2.0" ]
null
null
null
from ete3 import Tree from genomics_data_index.api.query.impl.TreeBuilderReferenceMutations import TreeBuilderReferenceMutations from genomics_data_index.test.integration import tree_file expected_tree = Tree(str(tree_file)) def test_build_tree(loaded_database_connection): tree_builder = TreeBuilderReferenceMut...
52.115942
111
0.517519
from ete3 import Tree from genomics_data_index.api.query.impl.TreeBuilderReferenceMutations import TreeBuilderReferenceMutations from genomics_data_index.test.integration import tree_file expected_tree = Tree(str(tree_file)) def test_build_tree(loaded_database_connection): tree_builder = TreeBuilderReferenceMut...
true
true
1c03578aa4bed29f1a1af33dd51abf3fe4badf53
1,708
py
Python
benchmark/startPyquil2414.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startPyquil2414.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startPyquil2414.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=32 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += X(3) # number=1 prog ...
24.753623
64
0.568501
import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() prog += X(3) prog += H(0) prog += X(1) prog += CZ(3,0) prog += H(2) ...
true
true
1c0357c6b1870ed030f7964afa106d21269f10f7
9,964
py
Python
Lambda Code/EC2/Final.py
blitz-cmd/Boto3
203b75e3d8aa8c90340bd55d598b6d1b4f473dcd
[ "Apache-2.0" ]
null
null
null
Lambda Code/EC2/Final.py
blitz-cmd/Boto3
203b75e3d8aa8c90340bd55d598b6d1b4f473dcd
[ "Apache-2.0" ]
null
null
null
Lambda Code/EC2/Final.py
blitz-cmd/Boto3
203b75e3d8aa8c90340bd55d598b6d1b4f473dcd
[ "Apache-2.0" ]
null
null
null
import json import boto3 from botocore.exceptions import ClientError import urllib3 region = 'us-east-1' def lambda_handler(event, context): try: dictionary={} service=0 ec2 = boto3.client('ec2', region_name=region) ec2_response = ec2.describe_instances() instances_full_deta...
48.843137
133
0.42774
import json import boto3 from botocore.exceptions import ClientError import urllib3 region = 'us-east-1' def lambda_handler(event, context): try: dictionary={} service=0 ec2 = boto3.client('ec2', region_name=region) ec2_response = ec2.describe_instances() instances_full_deta...
true
true
1c0357ccf3406d85b688961b7f1477320df10a5d
2,640
py
Python
utils/fetch_dataset.py
diandianti/MaskTheFace
caf4d6ca2328f6f97c5f1947db4f03b3197fb62a
[ "MIT" ]
408
2020-08-26T02:09:04.000Z
2022-03-29T04:53:27.000Z
mask_module/mask_function/fetch_dataset.py
Tamminhdiep97/auto_maskface
9178dabc138e105a2e35dc930e858e0cce69f5ca
[ "MIT" ]
22
2020-08-31T16:32:25.000Z
2022-03-09T08:23:10.000Z
mask_module/mask_function/fetch_dataset.py
Tamminhdiep97/auto_maskface
9178dabc138e105a2e35dc930e858e0cce69f5ca
[ "MIT" ]
125
2020-08-26T08:19:43.000Z
2022-03-25T07:08:48.000Z
# Author: Aqeel Anwar(ICSRL) # Created: 7/30/2020, 1:44 PM # Email: aqeel.anwar@gatech.edu # Code resued from https://stackoverflow.com/questions/38511444/python-download-files-from-google-drive-using-url # Make sure you run this from parent folder and not from utils folder i.e. # python utils/fetch_dataset.py import...
28.387097
113
0.675758
import requests, os from zipfile import ZipFile import argparse import urllib parser = argparse.ArgumentParser( description="Download dataset - Python code to download associated datasets" ) parser.add_argument( "--dataset", type=str, default="mfr2", help="Name of the dataset - Details on availab...
true
true
1c035ace3a6b0311e5eef41819732d74d638b619
3,957
py
Python
stream_framework/tests/serializers.py
amitpatra/Stream-Framework
2c40d537fc5a8b3d721060f33b817fb0ca5ec2ee
[ "BSD-3-Clause" ]
null
null
null
stream_framework/tests/serializers.py
amitpatra/Stream-Framework
2c40d537fc5a8b3d721060f33b817fb0ca5ec2ee
[ "BSD-3-Clause" ]
2
2021-04-13T15:47:56.000Z
2021-12-02T17:57:00.000Z
stream_framework/tests/serializers.py
amitpatra/Stream-Framework
2c40d537fc5a8b3d721060f33b817fb0ca5ec2ee
[ "BSD-3-Clause" ]
null
null
null
from stream_framework.aggregators.base import RecentVerbAggregator from stream_framework.serializers.activity_serializer import ActivitySerializer from stream_framework.serializers.aggregated_activity_serializer import \ AggregatedActivitySerializer, NotificationSerializer from stream_framework.serializers.base imp...
43.01087
110
0.785949
from stream_framework.aggregators.base import RecentVerbAggregator from stream_framework.serializers.activity_serializer import ActivitySerializer from stream_framework.serializers.aggregated_activity_serializer import \ AggregatedActivitySerializer, NotificationSerializer from stream_framework.serializers.base imp...
true
true
1c035b81d4c6e999e553a7bfbf23ff21245c7f07
32,794
py
Python
pydevices/RfxDevices/CAENV1740.py
fluffynukeit/mdsplus
a204d2e9d26554bb035945595210f2a57d187250
[ "BSD-2-Clause" ]
53
2015-01-05T08:55:13.000Z
2022-03-30T07:43:41.000Z
pydevices/RfxDevices/CAENV1740.py
fluffynukeit/mdsplus
a204d2e9d26554bb035945595210f2a57d187250
[ "BSD-2-Clause" ]
1,231
2015-02-02T18:54:02.000Z
2022-03-30T08:27:45.000Z
pydevices/RfxDevices/CAENV1740.py
fluffynukeit/mdsplus
a204d2e9d26554bb035945595210f2a57d187250
[ "BSD-2-Clause" ]
44
2015-05-24T20:18:06.000Z
2022-02-07T13:51:04.000Z
# # Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list o...
54.294702
198
0.493718
from MDSplus import Signal, Data, Dimension, Window, Range, Device from MDSplus import mdsExceptions, Int32, Int16Array, Float64Array, Float64 from ctypes import CDLL, c_int, c_short, c_long, byref, Structure from time import sleep class CAENV1740(Device): caenLib = None cvV1718 = 0 c...
true
true
1c035e0a2116f2c2fdeea29cffd5e6c3218db07e
1,446
py
Python
Src/Evaluator.py
denisuzhva/ML_task2
49220c370256be66a7e3eb98ae069259aa2f48fc
[ "MIT" ]
null
null
null
Src/Evaluator.py
denisuzhva/ML_task2
49220c370256be66a7e3eb98ae069259aa2f48fc
[ "MIT" ]
null
null
null
Src/Evaluator.py
denisuzhva/ML_task2
49220c370256be66a7e3eb98ae069259aa2f48fc
[ "MIT" ]
null
null
null
import numpy as np def mseMetric(fx_batch, z_batch): batch_size = fx_batch.shape[0] metric = np.sum(np.square(z_batch - fx_batch)) / batch_size return metric def rmseMetric(fx_batch, z_batch): batch_size = fx_batch.shape[0] metric = np.sum(np.square(z_batch - fx_batch)) / batch_size...
30.765957
91
0.67704
import numpy as np def mseMetric(fx_batch, z_batch): batch_size = fx_batch.shape[0] metric = np.sum(np.square(z_batch - fx_batch)) / batch_size return metric def rmseMetric(fx_batch, z_batch): batch_size = fx_batch.shape[0] metric = np.sum(np.square(z_batch - fx_batch)) / batch_size...
true
true
1c035e10fec098ca736dbd5faa38c28fd505fde9
12,393
py
Python
examples/linear_elasticity/modal_analysis.py
clazaro/sfepy
78757a6989d6aaf85a3fb27957b9179c5e2aa2c7
[ "BSD-3-Clause" ]
null
null
null
examples/linear_elasticity/modal_analysis.py
clazaro/sfepy
78757a6989d6aaf85a3fb27957b9179c5e2aa2c7
[ "BSD-3-Clause" ]
null
null
null
examples/linear_elasticity/modal_analysis.py
clazaro/sfepy
78757a6989d6aaf85a3fb27957b9179c5e2aa2c7
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Modal analysis of a linear elastic block in 2D or 3D. The dimension of the problem is determined by the length of the vector in ``--dims`` option. Optionally, a mesh file name can be given as a positional argument. In that case, the mesh generation options are ignored. The default material ...
38.487578
114
0.588316
from __future__ import absolute_import import sys import six from six.moves import range sys.path.append('.') from argparse import ArgumentParser, RawDescriptionHelpFormatter import numpy as nm import scipy.sparse.linalg as sla from sfepy.base.base import assert_, output, Struct from sfepy.discrete import (FieldVaria...
true
true
1c035e20862127a3a395e249599b70a39ca2d72a
6,481
py
Python
cookiecutter_project_upgrader/logic.py
bitdivision/cookiecutter_project_upgrader
05c8aaa0996603fc8c6fb39db831701ad7a3b833
[ "MIT" ]
1
2020-07-07T05:57:01.000Z
2020-07-07T05:57:01.000Z
cookiecutter_project_upgrader/logic.py
bitdivision/cookiecutter_project_upgrader
05c8aaa0996603fc8c6fb39db831701ad7a3b833
[ "MIT" ]
null
null
null
cookiecutter_project_upgrader/logic.py
bitdivision/cookiecutter_project_upgrader
05c8aaa0996603fc8c6fb39db831701ad7a3b833
[ "MIT" ]
1
2020-03-22T09:54:51.000Z
2020-03-22T09:54:51.000Z
import os import shutil import subprocess import sys from pathlib import Path from typing import MutableMapping, Optional import click from click import ClickException from cookiecutter.main import cookiecutter class _TemporaryGitWorktreeDirectory: """Context Manager for a temporary working directory of a branch...
46.963768
115
0.586484
import os import shutil import subprocess import sys from pathlib import Path from typing import MutableMapping, Optional import click from click import ClickException from cookiecutter.main import cookiecutter class _TemporaryGitWorktreeDirectory: def __init__(self, path: str, repo: str, branch: str = 'master'...
true
true
1c035ec294d6c739732619ee3ff681f9ed05f2c6
240
py
Python
ex33.py
khaingkhainghtwe/python-exercise
cf7aa967e6b167b9f2683fff694e50fb9cf76ef5
[ "MIT" ]
null
null
null
ex33.py
khaingkhainghtwe/python-exercise
cf7aa967e6b167b9f2683fff694e50fb9cf76ef5
[ "MIT" ]
null
null
null
ex33.py
khaingkhainghtwe/python-exercise
cf7aa967e6b167b9f2683fff694e50fb9cf76ef5
[ "MIT" ]
null
null
null
i = 0 numbers = [] while i < 6: print(f"At the top i is {i}") numbers.append(i) i = i + 1 print("Numbers now: ", numbers) print(f"At the bottom i is {i}") print("The numbers: ") for num in numbers: print(num)
12.631579
36
0.55
i = 0 numbers = [] while i < 6: print(f"At the top i is {i}") numbers.append(i) i = i + 1 print("Numbers now: ", numbers) print(f"At the bottom i is {i}") print("The numbers: ") for num in numbers: print(num)
true
true
1c035fa2911c54e5dd698fcfc17a23d1d7a563ba
17,087
py
Python
electrumsv/devices/keepkey/keepkey.py
rt121212121/electrumsv
3412bbacd3fdacc30c5497586c675430c4f8f6cc
[ "MIT" ]
null
null
null
electrumsv/devices/keepkey/keepkey.py
rt121212121/electrumsv
3412bbacd3fdacc30c5497586c675430c4f8f6cc
[ "MIT" ]
null
null
null
electrumsv/devices/keepkey/keepkey.py
rt121212121/electrumsv
3412bbacd3fdacc30c5497586c675430c4f8f6cc
[ "MIT" ]
null
null
null
# ElectrumSV - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # Copyright (C) 2019 ElectrumSV developers # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction...
41.982801
99
0.58764
from binascii import hexlify, unhexlify import threading from electrumsv.app_state import app_state from electrumsv.bip32 import xpub_from_pubkey from electrumsv.bitcoin import TYPE_ADDRESS, TYPE_SCRIPT from electrumsv.i18n import _ from electrumsv.keystore import Hardware_KeyStore, is_xpubkey, parse_xpubkey from ele...
true
true
1c03601873afd010269bcb228c80e6c664afba30
926
py
Python
io_EDM/__init__.py
ST6Daniel/Blender_ioEDM
6452297ee8d7265ab04c1bba9f83b530408ca61b
[ "MIT" ]
33
2017-01-10T02:37:42.000Z
2022-03-17T02:08:24.000Z
io_EDM/__init__.py
ST6Daniel/Blender_ioEDM
6452297ee8d7265ab04c1bba9f83b530408ca61b
[ "MIT" ]
12
2016-12-14T21:17:51.000Z
2022-01-22T22:47:09.000Z
io_EDM/__init__.py
ST6Daniel/Blender_ioEDM
6452297ee8d7265ab04c1bba9f83b530408ca61b
[ "MIT" ]
25
2016-12-04T18:37:30.000Z
2022-03-29T03:49:33.000Z
bl_info = { 'name': "Import: .EDM model files", 'description': "Importing of .EDM model files", 'author': "Nicholas Devenish", 'version': (0,3,0), 'blender': (2, 78, 0), 'location': "File > Import/Export > .EDM Files", 'category': 'Import-Export', } try: import bpy def register(): from .io_oper...
26.457143
66
0.699784
bl_info = { 'name': "Import: .EDM model files", 'description': "Importing of .EDM model files", 'author': "Nicholas Devenish", 'version': (0,3,0), 'blender': (2, 78, 0), 'location': "File > Import/Export > .EDM Files", 'category': 'Import-Export', } try: import bpy def register(): from .io_oper...
true
true
1c036140a28d04db2318eddf06edb9c87e6eeff2
7,954
py
Python
generate.py
Corie96/fairseq-dev
24be7a63db5de078f81487544385feb51aea9453
[ "BSD-3-Clause" ]
null
null
null
generate.py
Corie96/fairseq-dev
24be7a63db5de078f81487544385feb51aea9453
[ "BSD-3-Clause" ]
null
null
null
generate.py
Corie96/fairseq-dev
24be7a63db5de078f81487544385feb51aea9453
[ "BSD-3-Clause" ]
1
2020-03-12T02:29:22.000Z
2020-03-12T02:29:22.000Z
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Trans...
39.77
107
0.577445
import os import torch from fairseq import bleu, checkpoint_utils, options, progress_bar, tasks, utils from fairseq.meters import StopwatchMeter, TimeMeter def main(args): assert args.path is not None, '--path required for generation!' assert not args.sampling or args.nbest == args.beam, \ '--sampli...
true
true
1c03615f8bb320ae47951af5625dbdf2ceb2a9b1
1,288
py
Python
lib/django-1.3/django/conf/locale/cs/formats.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
django/conf/locale/cs/formats.py
mradziej/django
5d38965743a369981c9a738a298f467f854a2919
[ "BSD-3-Clause" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
django/conf/locale/cs/formats.py
mradziej/django
5d38965743a369981c9a738a298f467f854a2919
[ "BSD-3-Clause" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G:i:s' DATETIME_FORMAT = 'j. E Y G:i:s' YEAR_MONTH...
33.894737
77
0.570652
DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G:i:s' DATETIME_FORMAT = 'j. E Y G:i:s' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j. F' SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATETIME_FORMAT = 'd.m.Y G:i:s' FIRST_DAY_OF_WEEK = 1 DATE_INPUT_FORMATS = ( '%d.%m.%Y', '%d.%m.%y', '%Y-%m-%d', '%y-%m-%d', ) TIME_IN...
true
true
1c0361779c9a1ac79b84a0a0f71e67c0304e1bfe
73,600
py
Python
python/ccxt/cryptocom.py
viper7882/ccxt
7a96ee771210eb3545c2498819ce98883c1ca13b
[ "MIT" ]
1
2022-02-18T03:54:29.000Z
2022-02-18T03:54:29.000Z
python/ccxt/cryptocom.py
viper7882/ccxt
7a96ee771210eb3545c2498819ce98883c1ca13b
[ "MIT" ]
null
null
null
python/ccxt/cryptocom.py
viper7882/ccxt
7a96ee771210eb3545c2498819ce98883c1ca13b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from cc...
42.153494
254
0.479063
from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import AccountNotEnabled from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadRequest from c...
true
true
1c03618870adbc70871eee3b677b357fba873a75
751
py
Python
from_file.py
TXTPEN/blog-fetch
32dcda422cb04ae441780fdda1d486489990dc3b
[ "BSD-3-Clause" ]
1
2018-07-04T13:13:44.000Z
2018-07-04T13:13:44.000Z
from_file.py
TXTPEN/blog-fetch
32dcda422cb04ae441780fdda1d486489990dc3b
[ "BSD-3-Clause" ]
1
2018-07-04T13:15:32.000Z
2018-07-04T13:15:32.000Z
from_file.py
TXTPEN/blog-fetch
32dcda422cb04ae441780fdda1d486489990dc3b
[ "BSD-3-Clause" ]
null
null
null
import os import urlparse from blogfetch import DB from multiprocessing.dummy import Pool as ThreadPool bfetch = DB() def fetch(i): domain = urlparse.urlparse(i['url']).hostname print i['url'] bfetch.add(i['url'], i['name']) # for i in session.query(Submission).filter(Submission.objectid > last_id, Submi...
23.46875
105
0.600533
import os import urlparse from blogfetch import DB from multiprocessing.dummy import Pool as ThreadPool bfetch = DB() def fetch(i): domain = urlparse.urlparse(i['url']).hostname print i['url'] bfetch.add(i['url'], i['name']) if __name__ == '__main__': urls = [] with open('contact.txt') as f: ...
false
true
1c0362a1b28d922905b256ce4e22d9ccb9ee2ab1
1,231
py
Python
data_structures/binary_trees/flatten-binary-tree-to-linked-list.py
jainrocky/python-ds
9f93937ad90609df1cc73e2a01a5df8f42f775cd
[ "MIT" ]
1
2019-11-16T17:24:41.000Z
2019-11-16T17:24:41.000Z
data_structures/binary_trees/flatten-binary-tree-to-linked-list.py
jainrocky/python-ds
9f93937ad90609df1cc73e2a01a5df8f42f775cd
[ "MIT" ]
null
null
null
data_structures/binary_trees/flatten-binary-tree-to-linked-list.py
jainrocky/python-ds
9f93937ad90609df1cc73e2a01a5df8f42f775cd
[ "MIT" ]
1
2019-10-06T15:46:14.000Z
2019-10-06T15:46:14.000Z
''' Author : MiKueen Level : Medium Problem Statement : Flatten Binary Tree to Linked List Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \ 2 \ 3 \ 4 \ ...
20.864407
74
0.554021
class Solution(object): def flatten(self, root): if not root: return right = root.right if root.left: self.flatten(root.left) tail = root.left while tail.right: tail = tail.right root.left, root.r...
true
true
1c0362def8df981a8d1052846616c52607801149
15,414
py
Python
demo/unstructured_prune/train.py
ZichaoGuo/PaddleSlim
2550fb4ec86aee6155c1c8a2c9ab174e239918a3
[ "Apache-2.0" ]
null
null
null
demo/unstructured_prune/train.py
ZichaoGuo/PaddleSlim
2550fb4ec86aee6155c1c8a2c9ab174e239918a3
[ "Apache-2.0" ]
null
null
null
demo/unstructured_prune/train.py
ZichaoGuo/PaddleSlim
2550fb4ec86aee6155c1c8a2c9ab174e239918a3
[ "Apache-2.0" ]
null
null
null
import os import sys import logging import paddle import argparse import functools import time import numpy as np import paddle.fluid as fluid from paddleslim.prune.unstructured_pruner import UnstructuredPruner, GMPUnstructuredPruner from paddleslim.common import get_logger sys.path.append(os.path.join(os.path.dirname(...
44.80814
194
0.634618
import os import sys import logging import paddle import argparse import functools import time import numpy as np import paddle.fluid as fluid from paddleslim.prune.unstructured_pruner import UnstructuredPruner, GMPUnstructuredPruner from paddleslim.common import get_logger sys.path.append(os.path.join(os.path.dirname(...
true
true
1c0362f4e9267d1893fbfb4e9a9d60b3b9dc2efc
1,103
py
Python
mayan/settings/travis/base.py
camerondphillips/MAYAN
b8cd44af50f0b2f2b59286d9c88e2f7aa573a93f
[ "Apache-2.0" ]
null
null
null
mayan/settings/travis/base.py
camerondphillips/MAYAN
b8cd44af50f0b2f2b59286d9c88e2f7aa573a93f
[ "Apache-2.0" ]
null
null
null
mayan/settings/travis/base.py
camerondphillips/MAYAN
b8cd44af50f0b2f2b59286d9c88e2f7aa573a93f
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, unicode_literals from .. import * # NOQA LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': '%(levelname)s %(asctime)s %(name)s %(process)d %(thread)d %(message)s' }, 'intermediate...
25.068182
93
0.43427
from __future__ import absolute_import, unicode_literals from .. import * LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': '%(levelname)s %(asctime)s %(name)s %(process)d %(thread)d %(message)s' }, 'intermediate': { ...
true
true
1c0363130b8eda3acea378ecaee9f2550a219616
10,133
py
Python
donkeycar/parts/camera.py
wenxichen/donkeycar
d70ee60d35d7e0e004b885e6f6062fb51916dad1
[ "MIT" ]
12
2019-06-28T21:58:01.000Z
2021-01-08T14:25:12.000Z
donkeycar/parts/camera.py
wenxichen/donkeycar
d70ee60d35d7e0e004b885e6f6062fb51916dad1
[ "MIT" ]
6
2020-11-07T19:27:10.000Z
2021-01-23T22:47:37.000Z
donkeycar/parts/camera.py
Heavy02011/donkeycar
5a23b0fee170596e29c80826c3db0d3a4c4c5392
[ "MIT" ]
9
2019-07-13T10:12:31.000Z
2020-07-27T10:27:03.000Z
import os import time import numpy as np from PIL import Image import glob from donkeycar.utils import rgb2gray class BaseCamera: def run_threaded(self): return self.frame class PiCamera(BaseCamera): def __init__(self, image_w=160, image_h=120, image_d=3, framerate=20, vflip=False, hflip=False): ...
32.687097
262
0.613244
import os import time import numpy as np from PIL import Image import glob from donkeycar.utils import rgb2gray class BaseCamera: def run_threaded(self): return self.frame class PiCamera(BaseCamera): def __init__(self, image_w=160, image_h=120, image_d=3, framerate=20, vflip=False, hflip=False): ...
true
true
1c0364674d4a87cb99502083290e776fe5b2cd30
1,608
py
Python
Pycharm code/C1/W2/C1_W2_Assignment_Solution.py
aiwithqasim/tensorflow-specialization
4355d00bcb88aa39ca5dfa2daed5f306d2043d55
[ "MIT" ]
null
null
null
Pycharm code/C1/W2/C1_W2_Assignment_Solution.py
aiwithqasim/tensorflow-specialization
4355d00bcb88aa39ca5dfa2daed5f306d2043d55
[ "MIT" ]
null
null
null
Pycharm code/C1/W2/C1_W2_Assignment_Solution.py
aiwithqasim/tensorflow-specialization
4355d00bcb88aa39ca5dfa2daed5f306d2043d55
[ "MIT" ]
null
null
null
import tensorflow as tf print(tf.__version__) # GRADED FUNCTION: train_mnist def train_mnist(): # Please write your code only where you are indicated. # please do not remove # model fitting inline comments. # YOUR CODE SHOULD START HERE class myCallback(tf.keras.callbacks.Callback): def on_ep...
32.816327
92
0.641791
import tensorflow as tf print(tf.__version__) def train_mnist(): class myCallback(tf.keras.callbacks.Callback): def on_epoch_end(self, epoch, logs={}): if logs.get('accuracy') is not None and logs.get('accuracy') > 0.99: print("\nReached 99% accuracy so cancelling ...
true
true
1c036515fe74d6c54cffef91e4d745ecdab55858
1,014
py
Python
ex042.py
GantzLorran/Python
ce6073754318443345973471589cceb4a24ed832
[ "Apache-2.0" ]
1
2020-03-26T13:23:17.000Z
2020-03-26T13:23:17.000Z
ex042.py
GantzLorran/Python
ce6073754318443345973471589cceb4a24ed832
[ "Apache-2.0" ]
null
null
null
ex042.py
GantzLorran/Python
ce6073754318443345973471589cceb4a24ed832
[ "Apache-2.0" ]
null
null
null
# Refeça o Dsafio 0035 e explique qual tipo de triangulo ele pode formar # Equilateros - todos os lados são iguais # Isósceles - dois lados iguais # Escaleno - Todos os lados diferentes from time import sleep print('====' * 10) print('Forme um triângulo!!!') print('====' * 10) lado1 = float(input('Digite o pr...
42.25
108
0.653846
from time import sleep print('====' * 10) print('Forme um triângulo!!!') print('====' * 10) lado1 = float(input('Digite o primeiro segmento!')) lado2 = float(input('Digite o segundo segmento!')) lado3 = float(input('Digite o terceiro segmento!')) print('PROCESSANDO...') sleep(2) if lado1 == lado2 > lado3: ...
true
true
1c03652eced3114cb0ae14b846e0ebe72e18780b
6,353
py
Python
app/models.py
NguyenHuy1812/ParkingHero-Back
e7294863d1ddb0d6974a86de2fb75cf55312019c
[ "MIT" ]
null
null
null
app/models.py
NguyenHuy1812/ParkingHero-Back
e7294863d1ddb0d6974a86de2fb75cf55312019c
[ "MIT" ]
7
2020-03-24T17:19:20.000Z
2022-03-11T23:54:31.000Z
app/models.py
NguyenHuy1812/ParkingHero-Back
e7294863d1ddb0d6974a86de2fb75cf55312019c
[ "MIT" ]
null
null
null
from flask_sqlalchemy import SQLAlchemy from sqlalchemy import types from flask_login import LoginManager, UserMixin from flask_dance.consumer.storage.sqla import OAuthConsumerMixin from flask_marshmallow import Marshmallow from werkzeug.security import generate_password_hash, check_password_hash from wtforms.fields.ht...
38.271084
152
0.702818
from flask_sqlalchemy import SQLAlchemy from sqlalchemy import types from flask_login import LoginManager, UserMixin from flask_dance.consumer.storage.sqla import OAuthConsumerMixin from flask_marshmallow import Marshmallow from werkzeug.security import generate_password_hash, check_password_hash from wtforms.fields.ht...
true
true
1c0365565c2996cb8af457d78a9b938d5ad89293
1,731
py
Python
uwtrajectory/GOES/add_to_trajectory.py
jkcm/uw-trace
7b80c628b7a0c96ce096481123b8465241037699
[ "MIT" ]
1
2022-01-16T07:40:59.000Z
2022-01-16T07:40:59.000Z
uwtrajectory/GOES/add_to_trajectory.py
e-erfani/uw-trajectory
bf1b63953399560af69f23ebb4f018d0d7536428
[ "MIT" ]
null
null
null
uwtrajectory/GOES/add_to_trajectory.py
e-erfani/uw-trajectory
bf1b63953399560af69f23ebb4f018d0d7536428
[ "MIT" ]
1
2022-01-16T07:40:06.000Z
2022-01-16T07:40:06.000Z
from .. import config import xarray as xr import numpy as np import pandas as pd import glob def add_GOES_to_trajectory(ds, box_degrees=2): lats, lons, times = ds.lat.values, ((ds.lon.values+180)%360)-180, ds.time.values cths, lwps, cfs = [], [], [] for i, (lat, lon, time) in enumerate(zip(lats, lons, p...
44.384615
103
0.607741
from .. import config import xarray as xr import numpy as np import pandas as pd import glob def add_GOES_to_trajectory(ds, box_degrees=2): lats, lons, times = ds.lat.values, ((ds.lon.values+180)%360)-180, ds.time.values cths, lwps, cfs = [], [], [] for i, (lat, lon, time) in enumerate(zip(lats, lons, p...
true
true
1c0367eeb3c57a18d46b5f96db96c6d3e5400665
6,569
py
Python
tests/test_stylechecker.py
jfunez/packtools
3a5fe3fa5bcfb9dfdf57b7822e834d72bae28150
[ "BSD-2-Clause" ]
null
null
null
tests/test_stylechecker.py
jfunez/packtools
3a5fe3fa5bcfb9dfdf57b7822e834d72bae28150
[ "BSD-2-Clause" ]
null
null
null
tests/test_stylechecker.py
jfunez/packtools
3a5fe3fa5bcfb9dfdf57b7822e834d72bae28150
[ "BSD-2-Clause" ]
null
null
null
#coding: utf-8 import unittest from StringIO import StringIO from tempfile import NamedTemporaryFile from lxml import etree, isoschematron from packtools import stylechecker # valid: <a><b></b></a> # invalid: anything else sample_xsd = StringIO('''\ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:ele...
35.128342
173
0.652611
import unittest from StringIO import StringIO from tempfile import NamedTemporaryFile from lxml import etree, isoschematron from packtools import stylechecker sample_xsd = StringIO('''\ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="a" type="AType"/> <xsd:complexType name="AType"> <x...
true
true
1c036850b2c9e92257d579380a8e2f2844cc8a08
14,669
py
Python
CTFd/views.py
KaitoRyouga/CTFd
827a22e8ce9bdfd43ae0689e6cbcf2a6e253e920
[ "Apache-2.0" ]
null
null
null
CTFd/views.py
KaitoRyouga/CTFd
827a22e8ce9bdfd43ae0689e6cbcf2a6e253e920
[ "Apache-2.0" ]
null
null
null
CTFd/views.py
KaitoRyouga/CTFd
827a22e8ce9bdfd43ae0689e6cbcf2a6e253e920
[ "Apache-2.0" ]
null
null
null
import os from flask import Blueprint, abort from flask import current_app as app from flask import redirect, render_template, request, send_file, session, url_for from flask.helpers import safe_join from sqlalchemy.exc import IntegrityError from CTFd.cache import cache from CTFd.constants.config import ( ...
35.346988
142
0.567251
import os from flask import Blueprint, abort from flask import current_app as app from flask import redirect, render_template, request, send_file, session, url_for from flask.helpers import safe_join from sqlalchemy.exc import IntegrityError from CTFd.cache import cache from CTFd.constants.config import ( ...
true
true
1c036873c3c7283dac0b68a91c247300e4704239
2,397
py
Python
tests/configs/test_configs_for_keys.py
di-dimitrov/mmf_propaganda
56866b51eaa01dd5b47d985e5422cc2f5e488f10
[ "BSD-3-Clause" ]
2
2021-02-22T12:15:42.000Z
2021-05-02T15:22:24.000Z
tests/configs/test_configs_for_keys.py
di-dimitrov/mmf_propaganda
56866b51eaa01dd5b47d985e5422cc2f5e488f10
[ "BSD-3-Clause" ]
7
2021-03-01T21:16:26.000Z
2022-02-27T07:07:11.000Z
tests/configs/test_configs_for_keys.py
krantirk/MMF
2e4acaad7ca8eee4319e1205a560eed81733a0be
[ "BSD-3-Clause" ]
2
2020-11-08T08:33:13.000Z
2022-03-24T14:32:29.000Z
# Copyright (c) Facebook, Inc. and its affiliates. import contextlib import unittest import warnings from io import StringIO from mmf.common.registry import registry from mmf.utils.configuration import Configuration from mmf.utils.env import setup_imports from tests.test_utils import dummy_args class TestConfigsForK...
36.318182
84
0.555277
import contextlib import unittest import warnings from io import StringIO from mmf.common.registry import registry from mmf.utils.configuration import Configuration from mmf.utils.env import setup_imports from tests.test_utils import dummy_args class TestConfigsForKeys(unittest.TestCase): def setUp(self): ...
true
true
1c0368f1af2890f03536888d377f375ce67a6e29
2,112
py
Python
scripts/misc/filter_balt_error_mols.py
mayrf/pkasolver
3ce0304fcedba64eccaafc35e7df49b8bc9d3ece
[ "MIT" ]
8
2022-01-18T12:45:55.000Z
2022-03-21T08:50:44.000Z
scripts/misc/filter_balt_error_mols.py
MayrF/pkasolver
07bc18a13bc92e117d431daf744889a1815c3c71
[ "MIT" ]
3
2021-09-17T14:14:53.000Z
2021-09-23T11:04:10.000Z
scripts/misc/filter_balt_error_mols.py
MayrF/pkasolver
07bc18a13bc92e117d431daf744889a1815c3c71
[ "MIT" ]
1
2022-03-11T19:23:19.000Z
2022-03-11T19:23:19.000Z
import numpy as np from rdkit import Chem from rdkit.Chem.rdchem import ResonanceMolSupplier from rdkit.Chem.AllChem import GetMorganFingerprintAsBitVect import tqdm in_path = "/data/shared/projects/pkasolver-data/00_experimental_training_datasets.sdf" out_path = "/data/shared/projects/pkasolver-data/misc_filtered_exp...
41.411765
119
0.56392
import numpy as np from rdkit import Chem from rdkit.Chem.rdchem import ResonanceMolSupplier from rdkit.Chem.AllChem import GetMorganFingerprintAsBitVect import tqdm in_path = "/data/shared/projects/pkasolver-data/00_experimental_training_datasets.sdf" out_path = "/data/shared/projects/pkasolver-data/misc_filtered_exp...
true
true
1c0369d31aab9f77af3faa8f5767e642f983edef
423
py
Python
main.py
sajjadjafaribojd/phonebook
f824a9cf1baea3bed47d9813d01ac7a20c00f502
[ "MIT" ]
1
2022-01-15T08:57:22.000Z
2022-01-15T08:57:22.000Z
main.py
sajjadjafaribojd/phonebook
f824a9cf1baea3bed47d9813d01ac7a20c00f502
[ "MIT" ]
null
null
null
main.py
sajjadjafaribojd/phonebook
f824a9cf1baea3bed47d9813d01ac7a20c00f502
[ "MIT" ]
null
null
null
import random num_arr=[] Prefix_number=["0915","0912","0910"] final="" for total in range(0,500): for num in range(0,7): n=random.randint(0,9) num_arr.append(n) if num == 6: for j in num_arr: final=final+str(j) print(random.choice(Prefix_num...
20.142857
62
0.470449
import random num_arr=[] Prefix_number=["0915","0912","0910"] final="" for total in range(0,500): for num in range(0,7): n=random.randint(0,9) num_arr.append(n) if num == 6: for j in num_arr: final=final+str(j) print(random.choice(Prefix_num...
true
true
1c0369d88d776848d5b650e2bf5239ce70d6ceb2
877
py
Python
setup.py
Saevon/mdx_alerts
48cac91784f3c9f6d60be7431feb46be6309d28f
[ "MIT" ]
null
null
null
setup.py
Saevon/mdx_alerts
48cac91784f3c9f6d60be7431feb46be6309d28f
[ "MIT" ]
1
2018-02-20T22:20:02.000Z
2018-03-01T04:25:15.000Z
setup.py
Saevon/mdx_alerts
48cac91784f3c9f6d60be7431feb46be6309d28f
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- from setuptools import setup setup( name = "mdx_alerts", version = "0.1.0", py_modules = ["mdx_alerts"], install_requires = ['Markdown>=2.2.0'], author = "Saevon", author_email = "dot.saevon@gmail.com", description = "Markdown alerts extension", ...
30.241379
54
0.598632
from setuptools import setup setup( name = "mdx_alerts", version = "0.1.0", py_modules = ["mdx_alerts"], install_requires = ['Markdown>=2.2.0'], author = "Saevon", author_email = "dot.saevon@gmail.com", description = "Markdown alerts extension", license = "MIT", url = "https://gith...
true
true
1c036a7f058dd4dfc1b897e1c4d105f4daf5b730
133
py
Python
Python/Tests/TestData/DebuggerProject/CreateFile3.py
nanshuiyu/pytools
9f9271fe8cf564b4f94e9456d400f4306ea77c23
[ "Apache-2.0" ]
null
null
null
Python/Tests/TestData/DebuggerProject/CreateFile3.py
nanshuiyu/pytools
9f9271fe8cf564b4f94e9456d400f4306ea77c23
[ "Apache-2.0" ]
null
null
null
Python/Tests/TestData/DebuggerProject/CreateFile3.py
nanshuiyu/pytools
9f9271fe8cf564b4f94e9456d400f4306ea77c23
[ "Apache-2.0" ]
null
null
null
import os, sys with open('file3.txt', 'w') as f: f.write(os.curdir + '\n') for p in sys.path: f.write(p + '\n')
22.166667
34
0.503759
import os, sys with open('file3.txt', 'w') as f: f.write(os.curdir + '\n') for p in sys.path: f.write(p + '\n')
true
true
1c036aedebd759eddd7becdb8422e8b2b8398ac9
998
py
Python
sixriver/schemas/acknowledgement.py
Shiphero/sixrivers
893eb0a11cd1572d898fe1f650e033d1d8a40897
[ "MIT" ]
null
null
null
sixriver/schemas/acknowledgement.py
Shiphero/sixrivers
893eb0a11cd1572d898fe1f650e033d1d8a40897
[ "MIT" ]
null
null
null
sixriver/schemas/acknowledgement.py
Shiphero/sixrivers
893eb0a11cd1572d898fe1f650e033d1d8a40897
[ "MIT" ]
1
2020-01-29T19:07:58.000Z
2020-01-29T19:07:58.000Z
from marshmallow import Schema, fields, validates, ValidationError, post_dump, post_load from sixriver import models from .common import SixRiverSchema class AcknowledgementErrorSchema(SixRiverSchema): code = fields.Str() data = fields.Dict() @post_load def make_container_inducted(self, data, **k...
28.514286
88
0.737475
from marshmallow import Schema, fields, validates, ValidationError, post_dump, post_load from sixriver import models from .common import SixRiverSchema class AcknowledgementErrorSchema(SixRiverSchema): code = fields.Str() data = fields.Dict() @post_load def make_container_inducted(self, data, **k...
true
true
1c036b016ad82e55566638a3029769b1e1680efb
785
py
Python
users/urls.py
alma3lol/weCode
cebad162a94ae9d1de47c6d02282dcf904350f3e
[ "MIT" ]
10
2021-09-05T10:18:45.000Z
2022-03-28T16:59:01.000Z
users/urls.py
alma3lol/weCode
cebad162a94ae9d1de47c6d02282dcf904350f3e
[ "MIT" ]
6
2021-09-04T21:56:10.000Z
2021-10-30T19:50:18.000Z
users/urls.py
alma3lol/weCode
cebad162a94ae9d1de47c6d02282dcf904350f3e
[ "MIT" ]
3
2021-09-04T21:37:41.000Z
2021-12-30T23:15:08.000Z
from django.urls import path from .views import UserRegisterView, UserEditView, PasswordsChangeView, ShowProfilePageView, EditProfilePageView, CreateProfilePageView from . import views urlpatterns = [ path('register/', UserRegisterView.as_view(), name='register'), path('edit_settings/', UserEditView.as_view()...
56.071429
135
0.755414
from django.urls import path from .views import UserRegisterView, UserEditView, PasswordsChangeView, ShowProfilePageView, EditProfilePageView, CreateProfilePageView from . import views urlpatterns = [ path('register/', UserRegisterView.as_view(), name='register'), path('edit_settings/', UserEditView.as_view()...
true
true
1c036b6d88cc4c5971eb45110e31773d2f12d5e4
22,945
py
Python
firststreet/__main__.py
owenhw/fsf_api_access_python
7ded0b933bcb54cda1ee9c4f05e7b691516e3a66
[ "MIT" ]
15
2020-06-29T18:54:43.000Z
2022-02-15T23:27:49.000Z
firststreet/__main__.py
owenhw/fsf_api_access_python
7ded0b933bcb54cda1ee9c4f05e7b691516e3a66
[ "MIT" ]
57
2020-07-08T14:49:20.000Z
2022-02-14T20:55:10.000Z
firststreet/__main__.py
owenhw/fsf_api_access_python
7ded0b933bcb54cda1ee9c4f05e7b691516e3a66
[ "MIT" ]
7
2020-09-04T18:21:29.000Z
2021-05-14T07:28:35.000Z
# Author: Kelvin Lai <kelvin@firststreet.org> # Copyright: This module is owned by First Street Foundation # Standard Imports import argparse import ast import os import logging from distutils.util import strtobool import sys # Internal Imports import firststreet from firststreet.errors import InvalidArgument from fi...
53.988235
120
0.483155
import argparse import ast import os import logging from distutils.util import strtobool import sys import firststreet from firststreet.errors import InvalidArgument from firststreet.util import read_search_items_from_file if __name__ == "__main__": repeat = True while repeat: parser = argparse.Ar...
true
true
1c036b7312a48cea68ba25d72a60e5db783d471a
2,612
py
Python
corehq/apps/locations/middleware.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
1
2020-07-14T13:00:23.000Z
2020-07-14T13:00:23.000Z
corehq/apps/locations/middleware.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
94
2020-12-11T06:57:31.000Z
2022-03-15T10:24:06.000Z
corehq/apps/locations/middleware.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
null
null
null
from django.utils.deprecation import MiddlewareMixin from django.utils.translation import ugettext_lazy from corehq.apps.hqwebapp.views import no_permissions from corehq.apps.users.models import AnonymousCouchUser from corehq.toggles import PUBLISH_CUSTOM_REPORTS from .permissions import is_location_safe, location_re...
44.271186
88
0.729709
from django.utils.deprecation import MiddlewareMixin from django.utils.translation import ugettext_lazy from corehq.apps.hqwebapp.views import no_permissions from corehq.apps.users.models import AnonymousCouchUser from corehq.toggles import PUBLISH_CUSTOM_REPORTS from .permissions import is_location_safe, location_re...
true
true
1c036cd91966478b1867ff7b2d4320d3f19019c6
20,663
py
Python
oaebu_workflows/workflows/google_analytics_telescope.py
The-Academic-Observatory/oaebu-workflows
4af35008ac62700c596ecd58bab6ffb602d28818
[ "Apache-2.0" ]
2
2022-02-17T00:37:19.000Z
2022-02-17T00:37:53.000Z
oaebu_workflows/workflows/google_analytics_telescope.py
The-Academic-Observatory/oaebu-workflows
4af35008ac62700c596ecd58bab6ffb602d28818
[ "Apache-2.0" ]
70
2021-08-30T22:58:31.000Z
2022-03-31T10:50:54.000Z
oaebu_workflows/workflows/google_analytics_telescope.py
The-Academic-Observatory/oaebu-workflows
4af35008ac62700c596ecd58bab6ffb602d28818
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Curtin University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
41.743434
120
0.650874
from __future__ import annotations import logging import os from datetime import timedelta from typing import Dict, List, Optional, Tuple import pendulum from airflow.exceptions import AirflowException, AirflowSkipException from airflow.hooks.base import BaseHook from google.cloud import bigquery from googleapiclie...
true
true
1c036cffe239be6b1032ef9794bb356e87e7ea72
25,870
py
Python
usaspending_api/accounts/views/federal_accounts_v2.py
bminahankcfrb/usaspending-api
1fb5c4c261edf91ab2930aea7928ca24dfa49123
[ "CC0-1.0" ]
null
null
null
usaspending_api/accounts/views/federal_accounts_v2.py
bminahankcfrb/usaspending-api
1fb5c4c261edf91ab2930aea7928ca24dfa49123
[ "CC0-1.0" ]
null
null
null
usaspending_api/accounts/views/federal_accounts_v2.py
bminahankcfrb/usaspending-api
1fb5c4c261edf91ab2930aea7928ca24dfa49123
[ "CC0-1.0" ]
null
null
null
import ast from collections import OrderedDict from django.db.models import F, Q, Sum, OuterRef, Subquery, Func, DecimalField, Exists from django.utils.dateparse import parse_date from fiscalyear import FiscalDateTime from rest_framework.response import Response from rest_framework.views import APIView from usaspendi...
44.373928
120
0.591032
import ast from collections import OrderedDict from django.db.models import F, Q, Sum, OuterRef, Subquery, Func, DecimalField, Exists from django.utils.dateparse import parse_date from fiscalyear import FiscalDateTime from rest_framework.response import Response from rest_framework.views import APIView from usaspendi...
true
true
1c036da361740a39c8436248fa6381211820f447
11,157
py
Python
src/plot_splitting.py
Jasplet/SKS_Splitting
d5c3ea442e75fd9643c31575158cf350aa41a5e2
[ "MIT" ]
null
null
null
src/plot_splitting.py
Jasplet/SKS_Splitting
d5c3ea442e75fd9643c31575158cf350aa41a5e2
[ "MIT" ]
null
null
null
src/plot_splitting.py
Jasplet/SKS_Splitting
d5c3ea442e75fd9643c31575158cf350aa41a5e2
[ "MIT" ]
null
null
null
#! /usr/bin/env python ### Script containing varous plotting functions for splitting Measurements import pandas as pd import numpy as np import matplotlib.pyplot as plt import cartopy.crs as cart import cartopy import matplotlib.gridspec as gridspec import obspy from obspy import taup def load(stat,phase): data =...
48.508696
223
0.676347
import pandas as pd import numpy as np import matplotlib.pyplot as plt import cartopy.crs as cart import cartopy import matplotlib.gridspec as gridspec import obspy from obspy import taup def load(stat,phase): data = pd.read_csv('/Users/ja17375/Shear_Wave_Splitting/Python/Measurements/{}_{}_Splitting.txt'.format(...
true
true
1c03701f9cc482ae89cca8ea27625219d8c365ab
3,119
py
Python
superlists/superlists/settings.py
igorllllll/ProjetoLivro
c9993ddb414472ad9d0865af106b6cf37d3fbed9
[ "Apache-2.0" ]
null
null
null
superlists/superlists/settings.py
igorllllll/ProjetoLivro
c9993ddb414472ad9d0865af106b6cf37d3fbed9
[ "Apache-2.0" ]
null
null
null
superlists/superlists/settings.py
igorllllll/ProjetoLivro
c9993ddb414472ad9d0865af106b6cf37d3fbed9
[ "Apache-2.0" ]
null
null
null
""" Django settings for superlists project. Generated by 'django-admin startproject' using Django 1.11.23. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ impor...
25.565574
91
0.695736
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 't8^wq(z)r%*ncrhr+m5mh*ijsi+&uf9^g!+%a2ag4_y$o=&-qm' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
1c037078422938d271910a6b8e85e6949587cde4
312
py
Python
modules/rbac/detect.py
Relintai/rcpp_framework
6416ecc5e0c88115f209cd63945a29c0e16a8e99
[ "MIT" ]
null
null
null
modules/rbac/detect.py
Relintai/rcpp_framework
6416ecc5e0c88115f209cd63945a29c0e16a8e99
[ "MIT" ]
null
null
null
modules/rbac/detect.py
Relintai/rcpp_framework
6416ecc5e0c88115f209cd63945a29c0e16a8e99
[ "MIT" ]
null
null
null
import os import platform import sys def is_active(): return True def get_name(): return "users" def can_build(): return True def get_opts(): return [] def get_flags(): return [] def configure(env): pass def get_module_dependencies(): return [ "admin_panel", ]
10.064516
30
0.621795
import os import platform import sys def is_active(): return True def get_name(): return "users" def can_build(): return True def get_opts(): return [] def get_flags(): return [] def configure(env): pass def get_module_dependencies(): return [ "admin_panel", ]
true
true
1c037136cc2451a1c24c394095a8c0e18537170f
193
py
Python
setup.py
AlexSPx/Akashi
8b2b6b54297d089c1657e920526b5b8697b95d7d
[ "Apache-2.0" ]
null
null
null
setup.py
AlexSPx/Akashi
8b2b6b54297d089c1657e920526b5b8697b95d7d
[ "Apache-2.0" ]
null
null
null
setup.py
AlexSPx/Akashi
8b2b6b54297d089c1657e920526b5b8697b95d7d
[ "Apache-2.0" ]
null
null
null
from setuptools import setup setup( name='TaigaBot', version='', packages=[''], url='', license='', author='lukesaltweather', author_email='', description='' )
14.846154
29
0.57513
from setuptools import setup setup( name='TaigaBot', version='', packages=[''], url='', license='', author='lukesaltweather', author_email='', description='' )
true
true
1c03714d2332e36b1b0ddc8153b45d5a3ebf445c
936
py
Python
colour/examples/volume/examples_rgb.py
BPearlstine/colour
40f0281295496774d2a19eee017d50fd0c265bd8
[ "Cube", "BSD-3-Clause" ]
2
2020-05-03T20:15:42.000Z
2021-04-09T18:19:06.000Z
colour/examples/volume/examples_rgb.py
BPearlstine/colour
40f0281295496774d2a19eee017d50fd0c265bd8
[ "Cube", "BSD-3-Clause" ]
null
null
null
colour/examples/volume/examples_rgb.py
BPearlstine/colour
40f0281295496774d2a19eee017d50fd0c265bd8
[ "Cube", "BSD-3-Clause" ]
1
2019-12-11T19:48:27.000Z
2019-12-11T19:48:27.000Z
# -*- coding: utf-8 -*- """ Showcases RGB colourspace volume computations. """ import colour from colour.utilities import message_box message_box('RGB Colourspace Volume Computations') message_box('Computing "ProPhoto RGB" RGB colourspace limits.') limits = colour.RGB_colourspace_limits(colour.RGB_COLOURSPACES['ProP...
28.363636
79
0.723291
import colour from colour.utilities import message_box message_box('RGB Colourspace Volume Computations') message_box('Computing "ProPhoto RGB" RGB colourspace limits.') limits = colour.RGB_colourspace_limits(colour.RGB_COLOURSPACES['ProPhoto RGB']) print(limits) print('\n') samples = 10e4 message_box(('Computing ...
true
true
1c03717b8156a1b99934438274e30ae1b428d9ef
4,995
py
Python
zwave_js_server/model/endpoint.py
EiNSTeiN-/zwave-js-server-python
35e084bbe3e867fab8b500544a74eea0c13f2ceb
[ "Apache-2.0" ]
null
null
null
zwave_js_server/model/endpoint.py
EiNSTeiN-/zwave-js-server-python
35e084bbe3e867fab8b500544a74eea0c13f2ceb
[ "Apache-2.0" ]
null
null
null
zwave_js_server/model/endpoint.py
EiNSTeiN-/zwave-js-server-python
35e084bbe3e867fab8b500544a74eea0c13f2ceb
[ "Apache-2.0" ]
null
null
null
""" Model for a Zwave Node's endpoints. https://zwave-js.github.io/node-zwave-js/#/api/endpoint?id=endpoint-properties """ from typing import TYPE_CHECKING, Any, Dict, List, Optional, TypedDict, Union, cast from ..const import NodeStatus from ..event import EventBase from ..exceptions import FailedCommand from .comm...
30.833333
89
0.615215
from typing import TYPE_CHECKING, Any, Dict, List, Optional, TypedDict, Union, cast from ..const import NodeStatus from ..event import EventBase from ..exceptions import FailedCommand from .command_class import CommandClass, CommandClassInfo, CommandClassInfoDataType from .device_class import DeviceClass, DeviceClass...
true
true
1c037200af21a91f09e3b5d2ec89a4f843f3016b
3,553
py
Python
official/cv/unet/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
1
2021-11-18T08:17:44.000Z
2021-11-18T08:17:44.000Z
official/cv/unet/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
official/cv/unet/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
2
2019-09-01T06:17:04.000Z
2019-10-04T08:39:45.000Z
# Copyright 2020-2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
50.757143
114
0.681677
import logging from mindspore import context, Model from mindspore.train.serialization import load_checkpoint, load_param_into_net from src.data_loader import create_dataset, create_multi_class_dataset from src.unet_medical import UNetMedical from src.unet_nested import NestedUNet, UNet from src.utils import UnetEval...
true
true
1c037280c929708a6e510bb9c3f60a827eb9fa0c
3,263
py
Python
numad/__main__.py
exec-all/numad
9bde3f3aa1dc7c9e8e61d6ccf9f2f07f4be70b6a
[ "BSD-2-Clause" ]
3
2017-05-16T09:33:09.000Z
2018-12-12T02:45:31.000Z
numad/__main__.py
exec-all/numad
9bde3f3aa1dc7c9e8e61d6ccf9f2f07f4be70b6a
[ "BSD-2-Clause" ]
null
null
null
numad/__main__.py
exec-all/numad
9bde3f3aa1dc7c9e8e61d6ccf9f2f07f4be70b6a
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """umad: pull results from umad""" from argparse import ArgumentParser from asyncio import coroutine, Task from aioes import Elasticsearch from blessed import Terminal from .render import render_search_results, render_query_field from .inputs import input_loop, search_loop from . import DEFAULT...
29.93578
111
0.723261
from argparse import ArgumentParser from asyncio import coroutine, Task from aioes import Elasticsearch from blessed import Terminal from .render import render_search_results, render_query_field from .inputs import input_loop, search_loop from . import DEFAULT_ES_SERVER, UMAD_INDEX, DOC_TYPE_ALL import asyncio impo...
true
true
1c037296f999aaa4b3ec5bfd0625cf3f6259102d
4,634
py
Python
sdks/python/http_client/v1/polyaxon_sdk/models/v1_component_hub_settings.py
onilton/polyaxon
3b0d7cbeead74e62eb0eedbb2962f605ebb9fa81
[ "Apache-2.0" ]
null
null
null
sdks/python/http_client/v1/polyaxon_sdk/models/v1_component_hub_settings.py
onilton/polyaxon
3b0d7cbeead74e62eb0eedbb2962f605ebb9fa81
[ "Apache-2.0" ]
null
null
null
sdks/python/http_client/v1/polyaxon_sdk/models/v1_component_hub_settings.py
onilton/polyaxon
3b0d7cbeead74e62eb0eedbb2962f605ebb9fa81
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # 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 ...
28.256098
92
0.599482
import pprint import re import six from polyaxon_sdk.configuration import Configuration class V1ComponentHubSettings(object): openapi_types = { 'users': 'list[str]', 'teams': 'list[str]' } attribute_map = { 'users': 'users', 'teams': 'teams' } def __init__...
true
true
1c03733d25aa781b335787f78a72fa0b5fa7e43a
1,119
py
Python
api/generators/MapGeneratorRandomStrategy.py
strategineer/lynchman
7b07c15c801841ad3f94734d6912d248c3f1bcbd
[ "MIT" ]
1
2019-04-12T23:49:01.000Z
2019-04-12T23:49:01.000Z
api/generators/MapGeneratorRandomStrategy.py
KeikakuB/lynchman
7b07c15c801841ad3f94734d6912d248c3f1bcbd
[ "MIT" ]
null
null
null
api/generators/MapGeneratorRandomStrategy.py
KeikakuB/lynchman
7b07c15c801841ad3f94734d6912d248c3f1bcbd
[ "MIT" ]
1
2021-08-15T13:15:07.000Z
2021-08-15T13:15:07.000Z
import random from .MapGeneratorStrategy import MapGeneratorStrategy from api.data.Block import Block from api.data.JsonNoteType import JsonNoteType import api.data.Constants class MapGeneratorRandomStrategy(MapGeneratorStrategy): """This strategy generates a map in which notes are placed completely randomly on e...
44.76
119
0.702413
import random from .MapGeneratorStrategy import MapGeneratorStrategy from api.data.Block import Block from api.data.JsonNoteType import JsonNoteType import api.data.Constants class MapGeneratorRandomStrategy(MapGeneratorStrategy): def __init__(self, song): MapGeneratorStrategy.__init__(self, song) de...
true
true
1c037435589087446d987bdcd4933436e8e298fc
203
py
Python
library_managment/library_managment/doctype/article/test_article.py
walunj333/library_managment
d483cd15081d205185df743733d6f3c090b86acc
[ "MIT" ]
null
null
null
library_managment/library_managment/doctype/article/test_article.py
walunj333/library_managment
d483cd15081d205185df743733d6f3c090b86acc
[ "MIT" ]
null
null
null
library_managment/library_managment/doctype/article/test_article.py
walunj333/library_managment
d483cd15081d205185df743733d6f3c090b86acc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2019, sagar and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestArticle(unittest.TestCase): pass
18.454545
44
0.763547
from __future__ import unicode_literals import frappe import unittest class TestArticle(unittest.TestCase): pass
true
true
1c03752f3f1bede4248bedc53e1c84525d902ba6
161,719
py
Python
gluon/sqlhtml.py
ijv-cz/web2py
e671ef4103c58143e7d9b0580066eb61889d7597
[ "BSD-3-Clause" ]
null
null
null
gluon/sqlhtml.py
ijv-cz/web2py
e671ef4103c58143e7d9b0580066eb61889d7597
[ "BSD-3-Clause" ]
null
null
null
gluon/sqlhtml.py
ijv-cz/web2py
e671ef4103c58143e7d9b0580066eb61889d7597
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Holds: - SQLFORM: provide a form for a table (with/without record) - SQLTABLE: provides a table for ...
41.445156
227
0.504276
import datetime import re import copy import os from gluon._compat import StringIO,unichr, urllib_quote, iteritems, basestring, long, integer_types, unicodeT, to_native, to_unicode, urlencode from gluon.http import HTTP, redirect from gluon.html import XmlComponent, truncate_string from gluon.html import XML, SPAN, ...
true
true
1c0375880cec33182e941e9c4d94847724ecf53c
3,977
py
Python
sesame_client/exceptions.py
sesame-app/sesame-python-client
5f01f19471396fce9a68d95da3ce64eeed091781
[ "Apache-2.0" ]
null
null
null
sesame_client/exceptions.py
sesame-app/sesame-python-client
5f01f19471396fce9a68d95da3ce64eeed091781
[ "Apache-2.0" ]
null
null
null
sesame_client/exceptions.py
sesame-app/sesame-python-client
5f01f19471396fce9a68d95da3ce64eeed091781
[ "Apache-2.0" ]
1
2021-01-26T03:43:19.000Z
2021-01-26T03:43:19.000Z
# coding: utf-8 """ Version 3 of CANDY HOUSE’s Sesame API We use RESTful API to provide basic manipulation of the Sesame smart lock, including: * Get Sesame lock/unlock status * Get battery status * Lock and unlock Sesame * Sync Sesame status * Get results for lock, unlock, and sync commands # noqa: E501 ...
32.598361
253
0.58084
import six class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): self.path_to_item = path_to_item self.valid_classes = valid_classes self.key_type = key_type ...
true
true
1c037631a6a39a0deba7194dbded459392295e0b
2,575
py
Python
pyroomacoustics/tests/tests_libroom/test_ccw3p.py
HemaZ/pyroomacoustics
c401f829c71ff03a947f68f9b6b2f48346ae84b2
[ "MIT" ]
1
2019-08-04T07:34:02.000Z
2019-08-04T07:34:02.000Z
pyroomacoustics/tests/tests_libroom/test_ccw3p.py
HemaZ/pyroomacoustics
c401f829c71ff03a947f68f9b6b2f48346ae84b2
[ "MIT" ]
null
null
null
pyroomacoustics/tests/tests_libroom/test_ccw3p.py
HemaZ/pyroomacoustics
c401f829c71ff03a947f68f9b6b2f48346ae84b2
[ "MIT" ]
1
2021-03-07T09:46:58.000Z
2021-03-07T09:46:58.000Z
# Test of the CCW3P routine # Copyright (C) 2019 Robin Scheibler, Cyril Cadoux # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights ...
33.012821
80
0.610097
import numpy as np import pyroomacoustics as pra cases = { 'anti-clockwise' : { 'points' : np.array([ [1,-1], [2,-1], [1,0] ]), 'expected' : 1, 'label' : 'Test: CCW3P anti-clockwise', }, 'clockwise' : { 'point...
true
true
1c0376e592a7b80c277a4ad644b421a643208b5b
1,679
py
Python
mi/dataset/driver/ctdmo_ghqr/sio/ctdmo_ghqr_sio_co_recovered_driver.py
cdobs/mi-instrument
99f9322a4afabc5dff9b0fad12166075efce838c
[ "BSD-2-Clause" ]
1
2018-09-14T23:28:29.000Z
2018-09-14T23:28:29.000Z
mi/dataset/driver/ctdmo_ghqr/sio/ctdmo_ghqr_sio_co_recovered_driver.py
cdobs/mi-instrument
99f9322a4afabc5dff9b0fad12166075efce838c
[ "BSD-2-Clause" ]
33
2017-04-25T19:53:45.000Z
2022-03-18T17:42:18.000Z
mi/dataset/driver/ctdmo_ghqr/sio/ctdmo_ghqr_sio_co_recovered_driver.py
cdobs/mi-instrument
99f9322a4afabc5dff9b0fad12166075efce838c
[ "BSD-2-Clause" ]
31
2015-03-04T01:01:09.000Z
2020-10-28T14:42:12.000Z
#!/usr/bin/env python """ @package mi.dataset.driver.ctdmo_ghqr.sio.ctdmo_ghqr_sio_co_recovered @file mi-dataset/mi/dataset/driver/ctdmo_ghqr/sio/ctdmo_ghqr_sio_co_recovered_driver.py @author Emily Hahn @brief Driver for the ctdmo_ghqr_sio instrument co recovered data """ from mi.core.log import get_logger from mi.da...
36.5
101
0.758785
from mi.core.log import get_logger from mi.dataset.dataset_parser import DataSetDriverConfigKeys from mi.dataset.dataset_driver import DataSetDriver from mi.dataset.parser.ctdmo_ghqr_sio import CtdmoGhqrSioRecoveredCoAndCtParser from mi.core.versioning import version @version("15.7.0") def parse(unused, source_file...
true
true
1c0376fa2ade29e31d8778ce4518787825c0bb89
442
py
Python
test_mixed_stuff.py
after5cst/python_module_teardown
5b51c1c9a127326a9065b2019993e1c6eeab2674
[ "MIT" ]
null
null
null
test_mixed_stuff.py
after5cst/python_module_teardown
5b51c1c9a127326a9065b2019993e1c6eeab2674
[ "MIT" ]
null
null
null
test_mixed_stuff.py
after5cst/python_module_teardown
5b51c1c9a127326a9065b2019993e1c6eeab2674
[ "MIT" ]
null
null
null
from conftest import module_error_teardown @module_error_teardown def _module_error_teardown(): print('') print("A test case failed in test_mixed_stuff.py!") def test_success_in_mixed(): pass def test_fail_in_mixed(): assert False, "Yes, it failed." def test_another_success_in_mixed(): pass ...
15.785714
55
0.739819
from conftest import module_error_teardown @module_error_teardown def _module_error_teardown(): print('') print("A test case failed in test_mixed_stuff.py!") def test_success_in_mixed(): pass def test_fail_in_mixed(): assert False, "Yes, it failed." def test_another_success_in_mixed(): pass ...
true
true
1c03780962a805cfa15b32ea63899c4bc51b61ce
2,861
py
Python
registration/migrations/0001_initial.py
wivn/feed-reader
1b4524fcdfc79391a5cf982ce9c5681e600f4303
[ "MIT" ]
null
null
null
registration/migrations/0001_initial.py
wivn/feed-reader
1b4524fcdfc79391a5cf982ce9c5681e600f4303
[ "MIT" ]
null
null
null
registration/migrations/0001_initial.py
wivn/feed-reader
1b4524fcdfc79391a5cf982ce9c5681e600f4303
[ "MIT" ]
null
null
null
# Generated by Django 3.0.2 on 2020-04-13 03:47 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permission...
63.577778
329
0.662356
import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migration...
true
true
1c037871c01e58343709cd066369a488aff8b8d7
5,062
py
Python
igv/igv.py
menghaowei/bio-playground
c9d79b46750eee5f16e86ee6aa183c02681d86e7
[ "MIT" ]
124
2015-01-09T16:55:03.000Z
2022-03-24T16:59:20.000Z
igv/igv.py
Nextomics/bio-playground
35787a489667e2ef2e3309e7fe56308d8709a924
[ "MIT" ]
16
2016-08-12T05:35:00.000Z
2021-11-16T03:38:35.000Z
igv/igv.py
brentp/bio-playground
1982a222328bca7b675dedaa3887600a7d3dad74
[ "MIT" ]
105
2015-01-21T00:45:13.000Z
2022-03-01T02:05:43.000Z
import socket import os.path as op import os import sys class IGV(object): r""" Simple wrapper to the IGV (http://www.broadinstitute.org/software/igv/home) socket interface (http://www.broadinstitute.org/software/igv/PortCommands) requires: 1) you have IGV running on your machine (launch wit...
29.430233
95
0.560846
import socket import os.path as op import os import sys class IGV(object): _socket = None _path = None def __init__(self, host='127.0.0.1', port=60151, snapshot_dir='/tmp/igv'): self.host = host self.port = port self.commands = [] self.connect() self.set_path(snaps...
true
true
1c037982b5069988b393f3bee1df09c15c69e085
7,681
py
Python
tests/providers/presto/operators/test_presto_check.py
codenamelxl/airflow
96804e2b6cd274dbe02ca433ff3e45370b829da6
[ "Apache-2.0" ]
3
2019-12-11T15:54:13.000Z
2021-05-24T20:21:08.000Z
tests/providers/presto/operators/test_presto_check.py
codenamelxl/airflow
96804e2b6cd274dbe02ca433ff3e45370b829da6
[ "Apache-2.0" ]
1
2020-08-31T15:45:49.000Z
2020-12-01T16:45:22.000Z
tests/providers/presto/operators/test_presto_check.py
codenamelxl/airflow
96804e2b6cd274dbe02ca433ff3e45370b829da6
[ "Apache-2.0" ]
2
2021-01-11T13:53:03.000Z
2021-10-02T05:06:34.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
34.599099
88
0.658117
import os import unittest from datetime import datetime from unittest import mock from airflow.exceptions import AirflowException from airflow.models import DAG from airflow.providers.presto.operators.presto_check import ( PrestoCheckOperator, PrestoIntervalCheckOperator, PrestoValueCheckOperator, ) DEFAULT_DAT...
true
true
1c0379a110c0b075261589ee2cd4b992894ae14b
8,502
py
Python
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/fts/fts_transitions/test_fts_transitions_03.py
zhangh43/gpdb
3e2d569b3d5faacdb5813f5a1d4f967607553498
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/fts/fts_transitions/test_fts_transitions_03.py
zhangh43/gpdb
3e2d569b3d5faacdb5813f5a1d4f967607553498
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/fts/fts_transitions/test_fts_transitions_03.py
zhangh43/gpdb
3e2d569b3d5faacdb5813f5a1d4f967607553498
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
48.582857
128
0.665373
import os from gppylib.commands.base import Command import tinctest from tinctest.lib import Gpdiff, local_path from mpp.gpdb.tests.storage.fts.fts_transitions.fts_transitions import FTSTestCase from mpp.lib.config import GPDBConfig from mpp.lib.filerep_util import Filerepe2e_Util from mpp.lib.gprecoverseg import GpRe...
true
true
1c037ac315bff15388c8b5165c6b14d155489960
1,341
py
Python
main.py
Cybermals/PyFastCGIServer
67b6b59689ba52e8fc2234d3480c6773edf7ba95
[ "MIT" ]
null
null
null
main.py
Cybermals/PyFastCGIServer
67b6b59689ba52e8fc2234d3480c6773edf7ba95
[ "MIT" ]
null
null
null
main.py
Cybermals/PyFastCGIServer
67b6b59689ba52e8fc2234d3480c6773edf7ba95
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """A CGI server.""" from socketserver import TCPServer from fastcgi import FcgiHandler #Classes #============================================================================= class RequestHandler(FcgiHandler): """HTTP request handler.""" def handle(self): """Handle the request.""" ...
31.186047
88
0.490679
from socketserver import TCPServer from fastcgi import FcgiHandler class RequestHandler(FcgiHandler): def handle(self): args = dict([arg.split("=") for arg in self.environ["QUERY_STRING"].split("&")]) with open(self.environ["SCRIPT_FILENAME"], "r") as f: co = ...
true
true
1c037b202b415bff056881cbe2be813aae92905e
11,453
py
Python
pipscoin/wallet/wallet_puzzle_store.py
Pipscoin-Network/pipscoin-blockchain
f400d26956881eb319786230506bb441f76f64d9
[ "Apache-2.0" ]
8
2021-08-29T15:13:45.000Z
2022-03-30T17:23:04.000Z
pipscoin/wallet/wallet_puzzle_store.py
Pipscoin-Network/pipscoin-blockchain
f400d26956881eb319786230506bb441f76f64d9
[ "Apache-2.0" ]
28
2021-08-29T02:08:07.000Z
2022-03-24T23:32:00.000Z
pipscoin/wallet/wallet_puzzle_store.py
Pipscoin-Network/pipscoin-blockchain
f400d26956881eb319786230506bb441f76f64d9
[ "Apache-2.0" ]
4
2021-08-29T12:59:05.000Z
2022-03-15T08:38:29.000Z
import asyncio import logging from typing import List, Optional, Set, Tuple import aiosqlite from blspy import G1Element from pipscoin.types.blockchain_format.sized_bytes import bytes32 from pipscoin.util.db_wrapper import DBWrapper from pipscoin.util.ints import uint32 from pipscoin.wallet.derivation_record import D...
32.91092
117
0.599581
import asyncio import logging from typing import List, Optional, Set, Tuple import aiosqlite from blspy import G1Element from pipscoin.types.blockchain_format.sized_bytes import bytes32 from pipscoin.util.db_wrapper import DBWrapper from pipscoin.util.ints import uint32 from pipscoin.wallet.derivation_record import D...
true
true
1c037c0a0666b1072469e0bb8dc5f425d27304ba
1,278
py
Python
openstack/network/v2/floatingip.py
sivel/python-openstacksdk
85c6a42c8f983b467c79e5dacdfdc996657250b1
[ "Apache-2.0" ]
1
2015-02-16T09:34:58.000Z
2015-02-16T09:34:58.000Z
openstack/network/v2/floatingip.py
sivel/python-openstacksdk
85c6a42c8f983b467c79e5dacdfdc996657250b1
[ "Apache-2.0" ]
null
null
null
openstack/network/v2/floatingip.py
sivel/python-openstacksdk
85c6a42c8f983b467c79e5dacdfdc996657250b1
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
34.540541
75
0.745696
from openstack.network import network_service from openstack import resource class FloatingIP(resource.Resource): resource_key = 'floatingip' resources_key = 'floatingips' base_path = '/v2.0/floatingips' service = network_service.NetworkService() allow_create = True allow_retrieve = True...
true
true
1c037c83472560218ba513df229dce67bb8030e6
819
py
Python
python/cusignal/filtering/__init__.py
murat-sever/cusignal
6e1f465b488828b3a14f5d7148d94d91096ee3c0
[ "Apache-2.0" ]
null
null
null
python/cusignal/filtering/__init__.py
murat-sever/cusignal
6e1f465b488828b3a14f5d7148d94d91096ee3c0
[ "Apache-2.0" ]
null
null
null
python/cusignal/filtering/__init__.py
murat-sever/cusignal
6e1f465b488828b3a14f5d7148d94d91096ee3c0
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019-2020, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
30.333333
74
0.736264
from cusignal.filtering.resample import ( decimate, resample, resample_poly, upfirdn ) from cusignal.filtering.filtering import ( wiener, lfiltic, hilbert, hilbert2, detrend, freq_shift )
true
true
1c037c9078192a2d7f2a6d5ccbda939c9295e1bc
7,452
py
Python
Lib/site-packages/pyqode/core/modes/extended_selection.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
null
null
null
Lib/site-packages/pyqode/core/modes/extended_selection.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
Lib/site-packages/pyqode/core/modes/extended_selection.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
null
null
null
""" This module contains the extended selection mode. """ from pyqode.qt import QtCore, QtWidgets, QtGui from pyqode.core.api import Mode, TextHelper TRIPLE_CLICK_TIMEOUT = 1000 class ExtendedSelectionMode(Mode): """ Adds extended selection capabilities (Ctrl/Alt + Double click). This mode adds extended sel...
40.281081
78
0.672974
from pyqode.qt import QtCore, QtWidgets, QtGui from pyqode.core.api import Mode, TextHelper TRIPLE_CLICK_TIMEOUT = 1000 class ExtendedSelectionMode(Mode): def __init__(self): super(ExtendedSelectionMode, self).__init__() self.extended_sel_modifier = QtCore.Qt.ControlModifier self.matched...
true
true
1c037d3480b39031025d1a537e5c5da449a8ce4f
3,418
py
Python
mayday/db/tables/__init__.py
cooomma/mayday-ticketing-bot
77377c19d9741e30416951e5d2364bbb66d762ad
[ "MIT" ]
4
2019-08-17T05:21:37.000Z
2019-08-30T03:24:32.000Z
mayday/db/tables/__init__.py
cooomma/mayday-ticketing-bot
77377c19d9741e30416951e5d2364bbb66d762ad
[ "MIT" ]
1
2021-04-30T20:45:10.000Z
2021-04-30T20:45:10.000Z
mayday/db/tables/__init__.py
cooomma/mayday-ticketing-bot
77377c19d9741e30416951e5d2364bbb66d762ad
[ "MIT" ]
3
2019-03-03T16:40:25.000Z
2019-08-17T08:01:19.000Z
from datetime import datetime import json import time import sqlalchemy from sqlalchemy import create_engine, types from sqlalchemy.ext.compiler import compiles from sqlalchemy.schema import MetaData from sqlalchemy.sql.expression import delete, insert, update class BaseModel: def __init__(self, engine, metadata...
28.016393
120
0.661791
from datetime import datetime import json import time import sqlalchemy from sqlalchemy import create_engine, types from sqlalchemy.ext.compiler import compiles from sqlalchemy.schema import MetaData from sqlalchemy.sql.expression import delete, insert, update class BaseModel: def __init__(self, engine, metadata...
true
true
1c037dbbe826fd98c260cbbf89072f057123d1e1
1,619
py
Python
src/pyhf/parameters/paramsets.py
coolalexzb/pyhf
e8ad7382bd408502807ad87a3fdf56396fbd1df9
[ "Apache-2.0" ]
null
null
null
src/pyhf/parameters/paramsets.py
coolalexzb/pyhf
e8ad7382bd408502807ad87a3fdf56396fbd1df9
[ "Apache-2.0" ]
null
null
null
src/pyhf/parameters/paramsets.py
coolalexzb/pyhf
e8ad7382bd408502807ad87a3fdf56396fbd1df9
[ "Apache-2.0" ]
null
null
null
from .. import default_backend class paramset(object): def __init__(self, **kwargs): self.n_parameters = kwargs.pop('n_parameters') self.suggested_init = kwargs.pop('inits') self.suggested_bounds = kwargs.pop('bounds') class unconstrained(paramset): def __init__(self, **kwargs): ...
29.436364
67
0.631872
from .. import default_backend class paramset(object): def __init__(self, **kwargs): self.n_parameters = kwargs.pop('n_parameters') self.suggested_init = kwargs.pop('inits') self.suggested_bounds = kwargs.pop('bounds') class unconstrained(paramset): def __init__(self, **kwargs): ...
true
true
1c037ef07ef5ca28f4c7781f732a40d467320699
70,463
py
Python
h2o-py/h2o/model/model_base.py
KamalGalrani/h2o-3
5d5b6b319569b03ad1bca004a6d1a5dc6972d433
[ "Apache-2.0" ]
null
null
null
h2o-py/h2o/model/model_base.py
KamalGalrani/h2o-3
5d5b6b319569b03ad1bca004a6d1a5dc6972d433
[ "Apache-2.0" ]
null
null
null
h2o-py/h2o/model/model_base.py
KamalGalrani/h2o-3
5d5b6b319569b03ad1bca004a6d1a5dc6972d433
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import os import traceback import warnings import h2o from h2o.base import Keyed from h2o.exceptions import H2OValueError from h2o.job import H2OJob from h2o.utils.backward_compatibility import backwards_compa...
44.738413
258
0.616465
from __future__ import absolute_import, division, print_function, unicode_literals import os import traceback import warnings import h2o from h2o.base import Keyed from h2o.exceptions import H2OValueError from h2o.job import H2OJob from h2o.utils.backward_compatibility import backwards_compatible from h2o.utils.compa...
true
true
1c037f68139a1ba639393c166000b7cde66c6c0b
19,354
py
Python
wildlifecompliance/components/applications/views.py
preranaandure/wildlifecompliance
bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5
[ "Apache-2.0" ]
1
2020-12-07T17:12:40.000Z
2020-12-07T17:12:40.000Z
wildlifecompliance/components/applications/views.py
preranaandure/wildlifecompliance
bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5
[ "Apache-2.0" ]
14
2020-01-08T08:08:26.000Z
2021-03-19T22:59:46.000Z
wildlifecompliance/components/applications/views.py
preranaandure/wildlifecompliance
bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5
[ "Apache-2.0" ]
15
2020-01-08T08:02:28.000Z
2021-11-03T06:48:32.000Z
from django.http import HttpResponse, JsonResponse from django.urls import reverse from django.shortcuts import render, redirect, get_object_or_404 from django.views.generic import View, TemplateView from django.conf import settings from django.template.loader import render_to_string from django.db import transaction f...
38.324752
114
0.567066
from django.http import HttpResponse, JsonResponse from django.urls import reverse from django.shortcuts import render, redirect, get_object_or_404 from django.views.generic import View, TemplateView from django.conf import settings from django.template.loader import render_to_string from django.db import transaction f...
true
true
1c03809e9576271e967ff66d9e605bf418dd0e61
255
py
Python
netsuitesdk/api/accounts.py
dokka-ai/netsuite-sdk-py2.7
93260dea1f02a6b1785b77ffcdd7f8fe3c9d0b76
[ "MIT" ]
null
null
null
netsuitesdk/api/accounts.py
dokka-ai/netsuite-sdk-py2.7
93260dea1f02a6b1785b77ffcdd7f8fe3c9d0b76
[ "MIT" ]
null
null
null
netsuitesdk/api/accounts.py
dokka-ai/netsuite-sdk-py2.7
93260dea1f02a6b1785b77ffcdd7f8fe3c9d0b76
[ "MIT" ]
1
2021-02-22T11:52:20.000Z
2021-02-22T11:52:20.000Z
from __future__ import absolute_import from .base import ApiBase import logging logger = logging.getLogger(__name__) class Accounts(ApiBase): def __init__(self, ns_client): ApiBase.__init__(self, ns_client=ns_client, type_name=u'Account')
21.25
73
0.772549
from __future__ import absolute_import from .base import ApiBase import logging logger = logging.getLogger(__name__) class Accounts(ApiBase): def __init__(self, ns_client): ApiBase.__init__(self, ns_client=ns_client, type_name=u'Account')
true
true
1c0380dbd38e3ad0ad36235443620f608fd89555
945
py
Python
ElevatorBot/backgroundEvents/boosterCountUpdater.py
TheDescend/elevatorbot
0909ec9ba213480bdf7f790c3d115dd8c4f3ae17
[ "MIT" ]
null
null
null
ElevatorBot/backgroundEvents/boosterCountUpdater.py
TheDescend/elevatorbot
0909ec9ba213480bdf7f790c3d115dd8c4f3ae17
[ "MIT" ]
41
2022-01-12T11:10:40.000Z
2022-03-22T09:47:25.000Z
ElevatorBot/backgroundEvents/boosterCountUpdater.py
TheDescend/elevatorbot
0909ec9ba213480bdf7f790c3d115dd8c4f3ae17
[ "MIT" ]
null
null
null
from ElevatorBot.backgroundEvents.base import BaseEvent from ElevatorBot.discordEvents.base import ElevatorSnake from ElevatorBot.misc.cache import descend_cache from ElevatorBot.networking.errors import BackendException from ElevatorBot.static.descendOnlyIds import descend_channels class BoosterCountUpdater(BaseEven...
35
86
0.72381
from ElevatorBot.backgroundEvents.base import BaseEvent from ElevatorBot.discordEvents.base import ElevatorSnake from ElevatorBot.misc.cache import descend_cache from ElevatorBot.networking.errors import BackendException from ElevatorBot.static.descendOnlyIds import descend_channels class BoosterCountUpdater(BaseEven...
true
true
1c0380e4750b7094f8f5760afc7bd792fade01a6
13,601
py
Python
topicnet/viewers/spectrum.py
tkhirianov/TopicNet
41318897d25b622da16f20d68fe9c315cd177b3c
[ "MIT" ]
1
2021-04-25T21:38:48.000Z
2021-04-25T21:38:48.000Z
topicnet/viewers/spectrum.py
tkhirianov/TopicNet
41318897d25b622da16f20d68fe9c315cd177b3c
[ "MIT" ]
null
null
null
topicnet/viewers/spectrum.py
tkhirianov/TopicNet
41318897d25b622da16f20d68fe9c315cd177b3c
[ "MIT" ]
null
null
null
""" A few ways to obtain "decent" solution to TSP problem which returns a spectre of topics in our case. If speed is the essence I recommend to use functions providing good initial solution. Which are, get_nearest_neighbour_init. If that solution is not good enough use annealing heuristic (get_annealed_spectrum). ...
33.665842
98
0.600544
import numpy as np import warnings from scipy.spatial import distance from tqdm import tqdm from .base_viewer import BaseViewer def get_nearest_neighbour_init(phi_matrix, metric='jensenshannon', start_topic=0): init_path = [start_topic, ] connection_candidates = [int(topic) for topic in np.arange(phi_matrix.s...
true
true
1c038120e2eb2aa500b18643814395b1a408682b
16,556
py
Python
venv/Lib/site-packages/hachoir/parser/container/swf.py
surendra841/my-sample-test
adafe6d8964d8edcabf9c5e18bde9bdac90904b6
[ "MIT" ]
null
null
null
venv/Lib/site-packages/hachoir/parser/container/swf.py
surendra841/my-sample-test
adafe6d8964d8edcabf9c5e18bde9bdac90904b6
[ "MIT" ]
null
null
null
venv/Lib/site-packages/hachoir/parser/container/swf.py
surendra841/my-sample-test
adafe6d8964d8edcabf9c5e18bde9bdac90904b6
[ "MIT" ]
null
null
null
""" SWF (Macromedia/Adobe Flash) file parser. Documentation: - Alexis' SWF Reference: http://www.m2osw.com/swf_alexref.html - http://www.half-serious.com/swf/format/ - http://www.anotherbigidea.com/javaswf/ - http://www.gnu.org/software/gnash/ Author: Victor Stinner Creation date: 29 october 2006 """ from ha...
35.913232
109
0.599299
from hachoir.parser import Parser from hachoir.field import (FieldSet, ParserError, Bit, Bits, UInt8, UInt16, Int32, UInt32, Int64, CString, Enum, Bytes, RawBytes, NullBits, String, SubFile) from hachoir.core.endian import LITTLE_ENDIAN, BIG_ENDIAN from hachoir.cor...
true
true
1c038401c95628fd8eccd49b8e436382bfb106e7
23,326
py
Python
h5pyViewer/hdfImage.py
warlock8hz/h5pyViewer
4955aa6fdd66255738bd86d7b8947282133c5b82
[ "BSD-2-Clause" ]
null
null
null
h5pyViewer/hdfImage.py
warlock8hz/h5pyViewer
4955aa6fdd66255738bd86d7b8947282133c5b82
[ "BSD-2-Clause" ]
null
null
null
h5pyViewer/hdfImage.py
warlock8hz/h5pyViewer
4955aa6fdd66255738bd86d7b8947282133c5b82
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python #*-----------------------------------------------------------------------* #| | #| Copyright (c) 2013 by Paul Scherrer Institute (http://www.psi.ch) | #| ...
34.40413
225
0.645031
if __name__ == '__main__': import wxversion wxversion.ensureMinimal('2.8') import wx import matplotlib as mpl if __name__ == '__main__': mpl.use('WXAgg') import os,h5py import numpy as np import utilities as ut from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas import pylab as...
true
true
1c0385189cb6665016807ba6ad1f969a9e37ddcd
1,515
py
Python
echoscope/config/config_bak.py
treeyh/echoscope
ef8933ce9a5dfe2ac8fb6e82bad8d5fa0d72a6da
[ "MIT" ]
1
2022-01-18T09:19:38.000Z
2022-01-18T09:19:38.000Z
echoscope/config/config_bak.py
treeyh/echoscope
ef8933ce9a5dfe2ac8fb6e82bad8d5fa0d72a6da
[ "MIT" ]
null
null
null
echoscope/config/config_bak.py
treeyh/echoscope
ef8933ce9a5dfe2ac8fb6e82bad8d5fa0d72a6da
[ "MIT" ]
1
2022-01-18T09:19:39.000Z
2022-01-18T09:19:39.000Z
# -*- coding: UTF-8 -*- import os from typing import List from echoscope.model import config_model # 配置文件 # 生成页面title DocTitle = '数据模型说明' # 根路径 BasePath = os.getcwd() # 全局输出路径 ExportPath = os.path.join(BasePath, 'export') # markdown输出路径 MarkdownExportPath = os.path.join(ExportPath, 'md') # 模板路径 TemplatePath = os.p...
28.055556
150
0.675908
import os from typing import List from echoscope.model import config_model DocTitle = '数据模型说明' BasePath = os.getcwd() ExportPath = os.path.join(BasePath, 'export') MarkdownExportPath = os.path.join(ExportPath, 'md') TemplatePath = os.path.join(BasePath, 'resources', 'template') LogPath = os.path.join(ExportPath, ...
true
true
1c0386deff29489b7f5bf46db5a80686979c9dc0
411
py
Python
reader/migrations/0021_auto_20180312_1445.py
Kadantte/comicake
205f327b920cbfdec86e57034d98a42f335d64ee
[ "ISC" ]
18
2018-05-01T04:56:37.000Z
2022-03-27T16:11:57.000Z
reader/migrations/0021_auto_20180312_1445.py
Kadantte/comicake
205f327b920cbfdec86e57034d98a42f335d64ee
[ "ISC" ]
32
2018-06-08T06:29:35.000Z
2022-03-11T23:32:21.000Z
reader/migrations/0021_auto_20180312_1445.py
Kadantte/comicake
205f327b920cbfdec86e57034d98a42f335d64ee
[ "ISC" ]
13
2018-04-25T20:14:01.000Z
2021-12-12T10:02:05.000Z
# Generated by Django 2.0.2 on 2018-03-12 21:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('reader', '0020_auto_20180312_1442'), ] operations = [ migrations.AlterField( model_name='comic', name='description',...
21.631579
72
0.610706
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('reader', '0020_auto_20180312_1442'), ] operations = [ migrations.AlterField( model_name='comic', name='description', field=models.TextField(blank=True, ...
true
true