hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
df97c8b436bc748e7f5e772adaa73e9d52cd85a7 | 682 | py | Python | examples/example-hangupcall.py | cyberfonica/plivohelper | 8e0288f8b908262a3e26ae7c83d1e587962cb881 | [
"MIT"
] | null | null | null | examples/example-hangupcall.py | cyberfonica/plivohelper | 8e0288f8b908262a3e26ae7c83d1e587962cb881 | [
"MIT"
] | null | null | null | examples/example-hangupcall.py | cyberfonica/plivohelper | 8e0288f8b908262a3e26ae7c83d1e587962cb881 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import plivohelper
import sys
try:
call_uuid = sys.argv[1]
except IndexError:
print "need CallUUID argument"
sys.exit(1)
# URL of the Plivo REST Service
REST_API_URL = 'http://127.0.0.1:8088'
API_VERSION = 'v0.1'
# Sid and AuthToken
SID = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
AUTH_... | 20.058824 | 68 | 0.737537 |
4ff21d43365a3750c8e76af564d2dc9e1e8be9e0 | 4,225 | py | Python | main.py | petehaha/WordleSolver | 30938b413ec81a7630ef494a07be75e1c44c52b1 | [
"MIT"
] | 3 | 2022-03-01T12:48:49.000Z | 2022-03-02T20:37:05.000Z | main.py | petehaha/WordleSolver | 30938b413ec81a7630ef494a07be75e1c44c52b1 | [
"MIT"
] | null | null | null | main.py | petehaha/WordleSolver | 30938b413ec81a7630ef494a07be75e1c44c52b1 | [
"MIT"
] | 1 | 2022-03-02T16:41:41.000Z | 2022-03-02T16:41:41.000Z | import string
import random
from collections import defaultdict
with open("wordle-answers-alphabetical.txt", "r") as file:
words = file.readlines()
# Computes probability for all letters and returns words which contain them.
def rebalance(probs={}, numPasses=0):
if probs:
for key, val in probs.items()... | 31.296296 | 116 | 0.632663 |
87bd944f767d40069b591b2fb4609019db0e48f5 | 7,435 | py | Python | tests/end2end/test_storage_volume_template.py | zhmcclient/python-zhmcclient | 7d200afb0343a02535c52dc8b6ba0d224010075c | [
"Apache-2.0"
] | 30 | 2016-08-24T10:02:19.000Z | 2021-11-25T10:44:26.000Z | tests/end2end/test_storage_volume_template.py | zhmcclient/python-zhmcclient | 7d200afb0343a02535c52dc8b6ba0d224010075c | [
"Apache-2.0"
] | 883 | 2016-08-23T12:32:12.000Z | 2022-03-28T13:18:24.000Z | tests/end2end/test_storage_volume_template.py | zhmcclient/python-zhmcclient | 7d200afb0343a02535c52dc8b6ba0d224010075c | [
"Apache-2.0"
] | 25 | 2017-06-23T18:10:51.000Z | 2022-03-28T02:53:29.000Z | # Copyright 2021 IBM Corp. 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 agre... | 37.741117 | 104 | 0.645595 |
655000e98f25fb8aabdc5e856775ac5246822311 | 197 | py | Python | task3.py | ammkazi/pythonB2 | 4ceba24f3dcd40f110b6fda8057d58ab1e4be88f | [
"MIT"
] | null | null | null | task3.py | ammkazi/pythonB2 | 4ceba24f3dcd40f110b6fda8057d58ab1e4be88f | [
"MIT"
] | null | null | null | task3.py | ammkazi/pythonB2 | 4ceba24f3dcd40f110b6fda8057d58ab1e4be88f | [
"MIT"
] | null | null | null | # reverse a list of names given by the user and print it
names = []
for i in range(3):
str = input("Enter name: ")
names.append(str)
print(names)
names.reverse()
print(names)
| 16.416667 | 57 | 0.624365 |
b4ab5545477a7eeb281293ab6aaf2f76ecb9afb1 | 2,699 | py | Python | xlsxwriter/chart_radar.py | shareablee/XlsxWriter | 3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9 | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2016-02-13T05:37:05.000Z | 2021-02-03T06:15:14.000Z | xlsxwriter/chart_radar.py | shareablee/XlsxWriter | 3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9 | [
"BSD-2-Clause-FreeBSD"
] | 14 | 2017-02-02T18:13:32.000Z | 2021-07-29T10:38:35.000Z | xlsxwriter/chart_radar.py | shareablee/XlsxWriter | 3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9 | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2016-06-17T15:39:44.000Z | 2019-08-29T15:33:57.000Z | ###############################################################################
#
# ChartRadar - A class for writing the Excel XLSX Radar charts.
#
# Copyright 2013-2015, John McNamara, jmcnamara@cpan.org
#
from . import chart
class ChartRadar(chart.Chart):
"""
A class for writing the Excel XLSX Radar charts... | 26.460784 | 79 | 0.462764 |
cf3dba8daa688daf852178ac5c421f8dbf01a133 | 24,388 | py | Python | qml/apps/customer_lifetime_value.py | SammyOngaya/qml | d4ede647a0ea79c9c4f07d4219e6576a55a3c343 | [
"Apache-2.0"
] | 1 | 2021-04-04T09:14:03.000Z | 2021-04-04T09:14:03.000Z | qml/apps/customer_lifetime_value.py | SammyOngaya/qml | d4ede647a0ea79c9c4f07d4219e6576a55a3c343 | [
"Apache-2.0"
] | null | null | null | qml/apps/customer_lifetime_value.py | SammyOngaya/qml | d4ede647a0ea79c9c4f07d4219e6576a55a3c343 | [
"Apache-2.0"
] | null | null | null | # Dash dependencies import
import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_uploader as du
import dash_bootstrap_components as dbc
import plotly.figure_factory as ff
from dash.dependencies import Input, Output,State
import dash_table
import plotly.express as px
import plotl... | 39.272142 | 212 | 0.58988 |
dd7618f8e248cda1f777581a1adf52af475c8143 | 4,598 | py | Python | demuxEM/commands/DemuxEM.py | lilab-bcb/demuxEM | aa9fcbbd61ac62514b4e4319c842485ae520bb59 | [
"BSD-3-Clause"
] | 1 | 2021-02-17T08:39:36.000Z | 2021-02-17T08:39:36.000Z | demuxEM/commands/DemuxEM.py | lilab-bcb/demuxEM | aa9fcbbd61ac62514b4e4319c842485ae520bb59 | [
"BSD-3-Clause"
] | 7 | 2020-07-12T16:40:18.000Z | 2021-10-05T04:29:40.000Z | demuxEM/commands/DemuxEM.py | lilab-bcb/demuxEM | aa9fcbbd61ac62514b4e4319c842485ae520bb59 | [
"BSD-3-Clause"
] | 1 | 2020-07-12T15:09:23.000Z | 2020-07-12T15:09:23.000Z | from .Base import Base
from demuxEM.pipeline import run_pipeline
class DemuxEM(Base):
"""
Run the DemuxEM pipeline for cell-hashing/nucleus-hashing data.
Usage:
demuxEM [options] <input_raw_gene_bc_matrices_h5> <input_hto_csv_file> <output_name>
demuxEM -h | --help
demuxEM -v | --version
Arguments:
inpu... | 68.626866 | 326 | 0.669204 |
8cc5d9ba16e1232d6972b89c53d651ec299ce2f7 | 61 | py | Python | mars/lib/uhashring/__init__.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | 1 | 2022-02-02T03:03:48.000Z | 2022-02-02T03:03:48.000Z | mars/lib/uhashring/__init__.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | null | null | null | mars/lib/uhashring/__init__.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | null | null | null | from .ring import HashRing
__all__ = ["HashRing", "monkey"]
| 15.25 | 32 | 0.704918 |
65df1e5bd35e59f1e0749b7e936ce6d8a58b0105 | 11,567 | py | Python | reg.py | BioinfoTongLI/image_registrator | f426632ed04473a9223ee24282fbc8160c4080f4 | [
"Apache-2.0"
] | null | null | null | reg.py | BioinfoTongLI/image_registrator | f426632ed04473a9223ee24282fbc8160c4080f4 | [
"Apache-2.0"
] | null | null | null | reg.py | BioinfoTongLI/image_registrator | f426632ed04473a9223ee24282fbc8160c4080f4 | [
"Apache-2.0"
] | null | null | null | import re
import os
import os.path as osp
import gc
import argparse
from datetime import datetime
from typing import List
import numpy as np
from skimage.transform import AffineTransform, warp
import pandas as pd
import cv2 as cv
import tifffile as tif
import dask
from metadata_handling import generate_new_metadata, ... | 40.444056 | 143 | 0.644679 |
421a8b6d83c023de4f70413ad9de841ce82df263 | 388,738 | py | Python | pysnmp-with-texts/F5-BIGIP-GLOBAL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/F5-BIGIP-GLOBAL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/F5-BIGIP-GLOBAL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module F5-BIGIP-GLOBAL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/F5-BIGIP-GLOBAL-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:11:42 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default... | 148.147104 | 11,313 | 0.778975 |
568039b99eb9107a9a5af36bb20e374297ff9d09 | 387 | py | Python | project/meals/migrations/0003_meals_slug.py | hasansarifdeveloper/ResturentManagment | d018161d209547aac605ff5f140ca5aaadcae211 | [
"bzip2-1.0.6"
] | null | null | null | project/meals/migrations/0003_meals_slug.py | hasansarifdeveloper/ResturentManagment | d018161d209547aac605ff5f140ca5aaadcae211 | [
"bzip2-1.0.6"
] | 10 | 2020-06-05T22:38:43.000Z | 2022-02-10T12:32:15.000Z | project/meals/migrations/0003_meals_slug.py | hasansarifdeveloper/ResturentManagment | d018161d209547aac605ff5f140ca5aaadcae211 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.3 on 2019-08-01 14:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('meals', '0002_auto_20190730_2245'),
]
operations = [
migrations.AddField(
model_name='meals',
name='slug',
... | 20.368421 | 58 | 0.591731 |
515a61f8399edb12262e9cdbd987e0ed3d78ae11 | 5,998 | py | Python | people-and-planet-ai/image-classification/e2e_test.py | glasnt/python-docs-samples | 9869d47937b45840072485f86248438efa1c955d | [
"Apache-2.0"
] | 1 | 2022-02-27T09:47:15.000Z | 2022-02-27T09:47:15.000Z | people-and-planet-ai/image-classification/e2e_test.py | glasnt/python-docs-samples | 9869d47937b45840072485f86248438efa1c955d | [
"Apache-2.0"
] | 7 | 2020-06-08T15:47:54.000Z | 2020-08-12T22:59:39.000Z | people-and-planet-ai/image-classification/e2e_test.py | glasnt/python-docs-samples | 9869d47937b45840072485f86248438efa1c955d | [
"Apache-2.0"
] | 1 | 2021-05-27T13:50:20.000Z | 2021-05-27T13:50:20.000Z | # Copyright 2021 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.322222 | 87 | 0.673391 |
eb95c70eb63137d8498768f6062fbe245155601f | 954 | py | Python | solutions/1170_compare_strings_by_frequency_of_the_smallest_character.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/1170_compare_strings_by_frequency_of_the_smallest_character.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/1170_compare_strings_by_frequency_of_the_smallest_character.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | class Solution:
def numSmallerByFrequency(self, queries: List[str], words: List[str]) -> List[int]:
fw = sorted([self._get_f(w) for w in words])
return [self._query(fw, q) for q in queries]
def _get_f(self, w):
"""Running time: O(n) where n is the length of w.
"""
... | 26.5 | 87 | 0.404612 |
66c08daa79851afa50d6633f198527de7f0b3e68 | 10,984 | py | Python | scripts/master_sync.py | AlexisTM/multimaster_ros | 807ff537479d171d3a41c1cc61c9e5c763c7ee80 | [
"MIT"
] | 1 | 2017-07-17T12:23:39.000Z | 2017-07-17T12:23:39.000Z | scripts/master_sync.py | AlexisTM/multimaster_ros | 807ff537479d171d3a41c1cc61c9e5c763c7ee80 | [
"MIT"
] | 1 | 2020-10-15T21:49:45.000Z | 2020-10-22T07:29:06.000Z | scripts/master_sync.py | AlexisTM/multimaster_ros | 807ff537479d171d3a41c1cc61c9e5c763c7ee80 | [
"MIT"
] | 2 | 2017-07-17T12:24:01.000Z | 2019-08-28T19:13:28.000Z | #!/usr/bin/env python
import roslib; roslib.load_manifest('multimaster')
import roslib.network
import threading
import time
import urlparse
import rosgraph
import rosgraph.names
import rosgraph.network
import rospy
from rospy.core import global_name, is_topic
from rospy.impl.validators import non_empty, ParameterI... | 36.613333 | 119 | 0.630462 |
8676ed32888c9c2a9751e3b45bf4db0a7ff777ca | 1,616 | py | Python | demos/unpaired_us_prostate_cv/demo_predict.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 379 | 2020-07-18T22:00:53.000Z | 2022-03-31T05:17:29.000Z | demos/unpaired_us_prostate_cv/demo_predict.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 646 | 2020-07-18T08:55:48.000Z | 2022-03-29T02:24:54.000Z | demos/unpaired_us_prostate_cv/demo_predict.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 62 | 2020-07-26T05:00:23.000Z | 2022-02-22T21:58:19.000Z | import argparse
from datetime import datetime
from deepreg.predict import predict
name = "unpaired_us_prostate_cv"
# parser is used to simplify testing, by default it is not used
# please run the script with --full flag to ensure non-testing mode
# for instance:
# python script.py --full
parser = argparse.ArgumentP... | 26.933333 | 72 | 0.633045 |
c8a7bf33404ab423e6bf41c16a85785e21eaf58b | 8,031 | py | Python | rlpyt/samplers/parallel/base.py | BorenTsai/rlpyt | 58637fc3a1949b7dd39719a5bb8a055bfb33a845 | [
"MIT"
] | null | null | null | rlpyt/samplers/parallel/base.py | BorenTsai/rlpyt | 58637fc3a1949b7dd39719a5bb8a055bfb33a845 | [
"MIT"
] | null | null | null | rlpyt/samplers/parallel/base.py | BorenTsai/rlpyt | 58637fc3a1949b7dd39719a5bb8a055bfb33a845 | [
"MIT"
] | null | null | null |
import multiprocessing as mp
import ctypes
import time
from rlpyt.samplers.base import BaseSampler
from rlpyt.samplers.buffer import build_samples_buffer
from rlpyt.samplers.parallel.worker import sampling_process
from rlpyt.utils.logging import logger
from rlpyt.utils.collections import AttrDict
from rlpyt.utils.syn... | 38.797101 | 88 | 0.595941 |
391560ea1ba3e4c40a5c4288ff1bc2ce7cd62f50 | 750 | py | Python | bin/other/find-the-russians.py | adjspecies/furrypoll-munger | 8dfe57e873ccad899fbb4c1395cf89e5a70d043a | [
"MIT"
] | 1 | 2019-01-24T01:57:17.000Z | 2019-01-24T01:57:17.000Z | bin/other/find-the-russians.py | adjspecies/furrypoll-munger | 8dfe57e873ccad899fbb4c1395cf89e5a70d043a | [
"MIT"
] | 1 | 2016-01-10T23:59:39.000Z | 2016-01-10T23:59:39.000Z | bin/other/find-the-russians.py | adjspecies/furrypoll-munger | 8dfe57e873ccad899fbb4c1395cf89e5a70d043a | [
"MIT"
] | 1 | 2015-04-05T18:43:12.000Z | 2015-04-05T18:43:12.000Z | import csv
russians = {
'2009': {
'n': 0.0,
'russians': 0.0,
},
'2010': {
'n': 0.0,
'russians': 0.0,
},
'2011': {
'n': 0.0,
'russians': 0.0,
},
'2012': {
'n': 0.0,
'russians': 0.0,
},
'2013': {
'n': 0.0,
... | 20.27027 | 75 | 0.416 |
29601e445d405f808315a32a82e0bd0838283749 | 752 | py | Python | src/review_app/urls.py | el-Joft/review-app | e19760b13d915511cd06c5869255a3274ec2ca78 | [
"MIT"
] | null | null | null | src/review_app/urls.py | el-Joft/review-app | e19760b13d915511cd06c5869255a3274ec2ca78 | [
"MIT"
] | null | null | null | src/review_app/urls.py | el-Joft/review-app | e19760b13d915511cd06c5869255a3274ec2ca78 | [
"MIT"
] | null | null | null | """review_app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 34.181818 | 77 | 0.710106 |
c3d1dad9e4a6aa003a0ea5ae9215acdaa1ec4268 | 1,466 | py | Python | data_downsample.py | cmacphillamy/DeepHiC | 8ea2fad89bc8fe9c82bd4f89f53a175fa44eaaca | [
"MIT"
] | 17 | 2019-11-21T20:41:27.000Z | 2021-07-27T13:12:44.000Z | data_downsample.py | cmacphillamy/DeepHiC | 8ea2fad89bc8fe9c82bd4f89f53a175fa44eaaca | [
"MIT"
] | 6 | 2019-08-24T19:02:46.000Z | 2022-01-25T00:07:02.000Z | data_downsample.py | cmacphillamy/DeepHiC | 8ea2fad89bc8fe9c82bd4f89f53a175fa44eaaca | [
"MIT"
] | 7 | 2019-11-20T18:41:37.000Z | 2022-01-05T14:27:03.000Z | import os, sys
import time
import argparse
import multiprocessing
import numpy as np
from utils.io import compactM, spreadM, downsampling
from all_parser import *
def downsample(in_file, low_res, ratio):
data = np.load(in_file)
hic = data['hic']
compact_idx = data['compact']
down_hic = downsampling(hic... | 34.904762 | 97 | 0.701228 |
da3151d0deafcc3dcc4b916e35ee1d9b99ff1ea2 | 9,641 | py | Python | src/myrtlespeech/builders/speech_to_text.py | MyrtleSoftware/myrtlespeech | 8522048fd37744ffa06827a0cbd202b839a15453 | [
"BSD-3-Clause"
] | 11 | 2019-10-24T05:24:38.000Z | 2020-08-13T15:05:29.000Z | src/myrtlespeech/builders/speech_to_text.py | MyrtleSoftware/myrtlespeech | 8522048fd37744ffa06827a0cbd202b839a15453 | [
"BSD-3-Clause"
] | 20 | 2019-10-17T16:20:35.000Z | 2021-03-15T10:49:04.000Z | src/myrtlespeech/builders/speech_to_text.py | MyrtleSoftware/myrtlespeech | 8522048fd37744ffa06827a0cbd202b839a15453 | [
"BSD-3-Clause"
] | 1 | 2019-11-04T18:38:27.000Z | 2019-11-04T18:38:27.000Z | """Builds an :py:class:`.SpeechToText` model from a protobuf configuration."""
from typing import Callable
from typing import List
from typing import Tuple
from myrtlespeech.builders.ctc_beam_decoder import (
build as build_ctc_beam_decoder,
)
from myrtlespeech.builders.ctc_loss import build as build_ctc_loss
from... | 35.315018 | 98 | 0.584587 |
ca182f621fcc0326d0acb6b6f3787ad01339f9b7 | 2,695 | py | Python | App/App/app.py | YaraSabry96/Assignment3_NTI1 | 3bf2b8a0817ebeca6f489154ab9ce89a38a06b5b | [
"Apache-2.0"
] | null | null | null | App/App/app.py | YaraSabry96/Assignment3_NTI1 | 3bf2b8a0817ebeca6f489154ab9ce89a38a06b5b | [
"Apache-2.0"
] | null | null | null | App/App/app.py | YaraSabry96/Assignment3_NTI1 | 3bf2b8a0817ebeca6f489154ab9ce89a38a06b5b | [
"Apache-2.0"
] | null | null | null | from flask import Flask,render_template
from flask import jsonify,request
from model import Model1
# LR name of file , Model name of class
clf1 = Model1()
# 5at object mn el class elli hya Model fe clf
app = Flask(__name__)
#@app.route("/home")
#def index():
# return render_template('from.html')
@app.route("/rea... | 22.838983 | 69 | 0.63525 |
4086741cd70eb79713e006803b745dd7a18075bd | 1,675 | py | Python | Level1/Lessons67256/wowo0709.py | StudyForCoding/ProgrammersLevel | dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25 | [
"MIT"
] | null | null | null | Level1/Lessons67256/wowo0709.py | StudyForCoding/ProgrammersLevel | dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25 | [
"MIT"
] | null | null | null | Level1/Lessons67256/wowo0709.py | StudyForCoding/ProgrammersLevel | dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25 | [
"MIT"
] | 1 | 2021-04-05T07:35:59.000Z | 2021-04-05T07:35:59.000Z | # [카카오 인턴] 키패드 누르기
def manhattanDist(pos1,pos2):
return abs(pos1[0]-pos2[0])+abs(pos1[1]-pos2[1])
def solution(numbers, hand):
answer = ''
l,r = 10,12 # 10 = *, 12 = #
pos = {0:[3,1]} # 키패드 숫자의 위치(행,열)
for n in range(1,13):
pos[n] = [(n-1)//3,(n-1)%3] # 행,열
for i in range(len(numbers)... | 28.87931 | 55 | 0.451343 |
54f48e504e173c6b0ca379e94775683ff014f379 | 944 | py | Python | scripts/statcast_timing.py | reddigari/pybaseball | 2d878cf3505ce0a5e657694ae967d6275dc3c211 | [
"MIT"
] | 650 | 2017-06-29T20:05:19.000Z | 2022-03-31T03:27:25.000Z | scripts/statcast_timing.py | reddigari/pybaseball | 2d878cf3505ce0a5e657694ae967d6275dc3c211 | [
"MIT"
] | 216 | 2017-10-21T05:05:08.000Z | 2022-03-31T04:04:53.000Z | scripts/statcast_timing.py | reddigari/pybaseball | 2d878cf3505ce0a5e657694ae967d6275dc3c211 | [
"MIT"
] | 214 | 2017-07-18T21:40:01.000Z | 2022-03-29T03:19:55.000Z | import argparse
import sys
import time
from pybaseball import statcast
DEFAULT_TIME_THRESHOLD = 30
DEFAULT_START_DATE = "2018-08-01"
DEFAULT_END_DATE = "2018-08-10"
def _parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("--start-date", required=False, default=DEFAULT_START_DATE)
parser... | 30.451613 | 109 | 0.73411 |
65cbc645867acf7831bd25759d41cab2956daced | 17,545 | py | Python | rest_framework_json_api/utils.py | sha016/django-rest-framework-json-api | c4337f15f59811c4e72f33cf6eb3a4667cb4b197 | [
"BSD-2-Clause"
] | null | null | null | rest_framework_json_api/utils.py | sha016/django-rest-framework-json-api | c4337f15f59811c4e72f33cf6eb3a4667cb4b197 | [
"BSD-2-Clause"
] | null | null | null | rest_framework_json_api/utils.py | sha016/django-rest-framework-json-api | c4337f15f59811c4e72f33cf6eb3a4667cb4b197 | [
"BSD-2-Clause"
] | null | null | null | import inspect
import operator
import warnings
from collections import OrderedDict
import inflection
from django.conf import settings
from django.db.models import Manager
from django.db.models.fields.related_descriptors import (
ManyToManyDescriptor,
ReverseManyToOneDescriptor,
)
from django.http import Http40... | 35.516194 | 99 | 0.660815 |
ba9051bfe9826a3ccf8cec54432b29064d88844c | 1,268 | py | Python | setup.py | Michielskilian/python-colorlog | d89edb7f9c563e22f00fbacee49352a3bbd7708b | [
"MIT"
] | null | null | null | setup.py | Michielskilian/python-colorlog | d89edb7f9c563e22f00fbacee49352a3bbd7708b | [
"MIT"
] | null | null | null | setup.py | Michielskilian/python-colorlog | d89edb7f9c563e22f00fbacee49352a3bbd7708b | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='colorlog',
version='4.0.2',
description='Log formatting with colors!',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author='Sam Clements',
author_email='sam@borntyping.co.uk',
url='https://github.co... | 29.488372 | 56 | 0.585962 |
389166286238b467dcc1c9be10d2972265d266bf | 100 | py | Python | cryptodock_suite/actions/signal_rate_over_time/__init__.py | the-launch-tech/cryptodock-suite | 360d90c3531322b43df8df5e64ebbffc3241fe07 | [
"MIT"
] | null | null | null | cryptodock_suite/actions/signal_rate_over_time/__init__.py | the-launch-tech/cryptodock-suite | 360d90c3531322b43df8df5e64ebbffc3241fe07 | [
"MIT"
] | null | null | null | cryptodock_suite/actions/signal_rate_over_time/__init__.py | the-launch-tech/cryptodock-suite | 360d90c3531322b43df8df5e64ebbffc3241fe07 | [
"MIT"
] | null | null | null | __all__ = [
'signal_rate_over_time'
]
from .signal_rate_over_time import signal_rate_over_time
| 16.666667 | 56 | 0.8 |
8112b1657d73df0031270c694e657b9678085300 | 3,195 | py | Python | kitsune/sumo/anonymous.py | navgurukul-shivani18/kitsune | a7cf49ab1bfcf4e770938116968824b2b0fa5bb1 | [
"BSD-3-Clause"
] | 4 | 2021-05-17T11:38:08.000Z | 2021-08-19T06:42:39.000Z | kitsune/sumo/anonymous.py | navgurukul-shivani18/kitsune | a7cf49ab1bfcf4e770938116968824b2b0fa5bb1 | [
"BSD-3-Clause"
] | 32 | 2021-04-15T22:35:58.000Z | 2022-01-04T21:30:05.000Z | kitsune/sumo/anonymous.py | navgurukul-shivani18/kitsune | a7cf49ab1bfcf4e770938116968824b2b0fa5bb1 | [
"BSD-3-Clause"
] | 3 | 2020-06-14T06:59:46.000Z | 2020-06-15T14:45:56.000Z | """
Django middleware for identifying unauthenticated users using a cookie.
This is used in kitsune to keep track of their actions such as voting and
submitting questions.
The middleware adds an `anonymous` attribute to the request object. It is
initialized to the value of the anonymous id cookie, if set.
The anonymo... | 31.633663 | 78 | 0.658842 |
cda03e60601b2bf566804b85bf8b25c7cc575554 | 24,066 | py | Python | build/android/gyp/compile_resources.py | CaiHuan/opengl_study | 0d4ed469f770dc864ba463b1d17cf2f1687e7d41 | [
"MIT"
] | null | null | null | build/android/gyp/compile_resources.py | CaiHuan/opengl_study | 0d4ed469f770dc864ba463b1d17cf2f1687e7d41 | [
"MIT"
] | null | null | null | build/android/gyp/compile_resources.py | CaiHuan/opengl_study | 0d4ed469f770dc864ba463b1d17cf2f1687e7d41 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Compile Android resources into an intermediate APK.
This can also generate an R.txt, and an .srcjar file containing the prope... | 35.391176 | 80 | 0.700199 |
d6936cb2fb7b5c1c9eb7e51f6e6a2f82248118dd | 638 | py | Python | datafluids/api.py | varunshah1106/datafluids | 94299bd40f184ce033f997d9a09581c05b2c8629 | [
"MIT"
] | null | null | null | datafluids/api.py | varunshah1106/datafluids | 94299bd40f184ce033f997d9a09581c05b2c8629 | [
"MIT"
] | null | null | null | datafluids/api.py | varunshah1106/datafluids | 94299bd40f184ce033f997d9a09581c05b2c8629 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import jsonify
from flask import request
from flask_pymongo import PyMongo
from config import config
from bson import json_util
import datetime
import json
app = Flask(__name__)
app.config.update(config)
mongo = PyMongo(app)
@app.route('/', methods=['GET'])
def root():
folderp... | 21.266667 | 75 | 0.688088 |
0f6471c626bf21a176de709ea951609094d7e936 | 327 | py | Python | qurry/libraries/standard_library/constructs/cascade.py | LSaldyt/curry | 9004a396ec2e351aa143a10a53156649a6747343 | [
"MIT"
] | 11 | 2018-07-28T17:08:23.000Z | 2019-02-08T03:04:03.000Z | qurry/libraries/standard_library/constructs/cascade.py | LSaldyt/Qurry | 9004a396ec2e351aa143a10a53156649a6747343 | [
"MIT"
] | 33 | 2019-07-09T09:46:44.000Z | 2019-09-23T23:44:37.000Z | qurry/libraries/standard_library/constructs/cascade.py | LSaldyt/Qurry | 9004a396ec2e351aa143a10a53156649a6747343 | [
"MIT"
] | 4 | 2019-05-28T01:27:49.000Z | 2019-12-26T18:01:51.000Z | from ..datatypes.block import Block
def cascade(block, kernel=None):
'''
Entangle multiple qubits, sequentially.
'''
code = []
if not isinstance(block, Block):
block = kernel.definitions[block]
for i in range(block.start, block.end - 1):
code.append(['CNOT', i, i + 1])
retur... | 25.153846 | 47 | 0.614679 |
d6ac4c3e76d7bc953ab53148bb11abc512af52b1 | 7,119 | py | Python | FasterRCNN_SE_Train/src/cntk/debugging/tests/debug_test.py | springkim/FasterRCNN_SpringEdition | 7771dcf310cd80a195c44839c83e65adcd5df37d | [
"MIT"
] | 9 | 2017-10-03T14:02:29.000Z | 2019-05-31T01:07:40.000Z | FasterRCNN_SE_Train/src/cntk/debugging/tests/debug_test.py | springkim/FasterRCNN_SpringEdition | 7771dcf310cd80a195c44839c83e65adcd5df37d | [
"MIT"
] | 2 | 2018-06-21T11:09:36.000Z | 2018-10-25T18:05:30.000Z | FasterRCNN_SE_Train/src/cntk/debugging/tests/debug_test.py | springkim/FasterRCNN_SpringEdition | 7771dcf310cd80a195c44839c83e65adcd5df37d | [
"MIT"
] | 1 | 2019-03-22T02:16:17.000Z | 2019-03-22T02:16:17.000Z | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
import numpy as np
import cntk as C
from cntk import sgd, Trainer, learning_rate_sch... | 36.137056 | 168 | 0.612867 |
7d257dfabbb87e81d126350bd56e69fb5dea9877 | 48,173 | py | Python | lib/jnpr/jsnapy/jsnapy.py | gcasella/jsnapy | 839aa1d874972e1bfef253a22d57b8a75850d9ff | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lib/jnpr/jsnapy/jsnapy.py | gcasella/jsnapy | 839aa1d874972e1bfef253a22d57b8a75850d9ff | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lib/jnpr/jsnapy/jsnapy.py | gcasella/jsnapy | 839aa1d874972e1bfef253a22d57b8a75850d9ff | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 1999-2016, Juniper Networks Inc.
#
# All rights reserved.
#
from six import iteritems
import argparse
import getpass
import logging
import os
import queue
import sys
import textwrap
from copy import deepcopy
from threading import Thread
from os.path import expanduser
import yaml
fro... | 42.555654 | 181 | 0.515102 |
5439234c50a989226447263e896d70963b1e5721 | 14,749 | py | Python | genshi/template/loader.py | omunroe-com/sbvedwllorg | f0a4b27fe66d785e1a9635c0de7eeeea8265fea1 | [
"BSD-3-Clause"
] | 476 | 2015-01-07T08:59:53.000Z | 2022-02-11T09:46:06.000Z | genshi/template/loader.py | omunroe-com/sbvedwllorg | f0a4b27fe66d785e1a9635c0de7eeeea8265fea1 | [
"BSD-3-Clause"
] | 82 | 2015-01-15T12:30:43.000Z | 2022-01-06T02:56:53.000Z | genshi/template/loader.py | omunroe-com/sbvedwllorg | f0a4b27fe66d785e1a9635c0de7eeeea8265fea1 | [
"BSD-3-Clause"
] | 99 | 2015-01-14T19:53:45.000Z | 2021-08-11T15:17:26.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2010 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | 42.750725 | 80 | 0.603092 |
b6cc7d9e64e7737269444bb459b7c718e8266879 | 2,528 | py | Python | backend/api/services/vehicle.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | null | null | null | backend/api/services/vehicle.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | null | null | null | backend/api/services/vehicle.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | null | null | null | import logging
from api.models.vehicle_change_history import VehicleChangeHistory
from api.models.vehicle_statuses import VehicleDefinitionStatuses
from django.core.exceptions import PermissionDenied
from api.models.sales_submission_content import SalesSubmissionContent
from django.db.models import Q
import xlrd
from ... | 34.630137 | 76 | 0.671282 |
67af5a07ad3c1a9b1255d7960278a82ea01ae256 | 2,462 | py | Python | tests/test_nn_Hardswish.py | SamDM/Paddle2ONNX | 5ae527e966c4ea62b1f35fd326efbc45385c5580 | [
"Apache-2.0"
] | null | null | null | tests/test_nn_Hardswish.py | SamDM/Paddle2ONNX | 5ae527e966c4ea62b1f35fd326efbc45385c5580 | [
"Apache-2.0"
] | null | null | null | tests/test_nn_Hardswish.py | SamDM/Paddle2ONNX | 5ae527e966c4ea62b1f35fd326efbc45385c5580 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 24.868687 | 74 | 0.599919 |
df9c863a9584c0fc674be40a98268410594f3fb5 | 1,759 | py | Python | main.py | vietnguyen2000/Reversi | d920f574853f359d6f6e2c436bdd951b1759dcd7 | [
"MIT"
] | null | null | null | main.py | vietnguyen2000/Reversi | d920f574853f359d6f6e2c436bdd951b1759dcd7 | [
"MIT"
] | 2 | 2021-07-18T13:18:00.000Z | 2021-07-18T13:19:35.000Z | main.py | vietnguyen2000/Reversi | d920f574853f359d6f6e2c436bdd951b1759dcd7 | [
"MIT"
] | null | null | null | import logging
import coloredlogs
from Coach import Coach
from CoGanh.CoGanhGame import CoGanhGame as Game
from CoGanh.pytorch.NNet import NNetWrapper as nn
from utils import *
import sys
sys.setrecursionlimit(2000)
log = logging.getLogger(__name__)
coloredlogs.install(level='INFO') # Change this to DEBUG to see ... | 29.316667 | 127 | 0.660034 |
46a7123e4c977deb2b0a1b0d681d3d336a5987af | 3,438 | py | Python | homeassistant/components/unifi/unifi_entity_base.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 6 | 2020-07-18T16:33:25.000Z | 2021-09-26T09:52:04.000Z | homeassistant/components/unifi/unifi_entity_base.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 47 | 2020-07-23T07:14:33.000Z | 2022-03-31T06:01:46.000Z | homeassistant/components/unifi/unifi_entity_base.py | klauern/home-assistant-core | c18ba6aec0627e6afb6442c678edb5ff2bb17db6 | [
"Apache-2.0"
] | 5 | 2020-03-29T00:29:13.000Z | 2021-09-06T20:58:40.000Z | """Base class for UniFi entities."""
import logging
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_registry import async_entries_for_device
LOGGER = logging.getLogger(__name... | 37.78022 | 107 | 0.675102 |
593b75795994b6584423aa4857430e7c7e39cf2a | 2,617 | py | Python | tests/test_s3concat.py | vivekjhauipath/s3-concat | 05a7b42406f8a3d13087883487ff73c745ada430 | [
"MIT"
] | 30 | 2019-04-30T11:57:27.000Z | 2021-10-13T16:49:50.000Z | tests/test_s3concat.py | vivekjhauipath/s3-concat | 05a7b42406f8a3d13087883487ff73c745ada430 | [
"MIT"
] | 14 | 2019-05-15T23:34:36.000Z | 2021-05-21T13:45:34.000Z | tests/test_s3concat.py | vivekjhauipath/s3-concat | 05a7b42406f8a3d13087883487ff73c745ada430 | [
"MIT"
] | 11 | 2019-03-02T22:32:24.000Z | 2021-09-14T20:51:04.000Z | import boto3
from s3_concat import S3Concat
from moto import mock_s3
###
# add_file
###
@mock_s3
def test_add_file():
session = boto3.session.Session()
s3 = session.client('s3')
# Need to create the bucket since this is in Moto's 'virtual' AWS account
s3.create_bucket(Bucket='my-bucket')
s3.put_ob... | 29.077778 | 77 | 0.659152 |
820e92949a21b53b73722b40605f6f9955469ca3 | 1,681 | py | Python | Gestures/swip_left_right.py | islam-shamiul/appium-python | 6971a97c336c8da799995a7e313bad4eae6f6eb3 | [
"MIT"
] | 1 | 2021-01-10T09:03:20.000Z | 2021-01-10T09:03:20.000Z | Gestures/swip_left_right.py | islam-shamiul/appium-python | 6971a97c336c8da799995a7e313bad4eae6f6eb3 | [
"MIT"
] | null | null | null | Gestures/swip_left_right.py | islam-shamiul/appium-python | 6971a97c336c8da799995a7e313bad4eae6f6eb3 | [
"MIT"
] | null | null | null | import time
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from selenium.common.exceptions import ElementNotVisibleException, ElementNotSelectableException, NoSuchElementException
from selenium.webdriver.support.wait import WebDriverWait
desired_caps = {}
desired_caps['platfo... | 32.960784 | 120 | 0.766805 |
e5f15c66c039b40c9755aeddf9b1708b41b50b5a | 37,124 | py | Python | gears/champions.py | fmunoz-geo/gearhead-caramel | 315835481d543420826439245be01460fe6dd81b | [
"Apache-2.0"
] | 2 | 2020-05-30T07:52:27.000Z | 2021-02-18T10:55:30.000Z | gears/champions.py | fmunoz-geo/gearhead-caramel | 315835481d543420826439245be01460fe6dd81b | [
"Apache-2.0"
] | 56 | 2020-05-30T09:03:48.000Z | 2022-03-31T12:06:49.000Z | gears/champions.py | CartoonFan/gearhead-caramel | 61995f382923695176ab7a65253f42e849e0c4d7 | [
"Apache-2.0"
] | null | null | null | import random
import math
import copy
import gears
from . import attackattributes
from . import base
from . import materials
class UpgradeTheme( object ):
''' Base class for an upgrade theme.
For example an upgrade theme might put more movesystems.
'''
name = "???"
def pre_upgrade(self, mek, item... | 36.431796 | 151 | 0.599828 |
282c13322077ac26f5abada904ac83b1a8df5d3f | 287 | py | Python | domain/repository/menu_repository.py | mallycrip/Flask-DI-example | d051657683377f90f106addfb57c373c3ae3d036 | [
"MIT"
] | null | null | null | domain/repository/menu_repository.py | mallycrip/Flask-DI-example | d051657683377f90f106addfb57c373c3ae3d036 | [
"MIT"
] | null | null | null | domain/repository/menu_repository.py | mallycrip/Flask-DI-example | d051657683377f90f106addfb57c373c3ae3d036 | [
"MIT"
] | null | null | null | from abc import ABC
from typing import List
from domain.menu import Menu
class MenuRepository(ABC):
def save(self, menu: Menu) -> Menu: pass
def find_menu_by_menu_id(self, menu_id: int) -> Menu: pass
def find_menus_by_store_id(self, store_id: int) -> List['Menu']: pass
| 22.076923 | 73 | 0.71777 |
d146b46eb2ff099144d5b4e7adee237e4e9cc41d | 26,322 | py | Python | code_examples/tensorflow/unet_industrial/unet_industrial.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | code_examples/tensorflow/unet_industrial/unet_industrial.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | code_examples/tensorflow/unet_industrial/unet_industrial.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Graphcore Ltd. All rights reserved.
import argparse
import numpy as np
import tensorflow.compat.v1 as tf
from functools import partial
import time
import os
import random
from tensorflow.keras.layers import Activation, Conv2D, Conv2DTranspose, MaxPooling2D
from tensorflow.python import ipu
# Dic... | 34.956175 | 160 | 0.624497 |
01a6c664cced1535b1e2879c2580742438aa5ea4 | 8,796 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/aio/operations/_load_balancer_load_balancing_rules_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/aio/operations/_load_balancer_load_balancing_rules_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/aio/operations/_load_balancer_load_balancing_rules_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.139665 | 216 | 0.676103 |
e6ecc311c8f9176ee83818d8bb56bd15d5b9a2c9 | 976 | py | Python | alipay/aop/api/response/AntMerchantExpandAttachmentUploadSyncResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AntMerchantExpandAttachmentUploadSyncResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AntMerchantExpandAttachmentUploadSyncResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.AssetResult import AssetResult
class AntMerchantExpandAttachmentUploadSyncResponse(AlipayResponse):
def __init__(self):
super(AntMerchantExpandAttachment... | 32.533333 | 118 | 0.732582 |
9d58bc701a8aa60fdfe92d0492e8ed8b780c2640 | 904 | py | Python | app/core/admin.py | EnriqueTun23/receta-app-api | af42c3287b1fd5c7e9e9021ad3c884dfe1ed3e7d | [
"MIT"
] | null | null | null | app/core/admin.py | EnriqueTun23/receta-app-api | af42c3287b1fd5c7e9e9021ad3c884dfe1ed3e7d | [
"MIT"
] | null | null | null | app/core/admin.py | EnriqueTun23/receta-app-api | af42c3287b1fd5c7e9e9021ad3c884dfe1ed3e7d | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext as _
from .models import Usuario, Tag, Ingrediente, Receta
# Register your models here.
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'na... | 29.16129 | 65 | 0.600664 |
23b779948f7ac57dbe83d27ec6d3b12b6d95bd20 | 1,746 | py | Python | min-project1/project1.py | zouzhitao/cs168-19-stanford | 746cf21822d900383b0138ee49ac4d3d4c19f01e | [
"MIT"
] | 2 | 2020-08-26T18:29:41.000Z | 2021-04-26T20:14:33.000Z | min-project1/project1.py | zouzhitao/cs168-19-stanford | 746cf21822d900383b0138ee49ac4d3d4c19f01e | [
"MIT"
] | null | null | null | min-project1/project1.py | zouzhitao/cs168-19-stanford | 746cf21822d900383b0138ee49ac4d3d4c19f01e | [
"MIT"
] | 2 | 2020-06-09T07:07:26.000Z | 2020-09-29T19:02:34.000Z | """
code for http://web.stanford.edu/class/cs168/p1.pdf
author : Zhitao Zou
"""
import numpy as np
from histgram import plot_histogram
def choice1(n):
ret = np.zeros(n,dtype=int)
for _ in range(n):
rnd = np.random.randint(n)
ret[rnd]+=1
return ret
def choice2(n):
ret = np.zer... | 18.1875 | 51 | 0.516609 |
f453cdb54e367f041477401156852480c31e1ed6 | 2,055 | py | Python | apps/core/account/manager.py | GMNaim/Online-Exam-System | ed1e18cf0c0fa7f896bde261988982b49825e61f | [
"MIT"
] | null | null | null | apps/core/account/manager.py | GMNaim/Online-Exam-System | ed1e18cf0c0fa7f896bde261988982b49825e61f | [
"MIT"
] | null | null | null | apps/core/account/manager.py | GMNaim/Online-Exam-System | ed1e18cf0c0fa7f896bde261988982b49825e61f | [
"MIT"
] | null | null | null | from django.contrib.auth.base_user import BaseUserManager
from django.utils.translation import ugettext_lazy as _
# ugettext is a unicode version of a translatable string.
# ugettext_lazy is a "lazy" version of that. Lazy strings are
# a Django-ism; they are string-like objects that don't
# actually turn into the rea... | 44.673913 | 109 | 0.69781 |
4cc484cd21c454e99fe7221a3479bbcf6ba74c0a | 5,480 | py | Python | vectorbt/data/updater.py | Potato334343/vectorbt | bb8394ab0823dfd6335801df1890fe031b022cb0 | [
"Apache-2.0"
] | 1 | 2021-08-29T00:25:41.000Z | 2021-08-29T00:25:41.000Z | vectorbt/data/updater.py | Potato334343/vectorbt | bb8394ab0823dfd6335801df1890fe031b022cb0 | [
"Apache-2.0"
] | null | null | null | vectorbt/data/updater.py | Potato334343/vectorbt | bb8394ab0823dfd6335801df1890fe031b022cb0 | [
"Apache-2.0"
] | null | null | null | """Class for scheduling data updates."""
import logging
from vectorbt import _typing as tp
from vectorbt.utils.schedule import ScheduleManager
from vectorbt.utils.config import Configured
from vectorbt.data.base import Data
logger = logging.getLogger(__name__)
class DataUpdater(Configured):
"""Class for schedu... | 36.778523 | 108 | 0.632299 |
ceee853aafcb7a414e07a13a778e6304a4d11bcd | 333 | py | Python | pydsstools/examples/example9.py | danhamill/pydsstools | 6902aa77a284c5ccaea59150f8f62c3be36cd970 | [
"MIT"
] | null | null | null | pydsstools/examples/example9.py | danhamill/pydsstools | 6902aa77a284c5ccaea59150f8f62c3be36cd970 | [
"MIT"
] | null | null | null | pydsstools/examples/example9.py | danhamill/pydsstools | 6902aa77a284c5ccaea59150f8f62c3be36cd970 | [
"MIT"
] | null | null | null | '''
Read Spatial Grid record
'''
from pydsstools.heclib.dss.HecDss import Open
from pydsstools.core import core_heclib
dss_file = "spatialgrid0.dss"
pathname = "/a/b/c/01jan2001:1200/01jan2001:1300/f/"
with Open(dss_file) as fid:
dataset = fid.read_grid(pathname)
profile = dataset.profile
grid_array = da... | 22.2 | 52 | 0.738739 |
89f8b361849be8c7c86c9f11452c853d7667dc68 | 1,910 | py | Python | Chapter12/ch12.modified_sentiment.py | tschoi6712/pythonDataAnalysis2nd | 63e366d4dee52f7e4df6cf4d988a85d6de5b00e4 | [
"MIT"
] | null | null | null | Chapter12/ch12.modified_sentiment.py | tschoi6712/pythonDataAnalysis2nd | 63e366d4dee52f7e4df6cf4d988a85d6de5b00e4 | [
"MIT"
] | null | null | null | Chapter12/ch12.modified_sentiment.py | tschoi6712/pythonDataAnalysis2nd | 63e366d4dee52f7e4df6cf4d988a85d6de5b00e4 | [
"MIT"
] | null | null | null | """
코드 프로파일링: 코드의 성능을 튜닝
- chapter 9 Modified Sentiment Analysis Code
"""
import random
from nltk.corpus import movie_reviews
from nltk.corpus import stopwords
from nltk import FreqDist
from nltk import NaiveBayesClassifier
from nltk.classify import accuracy
import builtins
try:
profile = builtins.profile
excep... | 24.805195 | 72 | 0.696859 |
f77187de72ce59ea9eedd1e1d78f40cb2a9ccee7 | 1,859 | py | Python | tests/unit/core/test_framework.py | mhaas/cf-python-logging-support | 86b7e8ef35b935401bdec7da275fe4e09302988c | [
"Apache-2.0"
] | 16 | 2017-11-30T06:17:07.000Z | 2021-09-13T13:41:17.000Z | tests/unit/core/test_framework.py | mhaas/cf-python-logging-support | 86b7e8ef35b935401bdec7da275fe4e09302988c | [
"Apache-2.0"
] | 32 | 2017-12-01T14:48:17.000Z | 2022-02-19T04:49:55.000Z | tests/unit/core/test_framework.py | mhaas/cf-python-logging-support | 86b7e8ef35b935401bdec7da275fe4e09302988c | [
"Apache-2.0"
] | 7 | 2018-03-08T15:52:55.000Z | 2022-02-27T18:52:57.000Z | """ Tests `core.framework` """
import pytest
from sap.cf_logging.core.context import Context
from sap.cf_logging.core.request_reader import RequestReader
from sap.cf_logging.core.response_reader import ResponseReader
from sap.cf_logging.core.framework import Framework
# pylint: disable=abstract-method
CONTEXT = Conte... | 37.938776 | 92 | 0.742873 |
17e1b026ee99753e1e6c43b9b7a285133ba99ff1 | 14,424 | py | Python | standalones/getmarks.py | KIT-IBT/AugmentA | b44ea02a4c6e33fd6c14ce3cf180d5603ff660b1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | standalones/getmarks.py | KIT-IBT/AugmentA | b44ea02a4c6e33fd6c14ce3cf180d5603ff660b1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2022-02-25T13:58:03.000Z | 2022-03-01T14:53:42.000Z | standalones/getmarks.py | KIT-IBT/AugmentA | b44ea02a4c6e33fd6c14ce3cf180d5603ff660b1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 19 14:55:02 2021
@author: Luca Azzolin
Copyright 2021 Luca Azzolin
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
regard... | 43.577039 | 210 | 0.703134 |
8a91024898ffa2745c3b02f649fa288d64f4930c | 2,537 | py | Python | lldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py | MochalovaAn/llvm | 528aa5ca4aa9df447dc3497ef19da3b124e88d7d | [
"Apache-2.0"
] | 1 | 2021-02-17T04:40:38.000Z | 2021-02-17T04:40:38.000Z | lldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py | MochalovaAn/llvm | 528aa5ca4aa9df447dc3497ef19da3b124e88d7d | [
"Apache-2.0"
] | 2 | 2019-06-27T00:36:28.000Z | 2021-06-29T20:05:03.000Z | lldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py | MochalovaAn/llvm | 528aa5ca4aa9df447dc3497ef19da3b124e88d7d | [
"Apache-2.0"
] | null | null | null |
import gdbremote_testcase
import textwrap
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import re
import xml.etree.ElementTree as ET
class TestGdbRemoteTargetXmlPacket(gdbremote_testcase.GdbRemoteTestCaseBase):
mydir = TestBase.compute_mydir(__... | 35.732394 | 82 | 0.644462 |
305515561840ee8cb0f9f71460e1e8dac3cd919b | 2,549 | py | Python | project/script/gen.py | Liuhao233/Trajectory-is-the-Description-of-Arrival | 32d2a354d166a26ff8960123ea56d163ba458f75 | [
"MIT"
] | null | null | null | project/script/gen.py | Liuhao233/Trajectory-is-the-Description-of-Arrival | 32d2a354d166a26ff8960123ea56d163ba458f75 | [
"MIT"
] | null | null | null | project/script/gen.py | Liuhao233/Trajectory-is-the-Description-of-Arrival | 32d2a354d166a26ff8960123ea56d163ba458f75 | [
"MIT"
] | 2 | 2022-01-13T09:14:46.000Z | 2022-01-13T09:26:21.000Z | from pathlib import Path
import sys
import os
import argparse
sys.path.append(str(Path(__file__).resolve().parent.parent))
install_path = str(Path(__file__).resolve().parent.parent)
dataset_path = str(Path(__file__).resolve().parent.parent.parent)
import torch
import torch.nn as nn
import pandas as pd
import pickle a... | 43.20339 | 115 | 0.729698 |
8a7c1634e83dc09d5c78e5d7238dec7b4f5a4e08 | 14,394 | py | Python | train.py | YCJGG/OPPO-competition-v2 | 46d9784d158294afd6ed4469970d8b11e1889645 | [
"MIT"
] | 1 | 2019-01-29T09:43:59.000Z | 2019-01-29T09:43:59.000Z | train.py | YCJGG/OPPO-competition-v2 | 46d9784d158294afd6ed4469970d8b11e1889645 | [
"MIT"
] | null | null | null | train.py | YCJGG/OPPO-competition-v2 | 46d9784d158294afd6ed4469970d8b11e1889645 | [
"MIT"
] | null | null | null | import argparse
import os
import numpy as np
from tqdm import tqdm
from mypath import Path
from dataloaders import make_data_loader
from modeling.sync_batchnorm.replicate import patch_replication_callback
from modeling.deeplab import *
from utils.loss import SegmentationLosses
from utils.calculate_weights import calcu... | 45.840764 | 135 | 0.588787 |
f62107ccb0284c76c3f44f9327e6ac8360a5b38e | 827 | py | Python | setup.py | ihgazni2/kukibanshee | 80164c06c8335d9f10683d9e8a00e939d17d7932 | [
"MIT"
] | null | null | null | setup.py | ihgazni2/kukibanshee | 80164c06c8335d9f10683d9e8a00e939d17d7932 | [
"MIT"
] | null | null | null | setup.py | ihgazni2/kukibanshee | 80164c06c8335d9f10683d9e8a00e939d17d7932 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name="kukibanshee",
version = "0.3.6",
description="http cookie,rfc6265",
author="dapeli",
url="https://github.com/ihgazni2/kukibanshee",
author_email='terryinzaghi@163.com',
license="MIT",
long_description = "refer to .... | 30.62963 | 89 | 0.617896 |
167a7c3d3a5b319c3568c080654a2253384d3685 | 1,552 | py | Python | projects/ai-inference/model_trainer.py | panlm/karbon-platform-services | 80a0cffb81bcfaedb9546e806e0f461b0c7ac1fd | [
"MIT"
] | 11 | 2020-09-15T07:52:57.000Z | 2021-06-29T15:27:22.000Z | projects/ai-inference/model_trainer.py | panlm/karbon-platform-services | 80a0cffb81bcfaedb9546e806e0f461b0c7ac1fd | [
"MIT"
] | 7 | 2020-11-13T19:04:26.000Z | 2022-03-10T11:16:24.000Z | projects/ai-inference/model_trainer.py | panlm/karbon-platform-services | 80a0cffb81bcfaedb9546e806e0f461b0c7ac1fd | [
"MIT"
] | 23 | 2018-11-25T14:44:46.000Z | 2020-08-17T11:41:29.000Z | import tensorflow as tf
from tensorflow import keras
# Helper library
import numpy as np
# dataset used to train model
fashion_mnist = keras.datasets.fashion_mnist
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
# scale the values to 0.0 to 1.0
train_images = train_images / 255.0... | 32.333333 | 87 | 0.715851 |
879cb9ed5fdbad98fa17df38960a404564d55d08 | 1,618 | py | Python | herders/migrations/0028_auto_20210320_1357.py | Itori/swarfarm | 7192e2d8bca093b4254023bbec42b6a2b1887547 | [
"Apache-2.0"
] | 66 | 2017-09-11T04:46:00.000Z | 2021-03-13T00:02:42.000Z | herders/migrations/0028_auto_20210320_1357.py | Itori/swarfarm | 7192e2d8bca093b4254023bbec42b6a2b1887547 | [
"Apache-2.0"
] | 133 | 2017-09-24T21:28:59.000Z | 2021-04-02T10:35:31.000Z | herders/migrations/0028_auto_20210320_1357.py | Itori/swarfarm | 7192e2d8bca093b4254023bbec42b6a2b1887547 | [
"Apache-2.0"
] | 28 | 2017-08-30T19:04:32.000Z | 2020-11-16T04:09:00.000Z | # Generated by Django 2.2.17 on 2021-03-20 20:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('herders', '0027_auto_20210317_0522'),
]
operations = [
migrations.RemoveField(
model_name='runeinstance',
name='substat_1',... | 26.096774 | 48 | 0.536465 |
3aa3de3dd5de23953348c70db61073c41c2b6200 | 827 | py | Python | gen_sixes.py | ace-dent/term_twirl | e1c27f7e56b09b7bf5f1b9e3eb711d18ae869b88 | [
"MIT"
] | null | null | null | gen_sixes.py | ace-dent/term_twirl | e1c27f7e56b09b7bf5f1b9e3eb711d18ae869b88 | [
"MIT"
] | 6 | 2020-06-29T14:46:16.000Z | 2020-06-29T23:02:10.000Z | gen_sixes.py | justecorruptio/term_twirl | a9b12b700a4dc8fb66d538e9bac3f79cd49e4290 | [
"MIT"
] | null | null | null | from collections import Counter
import re
fh = open('input_data/twl.txt', 'r')
ALL_WORDS = set()
for line in fh:
line = line.strip()
ALL_WORDS.add(line)
fh.close()
N = 10000
SIXES = []
fh = open('input_data/count_1w.txt', 'r')
for line in fh:
word, _ = line.split()
word = word.upper()
if re.matc... | 18.795455 | 70 | 0.610641 |
bbf445f8853cef9dcafab1cfd68c564af40c2c74 | 1,492 | py | Python | staticfiles/views.py | nttks/django-staticfiles | cd4e024e44c0be909333fcac5c328b2e4d2747bd | [
"BSD-3-Clause"
] | 3 | 2015-01-31T16:46:27.000Z | 2020-10-23T04:37:48.000Z | staticfiles/views.py | nttks/django-staticfiles | cd4e024e44c0be909333fcac5c328b2e4d2747bd | [
"BSD-3-Clause"
] | 2 | 2021-06-01T22:03:20.000Z | 2022-01-13T00:43:38.000Z | staticfiles/views.py | nttks/django-staticfiles | cd4e024e44c0be909333fcac5c328b2e4d2747bd | [
"BSD-3-Clause"
] | 2 | 2019-01-06T14:44:14.000Z | 2020-05-18T05:24:49.000Z | """
Views and functions for serving static files. These are only to be used during
development, and SHOULD NOT be used in a production setting.
"""
import os
import posixpath
import urllib
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.http import Http404
from dja... | 34.697674 | 78 | 0.686327 |
469a9c0f94ed751c5a76cab30f56d72f926d18ea | 11,503 | py | Python | run_command_line.py | jamespjh/strabo-text-recognition-deep-learning | 1ac8648612ca422aa5d6f659f2b6e938ee25ec20 | [
"Apache-2.0"
] | 3 | 2019-06-28T13:51:01.000Z | 2019-11-15T14:53:21.000Z | run_command_line.py | jamespjh/strabo-text-recognition-deep-learning | 1ac8648612ca422aa5d6f659f2b6e938ee25ec20 | [
"Apache-2.0"
] | null | null | null | run_command_line.py | jamespjh/strabo-text-recognition-deep-learning | 1ac8648612ca422aa5d6f659f2b6e938ee25ec20 | [
"Apache-2.0"
] | 1 | 2020-03-17T17:52:35.000Z | 2020-03-17T17:52:35.000Z | #!/usr/bin/env python3
import os
import time
import datetime
import cv2
import numpy as np
import uuid
import json
import math
import random
import functools
import logging
import collections
from pprint import pprint
from collections import defaultdict
from scipy.misc import toimage
from scipy import ndimage
from m... | 29.723514 | 180 | 0.584369 |
60b07545d3d06c7fd140b514720cf2eab624db41 | 3,156 | py | Python | postscrawl/postscrawl/settings.py | joshuayap98/py_crawler | 36592535f35c9d479a0d7d05ac3d04604ac88ad2 | [
"MIT"
] | null | null | null | postscrawl/postscrawl/settings.py | joshuayap98/py_crawler | 36592535f35c9d479a0d7d05ac3d04604ac88ad2 | [
"MIT"
] | 1 | 2021-03-31T20:58:51.000Z | 2021-03-31T20:58:51.000Z | postscrawl/postscrawl/settings.py | joshuayap98/py_crawler | 36592535f35c9d479a0d7d05ac3d04604ac88ad2 | [
"MIT"
] | 1 | 2020-05-30T15:56:00.000Z | 2020-05-30T15:56:00.000Z | # -*- coding: utf-8 -*-
# Scrapy settings for postscrawl project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest/... | 34.681319 | 103 | 0.778834 |
d15d0a04ba994f51c40acadf3230fc0f60b1ed68 | 918 | py | Python | saleor/graphql/shipping/filters.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 1 | 2022-03-25T00:21:11.000Z | 2022-03-25T00:21:11.000Z | saleor/graphql/shipping/filters.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 86 | 2021-11-01T04:51:55.000Z | 2022-03-30T16:30:16.000Z | saleor/graphql/shipping/filters.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 1 | 2021-12-28T18:02:49.000Z | 2021-12-28T18:02:49.000Z | import django_filters
from ...shipping.models import ShippingZone
from ..channel.types import Channel
from ..core.filters import GlobalIDMultipleChoiceFilter
from ..core.types import FilterInputObjectType
from ..utils import resolve_global_ids_to_primary_keys
from ..utils.filters import filter_fields_containing_value
... | 30.6 | 85 | 0.782135 |
06e24e9413de576ade9782d69db68dab03c6d22d | 4,982 | py | Python | parsedatetime/pdt_locales/ko_KR.py | allganize/parsedatetime | c9aadcda2924271641fb5060e0ceff941044c1e6 | [
"Apache-2.0"
] | null | null | null | parsedatetime/pdt_locales/ko_KR.py | allganize/parsedatetime | c9aadcda2924271641fb5060e0ceff941044c1e6 | [
"Apache-2.0"
] | null | null | null | parsedatetime/pdt_locales/ko_KR.py | allganize/parsedatetime | c9aadcda2924271641fb5060e0ceff941044c1e6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import re
import time
from .base import * # noqa
# don't use an unicode string
localeID = 'ko_KR'
dateSep = ['-']
timeSep = [':', 'h']
meridian = ['오전', '오후']
usesMeridian = True
uses24 = True
WeekdayOffsets = {}
MonthOffsets = {}
useA... | 20.932773 | 133 | 0.47511 |
2f5e0e17040194ff66988df91ba40c0599a513d2 | 2,949 | py | Python | sderl/algos/pytorch/bse/DeepBSDE/main.py | XiaohanZhangCMU/sderl | 9f8b0044b068d144400520c3b36b75403d394c7d | [
"MIT"
] | 2 | 2020-10-29T12:29:04.000Z | 2021-05-01T23:23:45.000Z | sderl/algos/pytorch/bse/DeepBSDE/main.py | XiaohanZhangCMU/sderl | 9f8b0044b068d144400520c3b36b75403d394c7d | [
"MIT"
] | null | null | null | sderl/algos/pytorch/bse/DeepBSDE/main.py | XiaohanZhangCMU/sderl | 9f8b0044b068d144400520c3b36b75403d394c7d | [
"MIT"
] | null | null | null | """
The main file to run BSDE solver to solve parabolic partial differential equations (PDEs).
"""
import json
import logging
import os
import numpy as np
import tensorflow as tf
from config import get_config
from equation import get_equation
from solver import FeedForwardModel
#FLAGS = tf.app.flags.FLAGS
#tf.app.fl... | 41.535211 | 133 | 0.611733 |
541099b7afcbb7d92fb742239139d2d8ee36f0d8 | 3,138 | py | Python | setup.py | zzacharo/invenio-search-ui | 1ace050bd4f735ca1faaa0f87c7b9ba1c7ffcac3 | [
"MIT"
] | null | null | null | setup.py | zzacharo/invenio-search-ui | 1ace050bd4f735ca1faaa0f87c7b9ba1c7ffcac3 | [
"MIT"
] | null | null | null | setup.py | zzacharo/invenio-search-ui | 1ace050bd4f735ca1faaa0f87c7b9ba1c7ffcac3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""UI for Invenio-Search."""
import os
from setuptools import find_packages, setup
... | 28.27027 | 78 | 0.62492 |
3a7268133a0057624b5ffeb05d860b8654951c0d | 2,738 | py | Python | gmailbrute.py | lucthienphong1120/full-45-bruteforce-tools | 443f19f29bd815764c43f94f06453fb899ed6215 | [
"MIT"
] | 1 | 2022-03-24T07:52:35.000Z | 2022-03-24T07:52:35.000Z | gmailbrute.py | lucthienphong1120/full-45-bruteforce-tools | 443f19f29bd815764c43f94f06453fb899ed6215 | [
"MIT"
] | null | null | null | gmailbrute.py | lucthienphong1120/full-45-bruteforce-tools | 443f19f29bd815764c43f94f06453fb899ed6215 | [
"MIT"
] | null | null | null | #!usr/bin/python
#Gmail Brute Forcer
#To use this script you need ClientCookie and Client Form.
#http://wwwsearch.sourceforge.net/ClientCookie/src/ClientCookie-1.0.3.tar.gz
#http://wwwsearch.sourceforge.net/ClientForm/src/ClientForm-0.1.17.tar.gz
#To install the package, run the following command:
#python setup.py buil... | 26.326923 | 82 | 0.675676 |
30b81ca5df7bec279cae369ab2e71c93fb36509d | 2,530 | py | Python | trivial_tools/containers/class_moving_average.py | IgorZyktin/trivial_tools | a1256e62d9345b9623850e37bd63df7ce52b81c8 | [
"MIT"
] | null | null | null | trivial_tools/containers/class_moving_average.py | IgorZyktin/trivial_tools | a1256e62d9345b9623850e37bd63df7ce52b81c8 | [
"MIT"
] | null | null | null | trivial_tools/containers/class_moving_average.py | IgorZyktin/trivial_tools | a1256e62d9345b9623850e37bd63df7ce52b81c8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Контейнер для вычисления скользящего среднего.
В него можно постоянно можно добавлять элементы и быстро получать среднее
Пример работы с контейнером:
m = MovingAverage(maxlen=4) # среднее равно 0
m.push(1) # среднее равно 1
m.push(3) # среднее равно 2
m.pus... | 31.234568 | 93 | 0.637945 |
27b562682fb578c3b858ba50dd956b8164cd58f8 | 19,191 | py | Python | cryptomarket/exchange/client.py | miguelagustin/cryptomkt-python | b897dc44fab58bef0c684168ba159631c17db2d9 | [
"Apache-2.0"
] | null | null | null | cryptomarket/exchange/client.py | miguelagustin/cryptomkt-python | b897dc44fab58bef0c684168ba159631c17db2d9 | [
"Apache-2.0"
] | null | null | null | cryptomarket/exchange/client.py | miguelagustin/cryptomkt-python | b897dc44fab58bef0c684168ba159631c17db2d9 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import json
import requests
import time
import warnings
from .auth import HMACAuth
from .compat import imap
from .compat import quote
from .compat impor... | 35.73743 | 140 | 0.590172 |
62a96d9d4ee9ea9c6983ffacefca2147e27b7927 | 10,476 | py | Python | encoder_decoder.py | shiningliang/Commonsense_Test | 90fe17bb3a94e23ff0ef469b4ee0ac7269481b2d | [
"Apache-2.0"
] | null | null | null | encoder_decoder.py | shiningliang/Commonsense_Test | 90fe17bb3a94e23ff0ef469b4ee0ac7269481b2d | [
"Apache-2.0"
] | null | null | null | encoder_decoder.py | shiningliang/Commonsense_Test | 90fe17bb3a94e23ff0ef469b4ee0ac7269481b2d | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import sys, pandas, argparse
import xml.etree.cElementTree as et
import pickle as pkl
import time
sys.path.append('../')
from models.pipeline import *
from models.classifier import *
from models.transformer import *
def load_copa(filepath=None):
xml_tree = et.parse(filepath... | 49.649289 | 148 | 0.605288 |
f3ffa7e52caea29af98494529c66368f9c878f00 | 4,538 | py | Python | examples/benchmarks/ner_benchmarks.py | EmilStenstrom/danlp | ff05c0c5558f26edb8b2f2369019e61649778794 | [
"BSD-3-Clause"
] | null | null | null | examples/benchmarks/ner_benchmarks.py | EmilStenstrom/danlp | ff05c0c5558f26edb8b2f2369019e61649778794 | [
"BSD-3-Clause"
] | null | null | null | examples/benchmarks/ner_benchmarks.py | EmilStenstrom/danlp | ff05c0c5558f26edb8b2f2369019e61649778794 | [
"BSD-3-Clause"
] | null | null | null | import time
from flair.data import Sentence, Token
from utils import print_speed_performance, f1_report
from danlp.datasets import DDT
from danlp.models import load_spacy_model, load_flair_ner_model, \
load_bert_ner_model
from NERDA.datasets import download_dane_data
from NERDA.precooked import DA_BERT_ML, DA_EL... | 26.231214 | 83 | 0.699868 |
2868f9814e28d7975ad9971b32a64c10eda01f34 | 89 | py | Python | src/main/resources/docs/tests/E1306.py | h314to/codacy-pylint | 9d31567db6188e1b31ce0e1567998f64946502df | [
"Apache-2.0"
] | null | null | null | src/main/resources/docs/tests/E1306.py | h314to/codacy-pylint | 9d31567db6188e1b31ce0e1567998f64946502df | [
"Apache-2.0"
] | null | null | null | src/main/resources/docs/tests/E1306.py | h314to/codacy-pylint | 9d31567db6188e1b31ce0e1567998f64946502df | [
"Apache-2.0"
] | null | null | null | ##Patterns: E1306
##Err: E1306
print "%s %s %s" % ("this is", "wrong")
print "%s" % "ok" | 17.8 | 39 | 0.539326 |
bb41418906a170e92218968b88bb574addf42f95 | 786 | py | Python | python/src/main/python/pyalink/alink/tests/examples/from_docs/test_kvtocolumnsbatchop.py | wenwei8268/Alink | c00702538c95a32403985ebd344eb6aeb81749a7 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pyalink/alink/tests/examples/from_docs/test_kvtocolumnsbatchop.py | wenwei8268/Alink | c00702538c95a32403985ebd344eb6aeb81749a7 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pyalink/alink/tests/examples/from_docs/test_kvtocolumnsbatchop.py | wenwei8268/Alink | c00702538c95a32403985ebd344eb6aeb81749a7 | [
"Apache-2.0"
] | null | null | null | import unittest
from pyalink.alink import *
import numpy as np
import pandas as pd
class TestKvToColumnsBatchOp(unittest.TestCase):
def test_kvtocolumnsbatchop(self):
df = pd.DataFrame([
['1', '{"f0":"1.0","f1":"2.0"}', '$3$0:1.0 1:2.0', 'f0:1.0,f1:2.0', '1.0,2.0', 1.0, 2.0],
['2', ... | 37.428571 | 140 | 0.531807 |
334e1b15f1d0de6e27a56dff740667d38744dfec | 13,055 | py | Python | models/00_settings.py | waidyanatha/deprecated.sambro-eden | 62e180703a2f16d5f8fcd532335d8287b76a8175 | [
"MIT"
] | 1 | 2016-12-22T09:31:22.000Z | 2016-12-22T09:31:22.000Z | models/00_settings.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | null | null | null | models/00_settings.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Global settings:
Those which are typically edited during a deployment are in
000_config.py & their results parsed into here. Deployers
shouldn't typically need to edit any settings here.
"""
# Keep all our configuration options off the main global variables
# Use response... | 36.983003 | 138 | 0.674148 |
0f76477ca16ec527d99c9d96fec4e2e9a5b9865a | 880 | py | Python | search_engine/search_engine_website/search_engine_website/urls.py | anjanatiha/Web-Retrieval-Search-Engine-Implementation-for-University-Web-Domain | 266884a0a00b9deea55b5aa2ef1e8848706bcf40 | [
"MIT"
] | 2 | 2017-12-26T01:46:04.000Z | 2017-12-26T06:27:22.000Z | search_engine/search_engine_website/search_engine_website/urls.py | anjanatiha/Web-Retrieval-Engine | 266884a0a00b9deea55b5aa2ef1e8848706bcf40 | [
"MIT"
] | null | null | null | search_engine/search_engine_website/search_engine_website/urls.py | anjanatiha/Web-Retrieval-Engine | 266884a0a00b9deea55b5aa2ef1e8848706bcf40 | [
"MIT"
] | 1 | 2021-01-19T00:23:07.000Z | 2021-01-19T00:23:07.000Z | """search_engine_website URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='h... | 36.666667 | 79 | 0.705682 |
916909aa826e8f812b3d7ca5f424115825f31e73 | 829 | py | Python | build.py | SantiagoMunoz/c_xml_generation | 9d74829165dbf14458e6d7e21a893f3fb6a84483 | [
"MIT"
] | null | null | null | build.py | SantiagoMunoz/c_xml_generation | 9d74829165dbf14458e6d7e21a893f3fb6a84483 | [
"MIT"
] | 2 | 2018-07-19T13:39:42.000Z | 2018-08-07T11:00:12.000Z | build.py | SantiagoMunoz/c_xml_generation | 9d74829165dbf14458e6d7e21a893f3fb6a84483 | [
"MIT"
] | 2 | 2018-07-16T08:40:20.000Z | 2018-08-07T10:37:19.000Z | from jinja2 import Environment, FileSystemLoader
import xml.etree.ElementTree as etree
import getopt
import sys
# Path data
template_prefix = 'templates'
config_file = sys.argv[1]
output_prefix = sys.argv[2]
# Load Jinja 2
file_loader = FileSystemLoader('.')
env = Environment(loader=file_loader,trim_blocks=True)
# P... | 25.90625 | 73 | 0.770808 |
5e41f9bf53207471366faaf2e77af0f6a9e306ef | 1,445 | py | Python | pagrant/provisioners/__init__.py | markshao/pagrant | 8767288b6b170e1cf69c555ac0d75f44b10aaf34 | [
"MIT"
] | 2 | 2016-07-27T11:29:32.000Z | 2017-09-29T15:05:19.000Z | pagrant/provisioners/__init__.py | markshao/pagrant | 8767288b6b170e1cf69c555ac0d75f44b10aaf34 | [
"MIT"
] | null | null | null | pagrant/provisioners/__init__.py | markshao/pagrant | 8767288b6b170e1cf69c555ac0d75f44b10aaf34 | [
"MIT"
] | null | null | null | __author__ = 'markshao'
import string
from pagrant.exceptions import PagrantError
class BaseProvisioner(object):
def __init__(self, machine, logger, provision_info, provider_info=None):
self.machine = machine
self.logger = logger
self.provider_info = provider_info
self.provision_i... | 32.111111 | 103 | 0.737024 |
9b62a3cb68f49079d709300ec731df74e7051775 | 3,952 | py | Python | spyder/plugins/editor/widgets/tests/test_completions_hide.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 7,956 | 2015-02-17T01:19:09.000Z | 2022-03-31T21:52:15.000Z | spyder/plugins/editor/widgets/tests/test_completions_hide.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 16,326 | 2015-02-16T23:15:21.000Z | 2022-03-31T23:34:34.000Z | spyder/plugins/editor/widgets/tests/test_completions_hide.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 1,918 | 2015-02-20T19:26:26.000Z | 2022-03-31T19:03:25.000Z | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
#
"""Tests some cases were completions need to be hidden."""
# Third party imports
from flaky import flaky
import pytest
from qtpy.QtCore import Qt
@pytest.mark.slow
@pytest.mark.order(1)
@flaky(max_ru... | 32.393443 | 77 | 0.717105 |
07bfa68af0650f83e686f8d7eb51ba3ca0b76300 | 7,508 | py | Python | generate.py | jamesacampbell/fake-resume-generator | 4205caa8cff96d172bbf6d408e1199bdaf667a1e | [
"Unlicense"
] | 12 | 2018-06-24T18:48:59.000Z | 2022-02-05T05:29:47.000Z | generate.py | BurritoSlayer/fake-resume-generator | df334404d6eb20ab5943fdaef1cc34a64c6b00b0 | [
"Unlicense"
] | 3 | 2021-06-08T20:13:08.000Z | 2022-01-13T01:31:14.000Z | generate.py | BurritoSlayer/fake-resume-generator | df334404d6eb20ab5943fdaef1cc34a64c6b00b0 | [
"Unlicense"
] | 5 | 2019-05-06T09:44:10.000Z | 2020-05-14T06:25:19.000Z | '''
Generate sample sentences data based on training set of sentences from resumes
'''
from os.path import expanduser
import os
import argparse
import re
from subprocess import call
# globals
pattern = re.compile(r'([A-Z].\w+\:)')
homepath = expanduser("~")
indeed_sections = [
'Work Experience',
'Education',
... | 31.153527 | 136 | 0.548615 |
af6ddcbd825af814a78a361812ff01cbc7bc2d47 | 923 | py | Python | main.py | Sathmin-Januth/Screen_Recorder | 6e960bc7f310789c0f54dfcb7b806c48cbafd3ce | [
"MIT"
] | null | null | null | main.py | Sathmin-Januth/Screen_Recorder | 6e960bc7f310789c0f54dfcb7b806c48cbafd3ce | [
"MIT"
] | null | null | null | main.py | Sathmin-Januth/Screen_Recorder | 6e960bc7f310789c0f54dfcb7b806c48cbafd3ce | [
"MIT"
] | null | null | null | import datetime
from PIL import ImageGrab
import numpy as np
import cv2
from win32api import GetSystemMetrics
width = GetSystemMetrics(0)
height = GetSystemMetrics(1)
time_stamp = datetime.datetime.now().strftime('%Y-%m-%d %H-%M-%S')
file_name = f'{time_stamp}.mp4'
fourcc = cv2.VideoWriter_fourcc('m', 'p',... | 30.766667 | 81 | 0.668472 |
a717f863181b8352175fe69af18bf7cef1c35ee4 | 1,434 | py | Python | rest_demo/rest_server/server.py | Flauwed/rest_demo | a3233aefc9b8a7ab66367fd744b209b3d58fa733 | [
"Apache-2.0"
] | null | null | null | rest_demo/rest_server/server.py | Flauwed/rest_demo | a3233aefc9b8a7ab66367fd744b209b3d58fa733 | [
"Apache-2.0"
] | null | null | null | rest_demo/rest_server/server.py | Flauwed/rest_demo | a3233aefc9b8a7ab66367fd744b209b3d58fa733 | [
"Apache-2.0"
] | 1 | 2022-01-21T23:28:35.000Z | 2022-01-21T23:28:35.000Z |
from flask import Flask, json
from networktables import NetworkTables
import json
#first define what table we pull the values from, by default SmartDashboard is the only one on the robot, but you can make additional ones
smartdash = NetworkTables.getTable("/SmartDashboard")
motor0voltage = 0
motor1voltage = 0
motor2v... | 27.576923 | 138 | 0.634589 |
db3de1433f57a9ff8be9197393eeaef554e7c7f0 | 246 | py | Python | roxar_api_utils/ioutil/comment_strip.py | RoxarAPI/roxar_api_utils | c9e46c39948e0c55b3f46b3b2456678fe37f2da8 | [
"MIT"
] | null | null | null | roxar_api_utils/ioutil/comment_strip.py | RoxarAPI/roxar_api_utils | c9e46c39948e0c55b3f46b3b2456678fe37f2da8 | [
"MIT"
] | null | null | null | roxar_api_utils/ioutil/comment_strip.py | RoxarAPI/roxar_api_utils | c9e46c39948e0c55b3f46b3b2456678fe37f2da8 | [
"MIT"
] | null | null | null | """Strip comments from line. Comments start with a hash sign #
"""
def comment_strip(line):
if line is None:
return None
ix = line.find('#')
if ix >= 0:
return line[0:ix]
else:
return line
| 17.571429 | 64 | 0.53252 |
f3d43f25dbf2f5a89b4f2e4ecb574e210c29cde4 | 3,632 | py | Python | module/core/service/knowledge.py | moonwatcher/tubo | bd64844e1b2420bfd7bc7f3f35db1d215a574001 | [
"MIT"
] | null | null | null | module/core/service/knowledge.py | moonwatcher/tubo | bd64844e1b2420bfd7bc7f3f35db1d215a574001 | [
"MIT"
] | null | null | null | module/core/service/knowledge.py | moonwatcher/tubo | bd64844e1b2420bfd7bc7f3f35db1d215a574001 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from service import ResourceHandler
from ontology import Ontology, Document
class KnowledgeBaseHandler(ResourceHandler):
def __init__(self, resolver, node):
ResourceHandler.__init__(self, resolver, node)
def fetch(self, query):
if 'depend' in query.match:
q... | 42.729412 | 152 | 0.514317 |
7a6f89414e7700789097da4a76b95cd64f5c3995 | 4,532 | py | Python | homeassistant/components/alexa/smart_home_http.py | charithmadhuranga/core | 06329a2f43ba82df6e0c6250fa6965f9259cfe8a | [
"Apache-2.0"
] | 1 | 2021-12-02T23:28:50.000Z | 2021-12-02T23:28:50.000Z | homeassistant/components/alexa/smart_home_http.py | charithmadhuranga/core | 06329a2f43ba82df6e0c6250fa6965f9259cfe8a | [
"Apache-2.0"
] | 277 | 2021-10-04T06:39:33.000Z | 2021-12-28T22:04:17.000Z | homeassistant/components/alexa/smart_home_http.py | charithmadhuranga/core | 06329a2f43ba82df6e0c6250fa6965f9259cfe8a | [
"Apache-2.0"
] | 1 | 2022-02-09T00:30:51.000Z | 2022-02-09T00:30:51.000Z | """Alexa HTTP interface."""
import logging
from homeassistant import core
from homeassistant.components.http.view import HomeAssistantView
from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, ENTITY_CATEGORIES
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry... | 33.57037 | 88 | 0.698367 |
fbd46aaac94edb29f6ae8e6a5ac1b5005a1f55ef | 7,585 | py | Python | vsphere/vsphere.py | embano1/kopf-operator-vmworld | fbda71f151def0ad3639d9850a2bc1e9e0424701 | [
"MIT"
] | 7 | 2019-09-01T13:06:19.000Z | 2020-12-15T11:48:54.000Z | vsphere/vsphere.py | embano1/kopf-operator-vmworld | fbda71f151def0ad3639d9850a2bc1e9e0424701 | [
"MIT"
] | 3 | 2019-07-31T21:06:10.000Z | 2019-11-01T11:21:52.000Z | vsphere/vsphere.py | embano1/kopf-operator-vmworld | fbda71f151def0ad3639d9850a2bc1e9e0424701 | [
"MIT"
] | 2 | 2019-09-19T16:29:17.000Z | 2022-01-19T07:04:24.000Z | # -*- coding: utf-8 -*-
"""
Package vsphere provides convinience methods for interacting with vCenter
"""
from typing import Any, List, Dict
from time import sleep
import logging
from pyVim.connect import SmartConnect, SmartConnectNoSSL
from pyVmomi import vim, vmodl
import pydng
class Error(Exception):
"""Base cl... | 32.139831 | 163 | 0.641661 |
7a6dd0c0946bab620750bcfb5060de2a62e0ff08 | 43,262 | py | Python | tpDcc/dccs/maya/core/name.py | tpoveda/tpMayaLib | fe570a2aef496c651f302ea2743c84fa4308c3d7 | [
"MIT"
] | 3 | 2021-04-30T03:47:39.000Z | 2021-06-22T09:15:33.000Z | tpDcc/dccs/maya/core/name.py | tpoveda/tpMayaLib | fe570a2aef496c651f302ea2743c84fa4308c3d7 | [
"MIT"
] | null | null | null | tpDcc/dccs/maya/core/name.py | tpoveda/tpMayaLib | fe570a2aef496c651f302ea2743c84fa4308c3d7 | [
"MIT"
] | null | null | null | #!#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains functions and classes related to names
"""
from __future__ import print_function, division, absolute_import
import re
import logging
import maya.cmds
from tpDcc.libs.python import python, strings
from tpDcc.libs.python import name as naming_... | 39.726354 | 120 | 0.684689 |
26a7118a769f9f2c18a4f42d7697cd80280c2db6 | 1,904 | py | Python | aqt/jax/wmt_mlperf/hparams_configs/leaderboard/leaderboard_sweep.py | ParikhKadam/google-research | 00a282388e389e09ce29109eb050491c96cfab85 | [
"Apache-2.0"
] | 1 | 2021-05-06T14:43:54.000Z | 2021-05-06T14:43:54.000Z | aqt/jax/wmt_mlperf/hparams_configs/leaderboard/leaderboard_sweep.py | ParikhKadam/google-research | 00a282388e389e09ce29109eb050491c96cfab85 | [
"Apache-2.0"
] | 110 | 2021-10-01T18:22:38.000Z | 2021-12-27T22:08:31.000Z | aqt/jax/wmt_mlperf/hparams_configs/leaderboard/leaderboard_sweep.py | admariner/google-research | 7cee4b22b925581d912e8d993625c180da2a5a4f | [
"Apache-2.0"
] | 1 | 2022-02-10T10:43:10.000Z | 2022-02-10T10:43:10.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 37.333333 | 96 | 0.786239 |
1a48468a9ecb696040f1061a1e4e4113b58c93c6 | 2,199 | py | Python | test/completion/dynamic_params.py | kirat-singh/jedi | 65bc1c117b3175cb4d492484775c3fd7f207bc92 | [
"MIT"
] | 4,213 | 2015-01-02T15:43:22.000Z | 2022-03-31T16:15:01.000Z | test/completion/dynamic_params.py | kirat-singh/jedi | 65bc1c117b3175cb4d492484775c3fd7f207bc92 | [
"MIT"
] | 1,392 | 2015-01-02T18:43:39.000Z | 2022-03-27T18:43:59.000Z | test/completion/dynamic_params.py | PeterJCLaw/jedi | 070f191f550990c23220d7f209df076178307cf6 | [
"MIT"
] | 525 | 2015-01-02T19:07:31.000Z | 2022-03-13T02:03:20.000Z | """
This is used for dynamic object completion.
Jedi tries to guess param types with a backtracking approach.
"""
def func(a, default_arg=2):
#? int()
default_arg
#? int() str()
return a
#? int()
func(1)
func
int(1) + (int(2))+ func('')
# Again the same function, but with another call.
def func(a):
... | 13.74375 | 79 | 0.501592 |
598ec67ab2712a0f2eb1a2e73dbeffa8335f7539 | 1,377 | py | Python | clipper_admin/simple_dag.py | SimonZsx/clipper | 457088be2ebe68c68b94d90389d1308e35b4c844 | [
"Apache-2.0"
] | 2 | 2019-04-24T13:46:28.000Z | 2019-05-28T06:59:26.000Z | clipper_admin/simple_dag.py | SimonZsx/clipper | 457088be2ebe68c68b94d90389d1308e35b4c844 | [
"Apache-2.0"
] | null | null | null | clipper_admin/simple_dag.py | SimonZsx/clipper | 457088be2ebe68c68b94d90389d1308e35b4c844 | [
"Apache-2.0"
] | 4 | 2019-04-03T11:03:57.000Z | 2019-06-26T08:22:38.000Z | from __future__ import print_function
from clipper_admin import ClipperConnection, DockerContainerManager
from clipper_admin.deployers import python as python_deployer
import json
import requests
from datetime import datetime
import time
import numpy as np
import signal
import sys
# Stop Clipper on Ctrl-C
def signal... | 26.480769 | 79 | 0.654321 |
6af9072b0cbb0c57b138ae9f405213843758dbc0 | 593 | py | Python | interactors/run_healthcheck_loop.py | linxaddict/pytomatoes | fe281c6ba1a1f7d8ba87a5286afde9d1bd4f4d58 | [
"MIT"
] | null | null | null | interactors/run_healthcheck_loop.py | linxaddict/pytomatoes | fe281c6ba1a1f7d8ba87a5286afde9d1bd4f4d58 | [
"MIT"
] | 3 | 2020-04-24T21:18:24.000Z | 2020-05-21T19:58:55.000Z | interactors/run_healthcheck_loop.py | linxaddict/pytomatoes | fe281c6ba1a1f7d8ba87a5286afde9d1bd4f4d58 | [
"MIT"
] | null | null | null | import asyncio
from data.smart_garden.smart_garden_backend import SmartGardenBackend
class RunHealthCheckLoop:
def __init__(self, backend: SmartGardenBackend, interval: int = 5) -> None:
self._backend = backend
self._interval = interval
async def execute(self) -> None:
"""
Ru... | 29.65 | 105 | 0.637437 |
e82dee9665881108ad188ec69bb588f712de0412 | 3,921 | py | Python | python/ray/rllib/examples/custom_keras_model.py | alex-petrenko/ray | dfc94ce7bcd5d9d008822efdeec17c3f6bb9c606 | [
"Apache-2.0"
] | 1 | 2020-09-27T08:48:11.000Z | 2020-09-27T08:48:11.000Z | python/ray/rllib/examples/custom_keras_model.py | JunpingDu/ray | 214f09d969480279930994cabbcc2a75535cc6ca | [
"Apache-2.0"
] | 4 | 2019-03-04T13:03:24.000Z | 2019-06-06T11:25:07.000Z | python/ray/rllib/examples/custom_keras_model.py | JunpingDu/ray | 214f09d969480279930994cabbcc2a75535cc6ca | [
"Apache-2.0"
] | 1 | 2020-01-13T07:58:05.000Z | 2020-01-13T07:58:05.000Z | """Example of using a custom ModelV2 Keras-style model.
TODO(ekl): add this to docs once ModelV2 is fully implemented.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import ray
from ray import tune
from ray.rllib.models import ModelCa... | 35.324324 | 77 | 0.648559 |
5137abefdc63d578709f0ba0e75f52a401b4bcca | 1,326 | py | Python | server/openapi_server/test/test_tool_controller.py | cascadianblue/nlp-sandbox-deidentifier | 87b1c4a3dd33fb0f100e898517a7341238452e11 | [
"Apache-2.0"
] | 1 | 2021-12-01T02:17:16.000Z | 2021-12-01T02:17:16.000Z | server/openapi_server/test/test_tool_controller.py | nlpsandbox/phi-deidentifier | 3b4aa11f7f73ecab5ab1c698ddf4abf26e43e484 | [
"Apache-2.0"
] | 67 | 2020-11-30T18:37:22.000Z | 2021-06-05T02:28:53.000Z | server/openapi_server/test/test_tool_controller.py | nlpsandbox/phi-deidentifier-example | 9c836e75b2ac1fceb33e7f22fd02a5f30505ba98 | [
"Apache-2.0"
] | 2 | 2020-10-14T14:23:35.000Z | 2020-11-12T01:28:28.000Z | # coding: utf-8
from __future__ import absolute_import
import unittest
from unittest.mock import patch
from openapi_server.test import BaseTestCase
from openapi_server.test.utils import mock_get_tool
__doc__ = "Tests for Tool controller"
class TestToolController(BaseTestCase):
"""ToolController integration tes... | 25.018868 | 77 | 0.589744 |
3aa392bd3d509251032c78601d9923978c36b336 | 11,623 | py | Python | discogstagger/crawler.py | makzyt4/discogs-tagger | b578257922230b634d43349f2efd4fda72fdd008 | [
"MIT"
] | 2 | 2019-09-05T04:26:20.000Z | 2020-08-05T02:56:04.000Z | discogstagger/crawler.py | makzyt4/discogs-tagger | b578257922230b634d43349f2efd4fda72fdd008 | [
"MIT"
] | null | null | null | discogstagger/crawler.py | makzyt4/discogs-tagger | b578257922230b634d43349f2efd4fda72fdd008 | [
"MIT"
] | 1 | 2019-10-02T13:07:34.000Z | 2019-10-02T13:07:34.000Z | import requests
import urllib
from bs4 import BeautifulSoup
from collections import defaultdict
from discogstagger.wordprocessor import WordProcessor
class WebCrawler:
def __init__(self):
self.base_url = "https://discogs.com"
self.header = {
'User-Agent': 'Discogs Tagger User Agent 1.... | 38.87291 | 93 | 0.498925 |
2fc924ac5de9bb7db19b7373a4b5d5edea377e59 | 1,488 | py | Python | scripts/pages/user_engagement_analysis_page.py | DePacifier/TeleCo-Analysis | d1605e4c2354003ca389562c3920bd4c990ba0bc | [
"MIT"
] | null | null | null | scripts/pages/user_engagement_analysis_page.py | DePacifier/TeleCo-Analysis | d1605e4c2354003ca389562c3920bd4c990ba0bc | [
"MIT"
] | null | null | null | scripts/pages/user_engagement_analysis_page.py | DePacifier/TeleCo-Analysis | d1605e4c2354003ca389562c3920bd4c990ba0bc | [
"MIT"
] | null | null | null | import streamlit as st
import pandas as pd
import sys
sys.path.insert(0, '../scripts')
from results_pickler import ResultPickler
def app():
# Load Saved Results Data
results = ResultPickler()
results.load_data(file_name='./data/engagement_results.pickle')
st.title("User Engagement analysis")
st... | 28.615385 | 67 | 0.711694 |
4937e736c83b460ba248b4800b2cc5c06040081a | 3,257 | py | Python | src/appier/scheduler.py | veryprofessionaldodo/appier | 1a0c146753428a3d1a8c484467766ee871047757 | [
"Apache-2.0"
] | null | null | null | src/appier/scheduler.py | veryprofessionaldodo/appier | 1a0c146753428a3d1a8c484467766ee871047757 | [
"Apache-2.0"
] | null | null | null | src/appier/scheduler.py | veryprofessionaldodo/appier | 1a0c146753428a3d1a8c484467766ee871047757 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Hive Appier Framework
# Copyright (c) 2008-2020 Hive Solutions Lda.
#
# This file is part of Hive Appier Framework.
#
# Hive Appier Framework is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by the Apach... | 32.247525 | 80 | 0.653362 |
303158279d71de3ad7b5822e485a40d010eff863 | 3,835 | py | Python | Caldera/Caldera/settings.py | HappyTepid/Caldera_public | 877e617a396be9c1d67b558c1b9a90b029cef9c9 | [
"MIT"
] | null | null | null | Caldera/Caldera/settings.py | HappyTepid/Caldera_public | 877e617a396be9c1d67b558c1b9a90b029cef9c9 | [
"MIT"
] | null | null | null | Caldera/Caldera/settings.py | HappyTepid/Caldera_public | 877e617a396be9c1d67b558c1b9a90b029cef9c9 | [
"MIT"
] | null | null | null | """
Django settings for Caldera project.
Generated by 'django-admin startproject' using Django 2.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
im... | 26.631944 | 91 | 0.69309 |
51dbe46157d03476ef578487841c7c4f0e6ecf52 | 23,839 | py | Python | cinder/tests/unit/scheduler/test_filter_scheduler.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/scheduler/test_filter_scheduler.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | cinder/tests/unit/scheduler/test_filter_scheduler.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.000Z | # Copyright 2011 OpenStack Foundation
# 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 requ... | 48.0625 | 79 | 0.580352 |
20949cc7583cef1db2cc8fb0276f63adcb0d07da | 7,790 | py | Python | nvtabular/graph/schema_io/schema_writer_pbtxt.py | SimonCW/NVTabular | 229d6da5cfcf26dece7867ff43a1414b711b07be | [
"Apache-2.0"
] | null | null | null | nvtabular/graph/schema_io/schema_writer_pbtxt.py | SimonCW/NVTabular | 229d6da5cfcf26dece7867ff43a1414b711b07be | [
"Apache-2.0"
] | null | null | null | nvtabular/graph/schema_io/schema_writer_pbtxt.py | SimonCW/NVTabular | 229d6da5cfcf26dece7867ff43a1414b711b07be | [
"Apache-2.0"
] | 1 | 2020-08-17T05:41:28.000Z | 2020-08-17T05:41:28.000Z | #
# Copyright (c) 2021, 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 ... | 37.095238 | 98 | 0.642875 |
96b373de3b9e2b724fcd05a2638ce75eaa2b54f0 | 153 | py | Python | tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial4_Solution_7ac06f29.py | liuxiaomiao123/NeuroMathAcademy | 16a7969604a300bf9fbb86f8a5b26050ebd14c65 | [
"CC-BY-4.0"
] | 2 | 2020-07-03T04:39:09.000Z | 2020-07-12T02:08:31.000Z | tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial4_Solution_7ac06f29.py | NinaHKivanani/course-content | 3c91dd1a669cebce892486ba4f8086b1ef2e1e49 | [
"CC-BY-4.0"
] | 1 | 2020-06-22T22:57:03.000Z | 2020-06-22T22:57:03.000Z | tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial4_Solution_7ac06f29.py | NinaHKivanani/course-content | 3c91dd1a669cebce892486ba4f8086b1ef2e1e49 | [
"CC-BY-4.0"
] | 1 | 2021-08-06T08:05:01.000Z | 2021-08-06T08:05:01.000Z | X = X[:2000,:]
labels = labels[:2000]
score = pca_model.transform(X)
with plt.xkcd():
visualize_components(score[:,0],score[:,1],labels)
plt.show() | 19.125 | 52 | 0.666667 |
31acd48b4680429bfb8c4be9619adc4dc59c95c7 | 413 | py | Python | configs/_base_/default_runtime.py | escuccim/Swin-Transformer-Object-Detection | eb7fd32d8c39355d03b5364b6f7bb58e16763c03 | [
"Apache-2.0"
] | null | null | null | configs/_base_/default_runtime.py | escuccim/Swin-Transformer-Object-Detection | eb7fd32d8c39355d03b5364b6f7bb58e16763c03 | [
"Apache-2.0"
] | null | null | null | configs/_base_/default_runtime.py | escuccim/Swin-Transformer-Object-Detection | eb7fd32d8c39355d03b5364b6f7bb58e16763c03 | [
"Apache-2.0"
] | null | null | null | checkpoint_config = dict(interval=1)
# yapf:disable
log_config = dict(
interval=100,
hooks=[
dict(type='TextLoggerHook'),
# dict(type='TensorboardLoggerHook')
])
# yapf:enable
custom_hooks = [dict(type='NumClassCheckHook')]
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = "... | 24.294118 | 60 | 0.7046 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.