hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79796e406f8ee76b474f6fbcd2957a7037c360d8 | 399 | py | Python | fondo_api/migrations/0008_loan_disbursement_value.py | Fonmon/Fondo-API | 0c78eaab259df18219c01fceb67bd1b6ff8ec941 | [
"MIT"
] | null | null | null | fondo_api/migrations/0008_loan_disbursement_value.py | Fonmon/Fondo-API | 0c78eaab259df18219c01fceb67bd1b6ff8ec941 | [
"MIT"
] | 48 | 2018-01-13T14:52:52.000Z | 2022-03-13T17:41:42.000Z | fondo_api/migrations/0008_loan_disbursement_value.py | Fonmon/Fondo-API | 0c78eaab259df18219c01fceb67bd1b6ff8ec941 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.11 on 2019-12-29 21:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fondo_api', '0007_auto_20190609_1640'),
]
operations = [
migrations.AddField(
model_name='loan',
name='disbursement... | 21 | 52 | 0.611529 |
79796e675cadf85be2906612f0ea135d8ff35f7d | 15,460 | py | Python | lighthouse/helpers/plates.py | JamesGlover/lighthouse | c057079e59e1a4787fb44e18da0f000da92c05d8 | [
"MIT"
] | null | null | null | lighthouse/helpers/plates.py | JamesGlover/lighthouse | c057079e59e1a4787fb44e18da0f000da92c05d8 | [
"MIT"
] | null | null | null | lighthouse/helpers/plates.py | JamesGlover/lighthouse | c057079e59e1a4787fb44e18da0f000da92c05d8 | [
"MIT"
] | null | null | null | import copy
import logging
from http import HTTPStatus
from typing import Any, Dict, List, Optional
import requests
from flask import current_app as app
from lighthouse.constants import (
FIELD_COG_BARCODE,
FIELD_COORDINATE,
FIELD_DART_CONTROL,
FIELD_DART_DESTINATION_BARCODE,
FIELD_DART_DESTINATION... | 31.486762 | 99 | 0.644179 |
79796e9334f5c9415a57c4e8e7c79447e93a125e | 7,865 | py | Python | AlienInvasion/game_functions.py | imtoby/LearnPythonRecord | 81cfb0940da8af23afa67796b61973cc6ead31f9 | [
"Apache-2.0"
] | null | null | null | AlienInvasion/game_functions.py | imtoby/LearnPythonRecord | 81cfb0940da8af23afa67796b61973cc6ead31f9 | [
"Apache-2.0"
] | null | null | null | AlienInvasion/game_functions.py | imtoby/LearnPythonRecord | 81cfb0940da8af23afa67796b61973cc6ead31f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Created by: ZhaoDongshuang
# Created on: 18-1-29
import sys
import pygame
from time import sleep
from AlienInvasion.alien import Alien
from AlienInvasion.bullet import Bullet
def fire_bullet(ai_settings, screen, ship, bullets):
""" 如果还没有到达限制,就发射一颗子弹 """
# 创建新子弹,并将其加入到编组 bullets 中
... | 30.603113 | 79 | 0.644628 |
7979715f462ebf378c10aa3882dbc5a4ff6105ad | 1,286 | py | Python | venv1/Lib/site-packages/tensorflow/contrib/bayesflow/python/ops/metropolis_hastings.py | Soum-Soum/Tensorflow_Face_Finder | fec6c15d2df7012608511ad87f4b55731bf99478 | [
"Apache-2.0",
"MIT"
] | null | null | null | venv1/Lib/site-packages/tensorflow/contrib/bayesflow/python/ops/metropolis_hastings.py | Soum-Soum/Tensorflow_Face_Finder | fec6c15d2df7012608511ad87f4b55731bf99478 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-05-20T00:58:04.000Z | 2021-05-20T00:58:04.000Z | venv1/Lib/site-packages/tensorflow/contrib/bayesflow/python/ops/metropolis_hastings.py | Soum-Soum/Tensorflow_Face_Finder | fec6c15d2df7012608511ad87f4b55731bf99478 | [
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2017 The TensorFlow 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... | 36.742857 | 81 | 0.711509 |
797971b0115e4d7793404806138c513a78e838f5 | 5,821 | py | Python | acessar_banco_dados.py | GTL98/PreMia | b832d63aa34a1a53b81fb34aa70d1238761fc5d2 | [
"MIT"
] | null | null | null | acessar_banco_dados.py | GTL98/PreMia | b832d63aa34a1a53b81fb34aa70d1238761fc5d2 | [
"MIT"
] | null | null | null | acessar_banco_dados.py | GTL98/PreMia | b832d63aa34a1a53b81fb34aa70d1238761fc5d2 | [
"MIT"
] | null | null | null | from datetime import date
from PyQt5.QtWidgets import QWidget, QMessageBox
from interface_grafica.interface_grafica_python import tela_acessar_banco_dados
from alimentar_glicemia import AdicionarDadosGlicemia
from alimentar_pressao import AdicionarDadosPressao
from alimentar_glicemia_pressao import AdicionarDadosGlicem... | 36.610063 | 110 | 0.595946 |
797971e0253bf2fd7f049dee3432f84c7be50c9f | 3,855 | py | Python | model_building/decision_tree_experiment_configuration.py | eubr-atmosphere/a-MLLibrary | b6ba472baacea6d793ab4f03275cdfa874e83bc3 | [
"Apache-2.0"
] | 3 | 2021-09-19T17:06:31.000Z | 2021-12-10T23:21:21.000Z | model_building/decision_tree_experiment_configuration.py | eubr-atmosphere/a-MLLibrary | b6ba472baacea6d793ab4f03275cdfa874e83bc3 | [
"Apache-2.0"
] | null | null | null | model_building/decision_tree_experiment_configuration.py | eubr-atmosphere/a-MLLibrary | b6ba472baacea6d793ab4f03275cdfa874e83bc3 | [
"Apache-2.0"
] | 1 | 2021-09-27T13:54:12.000Z | 2021-09-27T13:54:12.000Z | """
Copyright 2019 Marco Lattuada
Copyright 2019 Danilo Ardagna
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... | 41.451613 | 112 | 0.684047 |
79797291ad9c859053123cbf3a9e21f504db10d4 | 4,134 | py | Python | tests/test_models/ssd_mobilenet.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | null | null | null | tests/test_models/ssd_mobilenet.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | null | null | null | tests/test_models/ssd_mobilenet.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2019 Intel 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 to in writin... | 31.318182 | 103 | 0.604983 |
797973a07384ed42714da30772cadca0c94a6420 | 8,296 | py | Python | querybook/server/datasources_socketio/datadoc.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 1,144 | 2021-03-30T05:06:16.000Z | 2022-03-31T10:40:31.000Z | querybook/server/datasources_socketio/datadoc.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 593 | 2021-07-01T10:34:25.000Z | 2022-03-31T23:24:40.000Z | querybook/server/datasources_socketio/datadoc.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 113 | 2021-03-30T00:07:20.000Z | 2022-03-31T07:18:43.000Z | import time
import functools
from flask import request
from flask_login import current_user
from flask_socketio import join_room, leave_room, rooms
from app.auth.permission import verify_environment_permission
from app.flask_app import socketio
from app.db import DBSession
from clients.redis_client import with_redis
... | 31.18797 | 83 | 0.692864 |
797973c24d54fae7bac8e576137cc33e3f9e7f4d | 600 | py | Python | ReverseGame.py | chaitubhure/HackerRank-Mathematics | bbb9417c06f21d15ee04edcde2da94fe75db81e0 | [
"MIT"
] | 1 | 2019-09-09T15:17:38.000Z | 2019-09-09T15:17:38.000Z | ReverseGame.py | chaitubhure/HackerRank-Mathematics | bbb9417c06f21d15ee04edcde2da94fe75db81e0 | [
"MIT"
] | null | null | null | ReverseGame.py | chaitubhure/HackerRank-Mathematics | bbb9417c06f21d15ee04edcde2da94fe75db81e0 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
def reversal(n,k):
lt = list(range(n))
lt.reverse()
for i in range(1,n):
lt_ = lt[i:]
lt_.reverse()
lt = lt[0:i] + lt_
return (lt.index(k))
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_P... | 15.384615 | 47 | 0.476667 |
7979752920359001b5b30a62e40e6a5af997efc2 | 351 | py | Python | komar_mark_3_2_hm.py | twistedTongues/Python_course | b2d5abacb898d8243368e8bd1495c8c5a63e2ddf | [
"Apache-2.0"
] | null | null | null | komar_mark_3_2_hm.py | twistedTongues/Python_course | b2d5abacb898d8243368e8bd1495c8c5a63e2ddf | [
"Apache-2.0"
] | null | null | null | komar_mark_3_2_hm.py | twistedTongues/Python_course | b2d5abacb898d8243368e8bd1495c8c5a63e2ddf | [
"Apache-2.0"
] | null | null | null | a = int(input())
b = int(input())
c = int(input())
# 1
res = a and b and c and "Нет нулевых значений!!!"
print(res)
# 2
res_2 = a or b or c or "Введены все нули!"
print(res_2)
# 3, 4
if a > (b + c):
print(a-b-c)
else:
print(b + c - a)
# 5
if a > 50 and b > a or c > a:
print('Vasya')
# 6
if a > 5 or b == 7 ... | 15.954545 | 49 | 0.524217 |
79797550cdf8acb2092fc0610d6e32a8f1b480e7 | 6,237 | py | Python | pyzoo/zoo/chronos/forecast/prophet_forecaster.py | cyita/analytics-zoo | 0e089182e037982801954172e0435ae0977c65bb | [
"Apache-2.0"
] | 1 | 2021-07-08T01:11:04.000Z | 2021-07-08T01:11:04.000Z | pyzoo/zoo/chronos/forecast/prophet_forecaster.py | cyita/analytics-zoo | 0e089182e037982801954172e0435ae0977c65bb | [
"Apache-2.0"
] | null | null | null | pyzoo/zoo/chronos/forecast/prophet_forecaster.py | cyita/analytics-zoo | 0e089182e037982801954172e0435ae0977c65bb | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2018 Analytics Zoo 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 applicable law or agreed to... | 43.615385 | 112 | 0.648549 |
797975aaa7a12c75b19d5726712ef4950a48b28d | 249 | py | Python | d2go/data/cache_util.py | zhiqwang/d2go | 82a8e0a0a51f07bb2940f5b9f1803f32e0bcc095 | [
"Apache-2.0"
] | 1 | 2021-04-10T09:35:23.000Z | 2021-04-10T09:35:23.000Z | d2go/data/cache_util.py | zhanghang1989/d2go | dbc9a9f4b635b9c51de1dd405dbca4fdff78614e | [
"Apache-2.0"
] | null | null | null | d2go/data/cache_util.py | zhanghang1989/d2go | dbc9a9f4b635b9c51de1dd405dbca4fdff78614e | [
"Apache-2.0"
] | 1 | 2021-03-25T16:19:43.000Z | 2021-03-25T16:19:43.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import os
def _cache_json_file(json_file):
# TODO: entirely rely on PathManager for caching
json_file = os.fspath(json_file)
return json_file
| 27.666667 | 70 | 0.746988 |
79797600c6428d5fc997a4e6310f27434e19e531 | 126 | py | Python | md_2_html/main.py | berkerdemoglu/md-2-html | 8b6988b49bc43386c6bf916cc4d646442fb966e1 | [
"MIT"
] | null | null | null | md_2_html/main.py | berkerdemoglu/md-2-html | 8b6988b49bc43386c6bf916cc4d646442fb966e1 | [
"MIT"
] | 5 | 2021-03-25T11:27:29.000Z | 2021-04-06T10:55:05.000Z | md_2_html/main.py | berkerdemoglu/md-2-html | 8b6988b49bc43386c6bf916cc4d646442fb966e1 | [
"MIT"
] | 3 | 2021-03-26T20:15:47.000Z | 2021-04-03T17:32:22.000Z | from md_2_html.gui import GUIApp
def main():
app = GUIApp()
app.start_app()
if __name__ == '__main__':
main()
| 11.454545 | 32 | 0.619048 |
7979770b9d7aee5ccfeabfb1685e19235ace27d2 | 25,457 | py | Python | selfdrive/controls/lib/alerts.py | r1ptide64/openpilot | 3980882a6382c5d6b564251c53ce6ec453ec3ed2 | [
"MIT"
] | null | null | null | selfdrive/controls/lib/alerts.py | r1ptide64/openpilot | 3980882a6382c5d6b564251c53ce6ec453ec3ed2 | [
"MIT"
] | null | null | null | selfdrive/controls/lib/alerts.py | r1ptide64/openpilot | 3980882a6382c5d6b564251c53ce6ec453ec3ed2 | [
"MIT"
] | null | null | null | from cereal import car, log
# Priority
class Priority:
LOWEST = 0
LOW_LOWEST = 1
LOW = 2
MID = 3
HIGH = 4
HIGHEST = 5
AlertSize = log.ControlsState.AlertSize
AlertStatus = log.ControlsState.AlertStatus
AudibleAlert = car.CarControl.HUDControl.AudibleAlert
VisualAlert = car.CarControl.HUDControl.VisualAler... | 31.901003 | 110 | 0.661036 |
797977120a9ec8fac611c4eddadd0b37421b3453 | 4,059 | py | Python | kubernetes/client/models/apiregistration_v1beta1_service_reference.py | woqer/python | 3a6fe8231cefe1fa39a0a69d4b2f33044ab32745 | [
"Apache-2.0"
] | 1 | 2019-07-12T05:38:06.000Z | 2019-07-12T05:38:06.000Z | kubernetes/client/models/apiregistration_v1beta1_service_reference.py | woqer/python | 3a6fe8231cefe1fa39a0a69d4b2f33044ab32745 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/apiregistration_v1beta1_service_reference.py | woqer/python | 3a6fe8231cefe1fa39a0a69d4b2f33044ab32745 | [
"Apache-2.0"
] | 1 | 2021-05-18T12:25:56.000Z | 2021-05-18T12:25:56.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 26.187097 | 105 | 0.572062 |
7979772c7f6bafea57a6c4137d5495586f963f27 | 8,721 | py | Python | src/zvt/recorders/eastmoney/finance/base_china_stock_finance_recorder.py | vishalbelsare/zvt | d55051147274c0a4157f08ec60908c781a323c8f | [
"MIT"
] | 2,032 | 2019-04-16T14:10:32.000Z | 2022-03-31T12:40:13.000Z | src/zvt/recorders/eastmoney/finance/base_china_stock_finance_recorder.py | vishalbelsare/zvt | d55051147274c0a4157f08ec60908c781a323c8f | [
"MIT"
] | 162 | 2019-05-07T09:57:46.000Z | 2022-03-25T16:23:08.000Z | src/zvt/recorders/eastmoney/finance/base_china_stock_finance_recorder.py | vishalbelsare/zvt | d55051147274c0a4157f08ec60908c781a323c8f | [
"MIT"
] | 755 | 2019-04-30T10:25:16.000Z | 2022-03-29T17:50:49.000Z | # -*- coding: utf-8 -*-
from jqdatapy.api import get_fundamentals
from zvt.api.utils import to_report_period_type
from zvt.contract.api import get_data
from zvt.domain import FinanceFactor, ReportPeriod
from zvt.recorders.eastmoney.common import (
company_type_flag,
get_fc,
EastmoneyTimestampsDataRecorder... | 38.418502 | 115 | 0.573673 |
7979773357d39817afb9ec6fc27fc2e7ce182116 | 1,104 | py | Python | test/config.py | chariothy/pycommon | 470d4d3404ea1a1c6a4e5f7fb4c9b02b123c2971 | [
"MIT"
] | null | null | null | test/config.py | chariothy/pycommon | 470d4d3404ea1a1c6a4e5f7fb4c9b02b123c2971 | [
"MIT"
] | null | null | null | test/config.py | chariothy/pycommon | 470d4d3404ea1a1c6a4e5f7fb4c9b02b123c2971 | [
"MIT"
] | null | null | null | CONFIG = {
'log': {
'level': 'DEBUG', # 与log库的level一致,包括DEBUG, INFO, ERROR
# DEBUG - Enable stdout, file, mail (如果在dest中启用)
# INFO - Enable file, mail (如果在dest中启用)
# ERROR - Enable mail (... | 35.612903 | 82 | 0.471014 |
7979784d0230ad69f2e9226aea6f9ca09e6a4b19 | 7,902 | py | Python | modin/pandas/__init__.py | reshamas/modin | b01f91fb3a628ce374aa830964d094480f73afca | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | modin/pandas/__init__.py | reshamas/modin | b01f91fb3a628ce374aa830964d094480f73afca | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | modin/pandas/__init__.py | reshamas/modin | b01f91fb3a628ce374aa830964d094480f73afca | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 23.309735 | 88 | 0.633004 |
79797abd03904aa89a484285fa8fabf532748421 | 6,500 | py | Python | presidio-analyzer/presidio_analyzer/recognizer_registry/recognizer_registry.py | rakan41/presidio | 67cb019ff059ed772a8aacbf2f0f334390dca6ce | [
"MIT"
] | 1 | 2021-07-06T01:59:09.000Z | 2021-07-06T01:59:09.000Z | presidio-analyzer/presidio_analyzer/recognizer_registry/recognizer_registry.py | rakan41/presidio | 67cb019ff059ed772a8aacbf2f0f334390dca6ce | [
"MIT"
] | null | null | null | presidio-analyzer/presidio_analyzer/recognizer_registry/recognizer_registry.py | rakan41/presidio | 67cb019ff059ed772a8aacbf2f0f334390dca6ce | [
"MIT"
] | null | null | null | import copy
import logging
from typing import Optional, List, Iterable, Union, Type
from presidio_analyzer import EntityRecognizer
from presidio_analyzer.nlp_engine import NlpEngine, SpacyNlpEngine, StanzaNlpEngine
from presidio_analyzer.predefined_recognizers import (
CreditCardRecognizer,
CryptoRecognizer,
... | 32.338308 | 88 | 0.594 |
79797ae07a8a106c7e4609a351a8178e5cb76440 | 4,185 | py | Python | tensor2tensor/rl/rl_utils.py | angelfish91/tensor2tensor | 168928d29cdd887fd6cdd5d5ad35181bef614154 | [
"Apache-2.0"
] | 1 | 2018-12-12T03:20:15.000Z | 2018-12-12T03:20:15.000Z | tensor2tensor/rl/rl_utils.py | angelfish91/tensor2tensor | 168928d29cdd887fd6cdd5d5ad35181bef614154 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/rl/rl_utils.py | angelfish91/tensor2tensor | 168928d29cdd887fd6cdd5d5ad35181bef614154 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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 applicable... | 32.695313 | 78 | 0.748865 |
79797c3c72b5affb798240975b46d25ecf76e931 | 4,969 | py | Python | pontoon/base/forms.py | julen/pontoon | 872496bd2cd148a2e5a60d669d5be538166f75e7 | [
"BSD-3-Clause"
] | null | null | null | pontoon/base/forms.py | julen/pontoon | 872496bd2cd148a2e5a60d669d5be538166f75e7 | [
"BSD-3-Clause"
] | null | null | null | pontoon/base/forms.py | julen/pontoon | 872496bd2cd148a2e5a60d669d5be538166f75e7 | [
"BSD-3-Clause"
] | null | null | null | import os
from django import forms
from pontoon.base.models import (
Locale,
ProjectLocale,
User,
UserProfile
)
from pontoon.sync.formats import SUPPORTED_FORMAT_PARSERS
class NoTabStopCharField(forms.CharField):
widget = forms.TextInput(attrs={'tabindex': '-1'})
class NoTabStopFileField(forms... | 31.449367 | 106 | 0.631113 |
79797c898b1b42177e0b800d5a63a0186fbfec39 | 406 | py | Python | pyensemble/wsgi.py | janatalab/pyensemble | aa0312598f79e8d334822913671d5bb7088fac5f | [
"MIT"
] | 1 | 2021-07-03T20:37:49.000Z | 2021-07-03T20:37:49.000Z | pyensemble/wsgi.py | janatalab/pyensemble | aa0312598f79e8d334822913671d5bb7088fac5f | [
"MIT"
] | 2 | 2020-07-30T13:45:29.000Z | 2020-10-24T19:31:50.000Z | pyensemble/wsgi.py | janatalab/pyensemble | aa0312598f79e8d334822913671d5bb7088fac5f | [
"MIT"
] | null | null | null | """
WSGI config for pyensemble project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SE... | 23.882353 | 79 | 0.79064 |
79797cd1f3eccb0bdb0c67c3ecbfeca863b5cf52 | 5,507 | py | Python | train.py | liyunbin/Tacotron-2 | 3b765aac25810aa591dab42765aab8fcbf76ebf9 | [
"MIT"
] | null | null | null | train.py | liyunbin/Tacotron-2 | 3b765aac25810aa591dab42765aab8fcbf76ebf9 | [
"MIT"
] | null | null | null | train.py | liyunbin/Tacotron-2 | 3b765aac25810aa591dab42765aab8fcbf76ebf9 | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use('Agg')
import argparse
import tensorflow as tf
from tacotron.train import tacotron_train
from wavenet_vocoder.train import wavenet_train
from tacotron.synthesize import tacotron_synthesize
from infolog import log
from hparams import hparams
import os
import infolog
from ti... | 41.719697 | 147 | 0.673506 |
79797da0e78b667d49315e35071dff15f6fa103a | 1,236 | py | Python | conftest.py | oriolromani/minst-dataset | 5847ac421522a393df77ca2a43acdc326f7d64e8 | [
"0BSD"
] | 44 | 2016-03-26T13:41:09.000Z | 2022-01-19T08:52:47.000Z | conftest.py | oriolromani/minst-dataset | 5847ac421522a393df77ca2a43acdc326f7d64e8 | [
"0BSD"
] | 37 | 2016-05-25T06:32:44.000Z | 2018-08-21T09:15:40.000Z | conftest.py | oriolromani/minst-dataset | 5847ac421522a393df77ca2a43acdc326f7d64e8 | [
"0BSD"
] | 8 | 2016-05-25T13:45:44.000Z | 2021-06-18T12:14:01.000Z | import pytest
import shutil
import tempfile
import os
DATA = 'data'
RAW = 'raw_dataroot'
@pytest.fixture()
def data_root():
return os.path.join(os.path.dirname(__file__), DATA)
@pytest.fixture()
def onset_root(data_root):
return os.path.join(data_root, 'onsets')
@pytest.fixture()
def raw_data_root(data_... | 19.619048 | 75 | 0.716019 |
797980d1775c0bfd8f731b313954c5900d73bad3 | 2,737 | py | Python | tests/languages/test_vietnamese.py | kevinbazira/revscoring | 625f8b8048eb3c0c1c872ed9c15687c56f125747 | [
"MIT"
] | 49 | 2015-07-15T14:53:06.000Z | 2018-08-20T15:00:31.000Z | tests/languages/test_vietnamese.py | kevinbazira/revscoring | 625f8b8048eb3c0c1c872ed9c15687c56f125747 | [
"MIT"
] | 224 | 2015-06-14T23:22:43.000Z | 2018-08-08T22:52:46.000Z | tests/languages/test_vietnamese.py | kevinbazira/revscoring | 625f8b8048eb3c0c1c872ed9c15687c56f125747 | [
"MIT"
] | 36 | 2015-07-03T03:25:01.000Z | 2018-05-25T10:21:08.000Z | import pickle
from revscoring.datasources import revision_oriented
from revscoring.dependencies import solve
from revscoring.languages import vietnamese
from .util import compare_extraction
BAD = [
"đít", "địt",
"dâm", "dzâm", "giâm",
"cu", "ku",
"cứt",
"lôn", "lồn",
"đụ", "đù",
"đái",
... | 26.317308 | 76 | 0.614907 |
797981bd3fe44823f415e28d93c3b4e290896493 | 3,650 | py | Python | control_scripts/run_for_nature_highSi.py | nknezek/MgSi-Exsolution | 925d3e2f47256a4618fd77c39f23e233d3e9bdcd | [
"MIT"
] | null | null | null | control_scripts/run_for_nature_highSi.py | nknezek/MgSi-Exsolution | 925d3e2f47256a4618fd77c39f23e233d3e9bdcd | [
"MIT"
] | null | null | null | control_scripts/run_for_nature_highSi.py | nknezek/MgSi-Exsolution | 925d3e2f47256a4618fd77c39f23e233d3e9bdcd | [
"MIT"
] | null | null | null | import numpy as np
from shutil import copyfile
import matplotlib.pyplot as plt
import sys, os
import dill
sys.path.append('../')
import mg_si
import csv
import datetime
from mg_si import plot as mplt
print(sys.argv)
layer_thickness = 100 # m
overturn = 600 # Myr
times = np.linspace(0,4568e6*365.25*24*3600,20000)
##... | 30.672269 | 145 | 0.664932 |
797981d42d0e14b2c61b646112ab33cf01e254a4 | 1,037 | py | Python | tinycord/models/user/presence/presence.py | tinycord/tinycord | 9e817452c1f2357878f07f8622f6240687470cad | [
"MIT"
] | 8 | 2022-01-08T20:04:29.000Z | 2022-03-21T19:12:19.000Z | tinycord/models/user/presence/presence.py | tinycord/tinycord | 9e817452c1f2357878f07f8622f6240687470cad | [
"MIT"
] | null | null | null | tinycord/models/user/presence/presence.py | tinycord/tinycord | 9e817452c1f2357878f07f8622f6240687470cad | [
"MIT"
] | 1 | 2022-01-02T21:42:53.000Z | 2022-01-02T21:42:53.000Z | import typing
import dataclasses
if typing.TYPE_CHECKING:
from ....client import Client
from .activity import Activity
from ....utils import Snowflake
from ..user import User
@dataclasses.dataclass(repr=False)
class Presence:
def __init__(
self, client: "Client", **data
) -> None:
self.c... | 25.292683 | 80 | 0.585342 |
797981e5b1ffb86fa7eb78d374763e5efa25feaa | 387 | py | Python | face_count/migrations/0007_auto_20200405_1435.py | reibomaru/face_counter | fcee6a6fd3e996a1fbc0bdc6bb8a881afb0284bf | [
"MIT"
] | 3 | 2020-03-11T17:19:02.000Z | 2020-04-29T04:35:35.000Z | face_count/migrations/0007_auto_20200405_1435.py | reibomaru/face_counter | fcee6a6fd3e996a1fbc0bdc6bb8a881afb0284bf | [
"MIT"
] | 48 | 2020-03-12T02:54:35.000Z | 2020-04-08T05:16:48.000Z | face_count/migrations/0007_auto_20200405_1435.py | reibomaru/face_counter | fcee6a6fd3e996a1fbc0bdc6bb8a881afb0284bf | [
"MIT"
] | null | null | null | # Generated by Django 2.1.1 on 2020-04-05 05:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('face_count', '0006_usagelist'),
]
operations = [
migrations.AlterField(
model_name='usagelist',
name='list_link',
... | 20.368421 | 51 | 0.599483 |
797982dd50dc3905bcf73fb0ba94d3870818e86b | 7,926 | py | Python | model.py | ddman1101/SRCNN-Partial-Convolution | a8d4d771b866abd71879207e70864f87b6f2d473 | [
"MIT"
] | null | null | null | model.py | ddman1101/SRCNN-Partial-Convolution | a8d4d771b866abd71879207e70864f87b6f2d473 | [
"MIT"
] | null | null | null | model.py | ddman1101/SRCNN-Partial-Convolution | a8d4d771b866abd71879207e70864f87b6f2d473 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
from utils import (
read_data,
input_setup,
imsave,
merge,
imread,
merge2,
psnr,
psnr2
)
import time
import os
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import glob
import feature_map
import csv
import partial_conv as pc
try:
xrange
except... | 36.027273 | 133 | 0.620868 |
797983160c707613c342097fa101055f8be41434 | 13,524 | py | Python | tests/test_elk_reporter.py | pharmon-duo/pytest-elk-reporter | 6936bca5b09305bde664109ba2ee83f464385d3c | [
"MIT"
] | 17 | 2019-06-25T18:28:40.000Z | 2022-03-31T18:31:13.000Z | tests/test_elk_reporter.py | pharmon-duo/pytest-elk-reporter | 6936bca5b09305bde664109ba2ee83f464385d3c | [
"MIT"
] | 22 | 2019-09-03T10:27:03.000Z | 2021-12-27T22:00:45.000Z | tests/test_elk_reporter.py | pharmon-duo/pytest-elk-reporter | 6936bca5b09305bde664109ba2ee83f464385d3c | [
"MIT"
] | 9 | 2019-08-31T01:18:29.000Z | 2022-02-24T20:19:10.000Z | # -*- coding: utf-8 -*-
import os
import json
import pytest
def test_failures(testdir, requests_mock): # pylint: disable=redefined-outer-name
"""Make sure that pytest accepts our fixture."""
# create a temporary pytest test module
testdir.makepyfile(
"""
import pytest
@pytest.... | 30.053333 | 85 | 0.638273 |
79798390c15d8f3f881fae868ecfeaf269f04d20 | 1,785 | py | Python | tests/test_elk.py | QAtestinc/testspace-colab | 2ff6bc93be1083f71b47e593c4d4db35fb129802 | [
"MIT"
] | 2 | 2021-09-03T12:12:25.000Z | 2021-09-03T12:13:37.000Z | tests/test_elk.py | QAtestinc/testspace-colab | 2ff6bc93be1083f71b47e593c4d4db35fb129802 | [
"MIT"
] | null | null | null | tests/test_elk.py | QAtestinc/testspace-colab | 2ff6bc93be1083f71b47e593c4d4db35fb129802 | [
"MIT"
] | null | null | null | import os
import pytest
import elasticsearch
import testspace_colab.elk as elk_module
@pytest.mark.skipif(
"CODESPACES" in os.environ, reason="docker not supported in codespace yet"
)
class TestELKDocker:
@pytest.mark.parametrize("elk_state", [None])
def test_not_instanciated(self, elk_api):
asser... | 37.1875 | 78 | 0.685714 |
7979848c72d9c11617ff401476daa987ace131d8 | 4,557 | py | Python | packages/syft/src/syft/core/common/serde/serializable.py | leosole/PySyft | 01606f08f5ec5510840644e198301cd25c3ccfa5 | [
"Apache-1.1"
] | null | null | null | packages/syft/src/syft/core/common/serde/serializable.py | leosole/PySyft | 01606f08f5ec5510840644e198301cd25c3ccfa5 | [
"Apache-1.1"
] | null | null | null | packages/syft/src/syft/core/common/serde/serializable.py | leosole/PySyft | 01606f08f5ec5510840644e198301cd25c3ccfa5 | [
"Apache-1.1"
] | null | null | null | # stdlib
from typing import Any
from typing import Callable as CallableT
import warnings
# third party
from google.protobuf.reflection import GeneratedProtocolMessageType
# syft absolute
import syft
# relative
from ....util import aggressive_set_attr
from .deserialize import CAPNP_REGISTRY
module_type = type(syft)
... | 31 | 81 | 0.672592 |
7979849109d1e6ac5d4ae7560efeea56673cf782 | 2,863 | py | Python | tests/utils.py | Laneglos/error-tracker | b07366e94199fc5157ddc5623fa12c8c0d07c483 | [
"BSD-3-Clause"
] | 16 | 2019-12-17T10:57:43.000Z | 2022-01-30T13:03:53.000Z | tests/utils.py | Laneglos/error-tracker | b07366e94199fc5157ddc5623fa12c8c0d07c483 | [
"BSD-3-Clause"
] | 15 | 2020-01-08T12:08:32.000Z | 2022-01-28T13:16:48.000Z | tests/utils.py | Laneglos/error-tracker | b07366e94199fc5157ddc5623fa12c8c0d07c483 | [
"BSD-3-Clause"
] | 8 | 2020-01-08T14:10:14.000Z | 2021-01-31T22:26:07.000Z | # -*- coding: utf-8 -*-
#
# Test utility
#
# :copyright: 2020 Sonu Kumar
# :license: BSD-3-Clause
#
import datetime
from collections import namedtuple
import six
from error_tracker import ModelMixin, TicketingMixin, NotificationMixin, MaskingMixin, ViewPermissionMixin
Error = namedtuple("Error", "hash, ho... | 26.757009 | 106 | 0.61963 |
7979864d9d287a66d88037c4be331bfb8f58697a | 14,737 | py | Python | src/hdusd/engine/final_engine.py | pablode/BlenderUSDHydraAddon | 08b1459cf7b7d8a86d14fe1c50bd008134e7ebb7 | [
"Apache-2.0"
] | null | null | null | src/hdusd/engine/final_engine.py | pablode/BlenderUSDHydraAddon | 08b1459cf7b7d8a86d14fe1c50bd008134e7ebb7 | [
"Apache-2.0"
] | 2 | 2022-01-12T13:06:16.000Z | 2022-01-12T13:11:26.000Z | src/hdusd/engine/final_engine.py | pablode/BlenderUSDHydraAddon | 08b1459cf7b7d8a86d14fe1c50bd008134e7ebb7 | [
"Apache-2.0"
] | null | null | null | #**********************************************************************
# Copyright 2020 Advanced Micro Devices, 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.or... | 38.578534 | 120 | 0.640836 |
797986ae4c46b6ec3f4f9f0cebd39c58a341f18e | 311 | py | Python | langserver/config.py | sourcegraph/langserver-python | 214b2717b44a5bd7aaf4ac077ac1b9054de064ec | [
"MIT"
] | 116 | 2016-11-15T23:53:41.000Z | 2021-07-17T17:50:11.000Z | langserver/config.py | sourcegraph/langserver-python | 214b2717b44a5bd7aaf4ac077ac1b9054de064ec | [
"MIT"
] | 37 | 2016-11-18T22:52:17.000Z | 2018-11-15T06:53:13.000Z | langserver/config.py | sourcegraph/python-langserver | 214b2717b44a5bd7aaf4ac077ac1b9054de064ec | [
"MIT"
] | 11 | 2017-05-27T06:53:00.000Z | 2020-12-17T11:20:25.000Z | import distutils
class GlobalConfig:
# TODO: allow different Python stdlib versions per workspace?
PYTHON_PATH = distutils.sysconfig.get_python_lib(standard_lib=True)
PACKAGES_PARENT = "python-langserver-cache"
STDLIB_REPO_URL = "git://github.com/python/cpython"
STDLIB_SRC_PATH = "Lib"
| 25.916667 | 71 | 0.755627 |
7979872ec16b86aa8bf5bf664cde26c3fffad626 | 770 | py | Python | plugins/examples/example_configsource_plugin/tests/test_example_config_source.py | mshvartsman/hydra | 65057c36c05187fdadd07db4f4b4e086a22fc030 | [
"MIT"
] | 1 | 2020-07-13T09:06:16.000Z | 2020-07-13T09:06:16.000Z | plugins/examples/example_configsource_plugin/tests/test_example_config_source.py | mshvartsman/hydra | 65057c36c05187fdadd07db4f4b4e086a22fc030 | [
"MIT"
] | 6 | 2021-03-01T21:23:23.000Z | 2022-02-27T09:15:03.000Z | plugins/examples/example_configsource_plugin/tests/test_example_config_source.py | mshvartsman/hydra | 65057c36c05187fdadd07db4f4b4e086a22fc030 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import pytest # type: ignore
from hydra.core.plugins import Plugins
from hydra.plugins.config_source import ConfigSource
from hydra.test_utils.config_source_common_tests import ConfigSourceTestSuite
from hydra_plugins.example_configsource_plugin.e... | 35 | 88 | 0.793506 |
797988bf8c89d46b3a7bff49df47becac6f8d93a | 3,129 | py | Python | Machine Learning A-Z/Part 2 - Regression/Section 5 - Multiple Linear Regression/Multiple_Linear_Regression/my_multiple_linear_regression.py | s10singh97/Machine_Learning | d8f49568c46427f91a84d85bc7f9580387789b1a | [
"Apache-2.0"
] | 1 | 2018-12-09T06:55:30.000Z | 2018-12-09T06:55:30.000Z | Machine Learning A-Z/Part 2 - Regression/Section 5 - Multiple Linear Regression/Multiple_Linear_Regression/my_multiple_linear_regression.py | s10singh97/Machine_Learning | d8f49568c46427f91a84d85bc7f9580387789b1a | [
"Apache-2.0"
] | null | null | null | Machine Learning A-Z/Part 2 - Regression/Section 5 - Multiple Linear Regression/Multiple_Linear_Regression/my_multiple_linear_regression.py | s10singh97/Machine_Learning | d8f49568c46427f91a84d85bc7f9580387789b1a | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
dataset = pd.read_csv('50_Startups.csv')
X = dataset.iloc[:, :-1].values
y = dataset.iloc[:, -1].values
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
labelencoder = LabelEncoder()
X[:, 3] = labelencoder.fit_transform(X[:, 3])
oneh... | 35.157303 | 92 | 0.613295 |
797988d78298950294b2391675f2b0c450fd942b | 448 | py | Python | setup.py | ebu/bear | 0e4c4f33dfaea9b7c64991515177eb2099887a5a | [
"Apache-2.0"
] | 14 | 2022-02-01T16:28:53.000Z | 2022-02-11T11:24:59.000Z | setup.py | ebu/bear | 0e4c4f33dfaea9b7c64991515177eb2099887a5a | [
"Apache-2.0"
] | 1 | 2022-03-03T06:49:47.000Z | 2022-03-15T13:10:43.000Z | setup.py | ebu/bear | 0e4c4f33dfaea9b7c64991515177eb2099887a5a | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
setup(
name="bear",
description="Binaural EBU ADM Renderer",
version="0.0.1",
install_requires=[
"ear~=2.1",
"numpy",
],
packages=find_packages(),
extras_require={
"test": ["pytest"],
"dev": ["flake8", "flake8-black... | 20.363636 | 49 | 0.535714 |
79798976fdf91950ffcf1ac0c6915f50f30cfa16 | 1,014 | py | Python | Codes/Algo Implement/pipeline-logistic-reg.py | shohan4556/machine-learning-course-notes | 981f3d6e9861cbee0f4dec45b1d2e6a214d2a051 | [
"MIT"
] | 8 | 2019-10-12T17:08:58.000Z | 2020-02-26T02:54:01.000Z | Codes/Algo Implement/pipeline-logistic-reg.py | shohan4556/machine-learning-course-notes | 981f3d6e9861cbee0f4dec45b1d2e6a214d2a051 | [
"MIT"
] | null | null | null | Codes/Algo Implement/pipeline-logistic-reg.py | shohan4556/machine-learning-course-notes | 981f3d6e9861cbee0f4dec45b1d2e6a214d2a051 | [
"MIT"
] | 5 | 2019-10-30T03:50:20.000Z | 2020-07-11T20:53:47.000Z | from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.model_selection import GridSearchCV
from sklearn import datasets
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
'''
steps = [('imputation', Imputer(missing_values='NaN', strat... | 29.823529 | 91 | 0.749507 |
79798b41399ee20892111782b7177f7bb195534a | 3,191 | py | Python | gen_graph.py | frnsys/power_districting | 955df5861eea7dc632c3f8b879e960583025b8ef | [
"MIT"
] | null | null | null | gen_graph.py | frnsys/power_districting | 955df5861eea7dc632c3f8b879e960583025b8ef | [
"MIT"
] | null | null | null | gen_graph.py | frnsys/power_districting | 955df5861eea7dc632c3f8b879e960583025b8ef | [
"MIT"
] | null | null | null | import fiona
import pandas as pd
import geopandas as gpd
from tqdm import tqdm
from gerrychain import Graph
from networkx import is_connected, connected_components
# Census tracts
# See `data/src/ACS_2018_5YR_TRACT_36_NEW_YORK.gdb/TRACT_METADATA_2018.txt`
tracts_file = 'data/src/ACS_2018_5YR_TRACT_36_NEW_YORK.gdb'
kee... | 40.392405 | 110 | 0.728925 |
79798ba74bc18911a7c2f76a1cb5e082ad5bc9f6 | 807 | py | Python | release/cs_submitter/mainform/migrations/0014_auto_20170814_1516.py | kvswim/kv_jhucs_coursesubmit | a00f2d1ca52204857bdf34271e13d97b424fcfca | [
"MIT"
] | null | null | null | release/cs_submitter/mainform/migrations/0014_auto_20170814_1516.py | kvswim/kv_jhucs_coursesubmit | a00f2d1ca52204857bdf34271e13d97b424fcfca | [
"MIT"
] | null | null | null | release/cs_submitter/mainform/migrations/0014_auto_20170814_1516.py | kvswim/kv_jhucs_coursesubmit | a00f2d1ca52204857bdf34271e13d97b424fcfca | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-14 19:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mainform', '0013_auto_20170814_1505'),
]
operations = [
migrations.AlterFie... | 31.038462 | 148 | 0.540273 |
79798c4d5453941d3fa3f2ab2456b1c3124c352b | 10,905 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/style/optparser_unittest.py | google-ar/chromium | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 777 | 2017-08-29T15:15:32.000Z | 2022-03-21T05:29:41.000Z | third_party/WebKit/Tools/Scripts/webkitpy/style/optparser_unittest.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 66 | 2017-08-30T18:31:18.000Z | 2021-08-02T10:59:35.000Z | third_party/WebKit/Tools/Scripts/webkitpy/style/optparser_unittest.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 123 | 2017-08-30T01:19:34.000Z | 2022-03-17T22:55:31.000Z | # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# 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... | 42.431907 | 80 | 0.628794 |
79798e1ddf046b94dd2bc04b2a781b875688857a | 169 | py | Python | Languages/Python/python_study_2/page4/script.py | myarist/Progate | 0132583c989b5ec1805d4de1a6f6861586cf152e | [
"MIT"
] | 5 | 2021-09-08T03:07:22.000Z | 2022-03-18T13:36:27.000Z | Languages/Python/python_study_2/page4/script.py | myarist/Progate | 0132583c989b5ec1805d4de1a6f6861586cf152e | [
"MIT"
] | null | null | null | Languages/Python/python_study_2/page4/script.py | myarist/Progate | 0132583c989b5ec1805d4de1a6f6861586cf152e | [
"MIT"
] | 12 | 2021-05-11T07:54:20.000Z | 2022-03-27T02:55:46.000Z | fruits = ['apel', 'pisang', 'jeruk']
# Dapatkan element fruits menggunakan loop for, dan cetak 'Saya suka ___'
for fruit in fruits:
print('Saya suka ' + fruit)
| 28.166667 | 73 | 0.668639 |
79798eb3737a664ed023303c5948107d774c0221 | 19,072 | py | Python | python-capdl-tool/capdl/Object.py | lsf37/capdl | cb30c4b7bf15b32d4fead591b92722d2e102c43b | [
"BSD-2-Clause"
] | null | null | null | python-capdl-tool/capdl/Object.py | lsf37/capdl | cb30c4b7bf15b32d4fead591b92722d2e102c43b | [
"BSD-2-Clause"
] | null | null | null | python-capdl-tool/capdl/Object.py | lsf37/capdl | cb30c4b7bf15b32d4fead591b92722d2e102c43b | [
"BSD-2-Clause"
] | null | null | null | #
# Copyright 2017, Data61
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230.
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(DATA61_BSD)
#
... | 29.341538 | 153 | 0.623637 |
79798f1ec12336f891e6edbd6a95f393469a5d43 | 1,315 | py | Python | rotateMatrix180Deg.py | deepak5998/Py | 5ae3bd9e8dcf3104a8ca7512911a1607f6c9ae20 | [
"MIT"
] | 726 | 2019-06-04T04:46:06.000Z | 2022-03-31T17:54:00.000Z | rotateMatrix180Deg.py | SakyaSumedh/Python-Interview-Problems-for-Practice | 2e413870cdacd3ba96fddce0a3af1fda7820d160 | [
"MIT"
] | 12 | 2019-06-05T14:21:35.000Z | 2021-04-17T05:11:01.000Z | rotateMatrix180Deg.py | SakyaSumedh/Python-Interview-Problems-for-Practice | 2e413870cdacd3ba96fddce0a3af1fda7820d160 | [
"MIT"
] | 118 | 2019-06-04T10:25:12.000Z | 2022-02-04T22:31:12.000Z | def rotateMatrixby90(ipMat, size):
opMat = [[0 for i in range(size)] for j in range(size)]
for i in range(size):
for j in range(size):
opMat[j][i] = ipMat[i][j]
return opMat
def reverseMatrix(ipMat, size):
opMat = [[0 for i in range(size)] for j in range(size)]
for i in range(size):
for j i... | 27.395833 | 70 | 0.653232 |
79798feb6b93017c9b89f6e23ad68aab65a390e3 | 528 | py | Python | reid/utils/model.py | donggong1/PAST-ReID | 4efc8c32b4d64eda33a0124dac45b7692f77f55a | [
"MIT"
] | 2 | 2021-02-20T12:14:43.000Z | 2021-02-20T12:18:46.000Z | reid/utils/model.py | donggong1/PAST-ReID | 4efc8c32b4d64eda33a0124dac45b7692f77f55a | [
"MIT"
] | null | null | null | reid/utils/model.py | donggong1/PAST-ReID | 4efc8c32b4d64eda33a0124dac45b7692f77f55a | [
"MIT"
] | null | null | null |
import torch.nn as nn
import copy
def init_classifier(m):
if isinstance(m, nn.Linear):
nn.init.normal_(m.weight, std=0.001)
if m.bias is not None:
nn.init.constant_(m.bias, 0)
def create_embedding(in_dim=None, out_dim=None, local_conv=False):
layers = [
nn.Conv2d(in_dim,... | 24 | 84 | 0.659091 |
7979901ef298e6d738e8c4a43fbab03a46aa88b5 | 5,301 | py | Python | crispy/rolls/core.py | thegreathippo/crispy | e648a25ff8ec24a3fac3931ba28660b8e22f3020 | [
"MIT"
] | null | null | null | crispy/rolls/core.py | thegreathippo/crispy | e648a25ff8ec24a3fac3931ba28660b8e22f3020 | [
"MIT"
] | null | null | null | crispy/rolls/core.py | thegreathippo/crispy | e648a25ff8ec24a3fac3931ba28660b8e22f3020 | [
"MIT"
] | null | null | null | import random
import weakref
import collections
namedtuple = collections.namedtuple
randint = random.randint
def _roller(low, high):
return [randint(low, high), randint(low, high)]
class DieRoll:
def __init__(self, *args, roller=None):
if roller is None:
roller = _roller
self.ro... | 24.655814 | 69 | 0.554801 |
79799084bf124abb51926b2f44f2b697bf562647 | 5,600 | py | Python | cons3rt/models/aws_client_configuration.py | cons3rt/cons3rt-python-sdk | f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0 | [
"RSA-MD"
] | null | null | null | cons3rt/models/aws_client_configuration.py | cons3rt/cons3rt-python-sdk | f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0 | [
"RSA-MD"
] | null | null | null | cons3rt/models/aws_client_configuration.py | cons3rt/cons3rt-python-sdk | f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0 | [
"RSA-MD"
] | null | null | null | """
Copyright 2020 Jackpine Technologies 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 ... | 32.941176 | 122 | 0.634643 |
7979909a51ae5cbe836305348283a4fe2fd8178b | 3,429 | py | Python | sounds.py | CatOnXTC/Discord_bot | dd2a820a1428aca5072f9866da19c6a9e2bae996 | [
"MIT"
] | null | null | null | sounds.py | CatOnXTC/Discord_bot | dd2a820a1428aca5072f9866da19c6a9e2bae996 | [
"MIT"
] | null | null | null | sounds.py | CatOnXTC/Discord_bot | dd2a820a1428aca5072f9866da19c6a9e2bae996 | [
"MIT"
] | null | null | null | import asyncio
import discord
import os.path
from discord.ext import commands
class Sounds(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
self.voice = None
self.alphabet = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','V','W','Y','Z']... | 37.271739 | 121 | 0.538058 |
797990daa882f456f786c96332360de95824d52a | 1,100 | py | Python | naivepyrunner/job.py | henningjanssen/naivepyrunner | 6cadd18bf39776a68450464fd964d59bc7cd7ee8 | [
"MIT"
] | null | null | null | naivepyrunner/job.py | henningjanssen/naivepyrunner | 6cadd18bf39776a68450464fd964d59bc7cd7ee8 | [
"MIT"
] | 3 | 2018-03-21T16:15:20.000Z | 2018-05-20T03:53:17.000Z | naivepyrunner/job.py | henningjanssen/naivepyrunner | 6cadd18bf39776a68450464fd964d59bc7cd7ee8 | [
"MIT"
] | null | null | null | from time import time
class Job(object):
def __init__(self, task, duetime, *arg, **kwargs):
self.task = task
self.duetime = duetime
def execute(self):
sleep_time = self.task.execute()
if sleep_time < 0:
return False
self.duetime = sleep_time + time()
... | 26.190476 | 64 | 0.593636 |
797990fa6fcd9e5e44b2c038a78558612cb0b72b | 4,073 | py | Python | strava/swagger_client/models/activity_type.py | neozenith/strava-gsheet-python | cce24721d6dcae69638c99261308f3d76512a087 | [
"MIT"
] | null | null | null | strava/swagger_client/models/activity_type.py | neozenith/strava-gsheet-python | cce24721d6dcae69638c99261308f3d76512a087 | [
"MIT"
] | null | null | null | strava/swagger_client/models/activity_type.py | neozenith/strava-gsheet-python | cce24721d6dcae69638c99261308f3d76512a087 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Strava API v3
The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with differe... | 32.325397 | 726 | 0.605696 |
7979920b994f9a7a69c4eeae52af40ca47c60adc | 7,203 | py | Python | pyscf/prop/magnetizability/rks.py | pavanell/pyscf | c0d19e499685e95dbf4c879539ad3a3ceb6934e2 | [
"Apache-2.0"
] | 2 | 2021-06-30T22:33:35.000Z | 2021-11-22T18:02:36.000Z | pyscf/prop/magnetizability/rks.py | pavanell/pyscf | c0d19e499685e95dbf4c879539ad3a3ceb6934e2 | [
"Apache-2.0"
] | 2 | 2019-09-16T17:58:31.000Z | 2019-09-22T17:26:01.000Z | pyscf/prop/magnetizability/rks.py | pavanell/pyscf | c0d19e499685e95dbf4c879539ad3a3ceb6934e2 | [
"Apache-2.0"
] | 2 | 2020-06-01T05:31:38.000Z | 2022-02-08T02:38:33.000Z | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | 34.464115 | 79 | 0.549077 |
7979926a2c60f647961046432e246ced64806a68 | 15,144 | py | Python | scripts/default_parser.py | johnzhang1999/deep-mvb-reid | bf5da1238d36179a6d4e412b4c996b9eb29ae6c4 | [
"MIT"
] | null | null | null | scripts/default_parser.py | johnzhang1999/deep-mvb-reid | bf5da1238d36179a6d4e412b4c996b9eb29ae6c4 | [
"MIT"
] | null | null | null | scripts/default_parser.py | johnzhang1999/deep-mvb-reid | bf5da1238d36179a6d4e412b4c996b9eb29ae6c4 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import argparse
def init_parser():
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--app', type=str, default='image', choices=['image', 'video'],
... | 49.815789 | 99 | 0.549459 |
7979932cc240f9de0385b47ef2574290fefc70d4 | 2,033 | py | Python | query/plans/tpch17.py | cakebytheoceanLuo/dogqc | 163618becdb57bd952a1ac5ba346d3c7ec163e04 | [
"MIT"
] | 12 | 2020-02-08T10:41:50.000Z | 2022-02-25T13:21:52.000Z | query/plans/tpch17.py | cakebytheoceanLuo/dogqc | 163618becdb57bd952a1ac5ba346d3c7ec163e04 | [
"MIT"
] | 62 | 2021-12-02T03:08:20.000Z | 2022-03-31T14:05:58.000Z | query/plans/tpch17.py | cakebytheoceanLuo/dogqc | 163618becdb57bd952a1ac5ba346d3c7ec163e04 | [
"MIT"
] | 4 | 2020-03-15T03:34:10.000Z | 2022-03-18T07:51:37.000Z | [
alg.createtemp (
"lineitem_filtered",
alg.projection (
[ "l_quantity", "l_extendedprice", "l_partkey" ],
alg.join (
( "l_partkey", "p_partkey" ),
alg.selection (
scal.AndExpr (
scal.EqualsExpr (
scal.AttrExpr ... | 31.765625 | 76 | 0.369897 |
79799331caa856c717a1d95e59f8a2307fdf9f54 | 8,051 | py | Python | tests/unit/core/autoslugfield_tests.py | ZazieTheBeast/oscar | ca7898fd5cb67c56ae8607f4ecac7a6798c6c714 | [
"BSD-3-Clause"
] | 68 | 2016-11-06T05:07:57.000Z | 2021-12-17T09:17:38.000Z | tests/unit/core/autoslugfield_tests.py | ZazieTheBeast/oscar | ca7898fd5cb67c56ae8607f4ecac7a6798c6c714 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/core/autoslugfield_tests.py | ZazieTheBeast/oscar | ca7898fd5cb67c56ae8607f4ecac7a6798c6c714 | [
"BSD-3-Clause"
] | 28 | 2016-12-04T07:12:50.000Z | 2021-02-06T21:13:15.000Z | # coding=utf-8
"""
AutoSlugField taken from django-extensions at
15d3eb305957cee4768dd86e44df1bdad341a10e
Uses Oscar's slugify function instead of Django's
Copyright (c) 2007 Michael Trier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files ... | 35.157205 | 86 | 0.640542 |
797993cb3668a39c3d95fb61c52d684ed28c1e5d | 1,192 | py | Python | database_handler/sql_conn.py | PaulNicolasHunter/simple_flask_app | d01d9f4f45726b5fee7a3632c5b4700935240913 | [
"MIT"
] | null | null | null | database_handler/sql_conn.py | PaulNicolasHunter/simple_flask_app | d01d9f4f45726b5fee7a3632c5b4700935240913 | [
"MIT"
] | null | null | null | database_handler/sql_conn.py | PaulNicolasHunter/simple_flask_app | d01d9f4f45726b5fee7a3632c5b4700935240913 | [
"MIT"
] | null | null | null | import sqlite3
class SqlManagment:
def __init__(self):
self.conn = sqlite3.connect('products_store.db', check_same_thread=False)
def check_existing(self, q):
tables = self.conn.execute("SELECT name FROM sqlite_master WHERE type='table';").fetchall()
if (q,) not in tables:
return False
else:
return Tr... | 28.380952 | 93 | 0.57802 |
797994e666b24d0bb525921f0ac65616419c785a | 3,467 | py | Python | utils/voiceflow_helpers.py | daiangan/voiceflow-twilio-ivr | 94d3ab1fbd83d6bc034579b429823ba2f2f9f0d2 | [
"MIT"
] | 2 | 2021-09-10T14:30:56.000Z | 2022-03-19T15:56:33.000Z | utils/voiceflow_helpers.py | daiangan/voiceflow-twilio-ivr | 94d3ab1fbd83d6bc034579b429823ba2f2f9f0d2 | [
"MIT"
] | null | null | null | utils/voiceflow_helpers.py | daiangan/voiceflow-twilio-ivr | 94d3ab1fbd83d6bc034579b429823ba2f2f9f0d2 | [
"MIT"
] | null | null | null | import json
from dataclasses import dataclass, field
from typing import Literal
import requests
@dataclass
class VoiceFlowMessage:
type: Literal[
'text',
'audio',
'choices',
'call_forwarding',
'end'
]
data: object = lambda: None
@dataclass
class VoiceFlow:
ap... | 24.764286 | 84 | 0.46784 |
797995b46e29cf3042b928047befb826374e0e03 | 1,694 | py | Python | leer/core/storage/utxo_index_storage.py | TensorVirus/leer | 9295c7e16364c8ff6da37a120a28e61a2c002ac6 | [
"MIT"
] | null | null | null | leer/core/storage/utxo_index_storage.py | TensorVirus/leer | 9295c7e16364c8ff6da37a120a28e61a2c002ac6 | [
"MIT"
] | null | null | null | leer/core/storage/utxo_index_storage.py | TensorVirus/leer | 9295c7e16364c8ff6da37a120a28e61a2c002ac6 | [
"MIT"
] | null | null | null | import os, lmdb
class UTXOIndex:
'''
Basically it is index [public_key -> set of unspent outputs with this public key]
'''
__shared_states = {}
def __init__(self, storage_space, path):
if not path in self.__shared_states:
self.__shared_states[path]={}
self.__dict__ = self.__shared_states[p... | 34.571429 | 103 | 0.72196 |
79799639b90c26713715848dd01ad38fa23d73fd | 60,164 | py | Python | tccli/services/postgres/postgres_client.py | zqfan/tencentcloud-cli | b6ad9fced2a2b340087e4e5522121d405f68b615 | [
"Apache-2.0"
] | null | null | null | tccli/services/postgres/postgres_client.py | zqfan/tencentcloud-cli | b6ad9fced2a2b340087e4e5522121d405f68b615 | [
"Apache-2.0"
] | null | null | null | tccli/services/postgres/postgres_client.py | zqfan/tencentcloud-cli | b6ad9fced2a2b340087e4e5522121d405f68b615 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import json
import tccli.options_define as OptionsDefine
import tccli.format_output as FormatOutput
from tccli import __version__
from tccli.utils import Utils
from tccli.exceptions import ConfigurationError
from tencentcloud.common import credential
from tencentcloud.common.profile.ht... | 44.011704 | 105 | 0.731617 |
797996c99d1c1fc019096d51251fa1f1b1092782 | 563 | py | Python | programs/pgm11_15.py | danielsunzhongyuan/python_practice | 79bc88db1c52ee2f5607f6f9fec1bbacea2804ff | [
"Apache-2.0"
] | null | null | null | programs/pgm11_15.py | danielsunzhongyuan/python_practice | 79bc88db1c52ee2f5607f6f9fec1bbacea2804ff | [
"Apache-2.0"
] | null | null | null | programs/pgm11_15.py | danielsunzhongyuan/python_practice | 79bc88db1c52ee2f5607f6f9fec1bbacea2804ff | [
"Apache-2.0"
] | null | null | null | #
# This file contains the Python code from Program 11.15 of
# "Data Structures and Algorithms
# with Object-Oriented Design Patterns in Python"
# by Bruno R. Preiss.
#
# Copyright (c) 2003 by Bruno R. Preiss, P.Eng. All rights reserved.
#
# http://www.brpreiss.com/books/opus7/programs/pgm11_15.txt
#
class BinomialQue... | 25.590909 | 69 | 0.687389 |
797996e75f725c78f44bc614d02fbe71ab094bf4 | 5,302 | py | Python | utils/generate_examples.py | mesejo/elasticsearch-py | 041a433de263482e306b3855ab67b93c03978966 | [
"Apache-2.0"
] | null | null | null | utils/generate_examples.py | mesejo/elasticsearch-py | 041a433de263482e306b3855ab67b93c03978966 | [
"Apache-2.0"
] | null | null | null | utils/generate_examples.py | mesejo/elasticsearch-py | 041a433de263482e306b3855ab67b93c03978966 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information
import json
import tempfile
import collections
import black
from click.testing import CliRunn... | 31.748503 | 115 | 0.644285 |
797997531d943370cd77457f95e449902b23dce2 | 2,690 | py | Python | paper/rubygems/transitive.py | mt3443/typosquatting | 7c127bf613cb1f5044c6574bad43563d4000f3b7 | [
"MIT"
] | null | null | null | paper/rubygems/transitive.py | mt3443/typosquatting | 7c127bf613cb1f5044c6574bad43563d4000f3b7 | [
"MIT"
] | null | null | null | paper/rubygems/transitive.py | mt3443/typosquatting | 7c127bf613cb1f5044c6574bad43563d4000f3b7 | [
"MIT"
] | null | null | null | # Looks for typosquatting in the transitive dependencies of all packages for RubyGems
import json
import os
import re
import random
# get all packages
print('Loading packages...', flush=True)
all_packages = open('/volatile/m139t745/rubygems_dependencies').read().splitlines()
random.shuffle(all_packages)
... | 29.56044 | 162 | 0.658364 |
7979977d1c9e4b98a795d7d14b139a82ac60743f | 144 | py | Python | RobotApp/catkin_ws/src/util/__init__.py | soracom-labs/ros-bridge-image-sharing-example | bf89b184fcd7ea6078293d72fbe6568f53826641 | [
"MIT"
] | null | null | null | RobotApp/catkin_ws/src/util/__init__.py | soracom-labs/ros-bridge-image-sharing-example | bf89b184fcd7ea6078293d72fbe6568f53826641 | [
"MIT"
] | null | null | null | RobotApp/catkin_ws/src/util/__init__.py | soracom-labs/ros-bridge-image-sharing-example | bf89b184fcd7ea6078293d72fbe6568f53826641 | [
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = '1.0.0'
from . import application_exception
__all__ = ['application_exception']
| 14.4 | 35 | 0.680556 |
797999817c8dfedc348c53576e29b579e0d7943e | 349 | py | Python | setup.py | yambanis/CovidMDP | cf26153afc60c87f3d94472090ed1dd698274e8c | [
"MIT"
] | 4 | 2020-05-11T03:34:54.000Z | 2021-04-11T07:31:06.000Z | setup.py | yambanis/CovidMDP | cf26153afc60c87f3d94472090ed1dd698274e8c | [
"MIT"
] | null | null | null | setup.py | yambanis/CovidMDP | cf26153afc60c87f3d94472090ed1dd698274e8c | [
"MIT"
] | 1 | 2020-06-11T23:01:12.000Z | 2020-06-11T23:01:12.000Z | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='The goal of this work is to use Markov Decision Processes (MDPs) to analyze planning policies for epidemic control of SARS-CoV-2 or similar diseases.',
author='Guilherme, Denis, Le... | 31.727273 | 168 | 0.716332 |
79799b865f0d83b7e72a82de8f4d009814b5c2ff | 22,184 | py | Python | pycco/main.py | dsignr/pycco | cd2bf2568d47661a9000725da17d938899783a94 | [
"MIT"
] | null | null | null | pycco/main.py | dsignr/pycco | cd2bf2568d47661a9000725da17d938899783a94 | [
"MIT"
] | null | null | null | pycco/main.py | dsignr/pycco | cd2bf2568d47661a9000725da17d938899783a94 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
"**Pycco**" is a Python port of [Docco](http://jashkenas.github.com/docco/):
the original quick-and-dirty, hundred-line-long, literate-programming-style
documentation generator. It produces HTML that displays your comments alongside
your code. Comments are passed through [Markdown][markdown] a... | 34.181818 | 105 | 0.610801 |
79799db15697de3f6785866b3ae1188058cc6247 | 47 | py | Python | deeplodocus/core/project/deep_structure/modules/transforms/__init__.py | Ahleroy/deeplodocus | 70d0c870b41f02d629c0305a2702793a09d53f33 | [
"MIT"
] | null | null | null | deeplodocus/core/project/deep_structure/modules/transforms/__init__.py | Ahleroy/deeplodocus | 70d0c870b41f02d629c0305a2702793a09d53f33 | [
"MIT"
] | null | null | null | deeplodocus/core/project/deep_structure/modules/transforms/__init__.py | Ahleroy/deeplodocus | 70d0c870b41f02d629c0305a2702793a09d53f33 | [
"MIT"
] | null | null | null | #
# AUTOGENERATED FILE FOR THE DEEP STRUCTURE
# | 15.666667 | 43 | 0.765957 |
79799dbcafda3f6fe1e87e7f641fab7c9bf983be | 6,746 | py | Python | assignment2/cs231n/optim.py | Aliasgarsaifee/CS231n | 972602c75a4a3d767e5e98b374d23ea4722d2017 | [
"MIT"
] | null | null | null | assignment2/cs231n/optim.py | Aliasgarsaifee/CS231n | 972602c75a4a3d767e5e98b374d23ea4722d2017 | [
"MIT"
] | 14 | 2020-03-24T17:02:19.000Z | 2022-03-11T23:52:51.000Z | assignment2/cs231n/optim.py | Aliasgarsaifee/CS231n | 972602c75a4a3d767e5e98b374d23ea4722d2017 | [
"MIT"
] | null | null | null | import numpy as np
"""
This file implements various first-order update rules that are commonly used
for training neural networks. Each update rule accepts current weights and the
gradient of the loss with respect to those weights and produces the next set of
weights. Each update rule has the same interface:
def updat... | 40.39521 | 79 | 0.542544 |
79799ed549500692503e4baac66d2ece933d1da5 | 51,985 | py | Python | google/cloud/bigquery_datatransfer_v1/proto/transfer_pb2.py | danoscarmike/python-bigquery-datatransfer | dcb10545243642b29ea3556ceddf0dafab3eea9b | [
"Apache-2.0"
] | null | null | null | google/cloud/bigquery_datatransfer_v1/proto/transfer_pb2.py | danoscarmike/python-bigquery-datatransfer | dcb10545243642b29ea3556ceddf0dafab3eea9b | [
"Apache-2.0"
] | null | null | null | google/cloud/bigquery_datatransfer_v1/proto/transfer_pb2.py | danoscarmike/python-bigquery-datatransfer | dcb10545243642b29ea3556ceddf0dafab3eea9b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/bigquery_datatransfer_v1/proto/transfer.proto
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from googl... | 38.535953 | 4,479 | 0.63905 |
79799fb022f15f26ca08a56a530f6900ba1b08b9 | 440 | py | Python | awsm/profiles/exceptions.py | jeevb/awsm | 28149b6032adcd349014c3c273a9a030926a19b0 | [
"MIT"
] | null | null | null | awsm/profiles/exceptions.py | jeevb/awsm | 28149b6032adcd349014c3c273a9a030926a19b0 | [
"MIT"
] | null | null | null | awsm/profiles/exceptions.py | jeevb/awsm | 28149b6032adcd349014c3c273a9a030926a19b0 | [
"MIT"
] | null | null | null | class ProfileError(Exception):
pass
class ProfileNotFoundError(Exception):
def __init__(self, profile):
message = 'Profile not found: {}'.format(profile)
super(ProfileNotFoundError, self).__init__(message)
class InvalidProfileError(Exception):
def __init__(self, profile, errors):
... | 29.333333 | 67 | 0.704545 |
79799ff91e2ad3ba0b56af0b6fa6db7b04d62c47 | 1,510 | py | Python | 2020/day_19/solution_lark.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | 2020/day_19/solution_lark.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | 2020/day_19/solution_lark.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | from lark import Lark
import re
import networkx as nx
from parse import *
import copy
from collections import defaultdict
import itertools
import numpy as np
from math import cos, sin, pi
import contextlib
from unittest import TestCase
def read_input(filename="input.txt"):
with open(filename) as f:
top, b... | 25.166667 | 76 | 0.617881 |
7979a0d3d660465f514e2d2aeffb46edcf2c04d0 | 5,327 | py | Python | insomnia/models/dqn.py | takeru1205/Insomnia | 72f78db5dc7b9c6e494f31408e0a011606275291 | [
"MIT"
] | null | null | null | insomnia/models/dqn.py | takeru1205/Insomnia | 72f78db5dc7b9c6e494f31408e0a011606275291 | [
"MIT"
] | 3 | 2019-12-02T01:59:09.000Z | 2020-12-15T09:44:33.000Z | insomnia/models/dqn.py | takeru1205/Insomnia | 72f78db5dc7b9c6e494f31408e0a011606275291 | [
"MIT"
] | null | null | null | from copy import deepcopy
import random
import torch
import torch.nn as nn
import torch.optim as optim
from ..networks import simple_net
from ..replay_buffers import replay_buffer
class DQN:
"""Deep Q Network.
Implementation of https://www.nature.com/articles/nature14236.
Attributes:
env (gym.... | 38.05 | 118 | 0.639947 |
7979a11aef7e666d53c091bb8e8ce0b57a78238c | 2,636 | py | Python | utils/build_swift/migration.py | LynnKirby/swift | 11a8be196751f8f7c194bea83b5f4f8e6a7d5360 | [
"Apache-2.0"
] | 10 | 2019-05-11T02:17:28.000Z | 2022-02-06T15:37:53.000Z | utils/build_swift/migration.py | LynnKirby/swift | 11a8be196751f8f7c194bea83b5f4f8e6a7d5360 | [
"Apache-2.0"
] | 3 | 2018-09-27T23:09:06.000Z | 2018-10-18T18:12:20.000Z | utils/build_swift/migration.py | LynnKirby/swift | 11a8be196751f8f7c194bea83b5f4f8e6a7d5360 | [
"Apache-2.0"
] | 3 | 2017-08-28T13:45:21.000Z | 2018-06-28T10:53:37.000Z | # This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIBUTORS.txt for the list o... | 31.011765 | 79 | 0.709408 |
7979a169e72be060a6017428449750e49cb9f1ef | 692 | py | Python | CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/reporting/__init__.py | wdobbels/CAAPR | 50d0b32642a61af614c22f1c6dc3c4a00a1e71a3 | [
"MIT"
] | 7 | 2016-05-20T21:56:39.000Z | 2022-02-07T21:09:48.000Z | CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/reporting/__init__.py | wdobbels/CAAPR | 50d0b32642a61af614c22f1c6dc3c4a00a1e71a3 | [
"MIT"
] | 1 | 2019-03-21T16:10:04.000Z | 2019-03-22T17:21:56.000Z | CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/reporting/__init__.py | wdobbels/CAAPR | 50d0b32642a61af614c22f1c6dc3c4a00a1e71a3 | [
"MIT"
] | 1 | 2020-05-19T16:17:17.000Z | 2020-05-19T16:17:17.000Z | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
# ... | 34.6 | 71 | 0.322254 |
7979a230eed8439b7e3d47568852ba0d397dc22f | 96,657 | py | Python | pandas/core/series.py | sdementen/pandas | e23e6f164209167c0fba0d32c862c5e75e6d4a8a | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/core/series.py | sdementen/pandas | e23e6f164209167c0fba0d32c862c5e75e6d4a8a | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/core/series.py | sdementen/pandas | e23e6f164209167c0fba0d32c862c5e75e6d4a8a | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | """
Data structure for 1-dimensional cross-sectional and time series data
"""
from __future__ import division
# pylint: disable=E1101,E1103
# pylint: disable=W0703,W0622,W0613,W0201
import types
import warnings
from numpy import nan, ndarray
import numpy as np
import numpy.ma as ma
from pandas.types.common import (... | 32.843017 | 79 | 0.538833 |
7979a432523ed881773ec633f84c2c1ca36d5a2c | 9,470 | py | Python | src/sentry/models/event.py | looker/sentry | af849d1944d296cfcccfb5f163661ade847900dc | [
"BSD-3-Clause"
] | null | null | null | src/sentry/models/event.py | looker/sentry | af849d1944d296cfcccfb5f163661ade847900dc | [
"BSD-3-Clause"
] | null | null | null | src/sentry/models/event.py | looker/sentry | af849d1944d296cfcccfb5f163661ade847900dc | [
"BSD-3-Clause"
] | null | null | null | """
sentry.models.event
~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import six
import string
import warnings
from collections import OrderedDict
from django.db import models
fro... | 30.746753 | 96 | 0.626082 |
7979a4ac312a8d4d529f8b8978f89a2f7ac523c6 | 27,162 | py | Python | Webapp/main.py | lordbeerus0505/voting-system-blockchain | b22f3289b472ec237eb56a1f08c14d94e3044b47 | [
"MIT"
] | null | null | null | Webapp/main.py | lordbeerus0505/voting-system-blockchain | b22f3289b472ec237eb56a1f08c14d94e3044b47 | [
"MIT"
] | null | null | null | Webapp/main.py | lordbeerus0505/voting-system-blockchain | b22f3289b472ec237eb56a1f08c14d94e3044b47 | [
"MIT"
] | null | null | null | import flask
import os
import json
from flask import Flask, render_template, request,redirect
import sys
from werkzeug import secure_filename
from vote_system import Voting
import pdb
from azurenews import NewsSearch
import cv2
import pymongo
import requests
# app.secret_key = 'development'
session={}
applid=4
abhiwaa... | 39.025862 | 746 | 0.659414 |
7979a78f374d495899e7237a09f2c6c72b793674 | 660 | py | Python | pg_methods/conjugate_gradient.py | zafarali/policy-gradient-methods | f0d83a80ddc772dcad0c851aac9bfd41d436c274 | [
"MIT"
] | 28 | 2018-06-12T21:37:20.000Z | 2021-12-27T15:13:14.000Z | pg_methods/conjugate_gradient.py | zafarali/policy-gradient-methods | f0d83a80ddc772dcad0c851aac9bfd41d436c274 | [
"MIT"
] | 3 | 2018-05-10T16:33:05.000Z | 2018-06-19T18:17:37.000Z | pg_methods/conjugate_gradient.py | zafarali/policy-gradient-methods | f0d83a80ddc772dcad0c851aac9bfd41d436c274 | [
"MIT"
] | 7 | 2018-05-08T04:13:21.000Z | 2021-04-02T12:31:55.000Z | """Implementation of the conjugate gradient algorithm."""
import numpy as np
def conjugate_gradient_algorithm(f_Ax, b, cg_iters=10, residual_tol=1e-10):
"""
Demmel p 312
https://github.com/joschu/modular_rl/blob/6970cde3da265cf2a98537250fea5e0c0d9a7639/modular_rl/trpo.py#L122
"""
p = b.copy()
r... | 23.571429 | 110 | 0.577273 |
7979a84d10a4d8a0252afe06f05e09e92ca41e54 | 28,299 | py | Python | tests/test_config.py | simonw/coveragepy | 694435b844760ca0443cf87bf73a537f06c37d7d | [
"Apache-2.0"
] | null | null | null | tests/test_config.py | simonw/coveragepy | 694435b844760ca0443cf87bf73a537f06c37d7d | [
"Apache-2.0"
] | null | null | null | tests/test_config.py | simonw/coveragepy | 694435b844760ca0443cf87bf73a537f06c37d7d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""Test the config file handling for coverage.py"""
import mock
import coverage
from coverage.misc import CoverageException
import coverage.option... | 39.634454 | 98 | 0.599703 |
7979a85836449a3260842b5bfd8982a70f2a8ff2 | 2,107 | py | Python | wordle/file_reader.py | felicitywk/visualization | 46fd15757b232e4d693dbefe26fa850024013517 | [
"MIT"
] | 17 | 2019-04-28T09:23:26.000Z | 2021-12-14T23:47:13.000Z | wordle/file_reader.py | felicitywk/visualization | 46fd15757b232e4d693dbefe26fa850024013517 | [
"MIT"
] | null | null | null | wordle/file_reader.py | felicitywk/visualization | 46fd15757b232e4d693dbefe26fa850024013517 | [
"MIT"
] | 4 | 2019-03-28T11:05:03.000Z | 2021-04-03T14:04:53.000Z | # Author: Hayk Aleksanyan
# read file and tokenize into words
import traceback
class FileReaderFromBinary:
def __init__(self, log_file=""):
self.log_file = log_file
@property
def name(self):
return type(self).__name__
def read_file_into_list_of_row(self, file_path, verbose=0):
... | 35.116667 | 117 | 0.455624 |
7979a89d3776dc97338da607a5c7b4cc579556e8 | 303 | py | Python | pySDC/tests/test_projects/test_RDC/test_MLRDC_PFASST.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 20 | 2015-03-21T09:02:55.000Z | 2022-02-26T20:22:21.000Z | pySDC/tests/test_projects/test_RDC/test_MLRDC_PFASST.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 61 | 2015-03-02T09:35:55.000Z | 2022-03-17T12:42:48.000Z | pySDC/tests/test_projects/test_RDC/test_MLRDC_PFASST.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 19 | 2015-02-20T11:52:33.000Z | 2022-02-02T10:46:27.000Z | from pySDC.projects.RDC.vanderpol_MLSDC_PFASST_test import run_RDC
def test_RDC_flavors():
results = run_RDC(cwd='pySDC/projects/RDC/')
for item in results:
assert item[0] < 9E-06, 'Error too high, got %s' % item[0]
assert item[1] < 6.5, 'Iterations too high, got %s' % item[1] | 37.875 | 69 | 0.669967 |
7979a912986677a7f975b4b56a1040d7025e201e | 4,572 | py | Python | examples/apps/generic_client/generic_client_interface.py | ikegawa-koshi/avalon | 09ccad29f953341078e767053646f41c8c800237 | [
"Apache-2.0"
] | 127 | 2019-10-25T08:43:26.000Z | 2022-03-20T15:33:32.000Z | examples/apps/generic_client/generic_client_interface.py | ikegawa-koshi/avalon | 09ccad29f953341078e767053646f41c8c800237 | [
"Apache-2.0"
] | 275 | 2019-10-24T23:36:21.000Z | 2022-01-24T20:38:07.000Z | examples/apps/generic_client/generic_client_interface.py | ikegawa-koshi/avalon | 09ccad29f953341078e767053646f41c8c800237 | [
"Apache-2.0"
] | 110 | 2019-10-30T07:09:25.000Z | 2022-01-28T09:40:44.000Z | # Copyright 2020 Intel 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 to in wri... | 32.197183 | 74 | 0.633202 |
7979a94ba096eb4bc9896ce670262828d72e8f09 | 3,227 | py | Python | main_sk.py | tinkermachine/Mercury2 | b502871e8114da95efb9c4330fd093c7701f8bcb | [
"Apache-2.0"
] | null | null | null | main_sk.py | tinkermachine/Mercury2 | b502871e8114da95efb9c4330fd093c7701f8bcb | [
"Apache-2.0"
] | null | null | null | main_sk.py | tinkermachine/Mercury2 | b502871e8114da95efb9c4330fd093c7701f8bcb | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import logging
from utils.config import get_config_from_json
from data_loader.data_loader import DataLoader
from models.dense_model import DenseModel
from trainer.trainer import Trainer
from os import listdir
from os.path import isfile, join
from sklearn.svm import SVC
# GLOBAL VARIABLES
m... | 35.855556 | 150 | 0.666873 |
7979a9b33531f9bb4564303ef63a8b0ffad34ed5 | 11,401 | py | Python | ulmo/cuahsi/wof/core.py | cameronbracken/ulmo | 4f38995843a760e0fca4e9f07c21ffeb4552f29c | [
"BSD-3-Clause"
] | null | null | null | ulmo/cuahsi/wof/core.py | cameronbracken/ulmo | 4f38995843a760e0fca4e9f07c21ffeb4552f29c | [
"BSD-3-Clause"
] | null | null | null | ulmo/cuahsi/wof/core.py | cameronbracken/ulmo | 4f38995843a760e0fca4e9f07c21ffeb4552f29c | [
"BSD-3-Clause"
] | null | null | null | """
ulmo.wof.core
~~~~~~~~~~~~~
This module provides direct access to `CUAHSI WaterOneFlow`_ web services.
.. _CUAHSI WaterOneFlow: http://his.cuahsi.org/wofws.html
"""
import cStringIO as StringIO
import suds
import isodate
from ulmo import util
from ulmo import waterml
_suds_client = None
def... | 39.044521 | 98 | 0.668889 |
7979a9e62d8663cd8ccf7977ff0812cd4f5d87a2 | 566 | py | Python | problems/lemonade-change/solution.py | MleMoe/LeetCode-1 | 14f275ba3c8079b820808da17c4952fcf9c8253c | [
"MIT"
] | 2 | 2021-03-25T01:58:55.000Z | 2021-08-06T12:47:13.000Z | problems/lemonade-change/solution.py | MleMoe/LeetCode-1 | 14f275ba3c8079b820808da17c4952fcf9c8253c | [
"MIT"
] | 3 | 2019-08-27T13:25:42.000Z | 2021-08-28T17:49:34.000Z | problems/lemonade-change/solution.py | MleMoe/LeetCode-1 | 14f275ba3c8079b820808da17c4952fcf9c8253c | [
"MIT"
] | 1 | 2021-08-14T08:49:39.000Z | 2021-08-14T08:49:39.000Z | class Solution:
def lemonadeChange(self, bills: [int]) -> bool:
five = ten = 0
for bill in bills:
if bill == 5:
five +=1
elif bill == 10:
if not five: return False
five -= 1
ten += 1
elif bi... | 29.789474 | 52 | 0.333922 |
7979ab2ed6f486c721110cb2f9cad32879a22cd6 | 21,904 | py | Python | python/ccxt/async_support/bitfinex2.py | rkingy/ccxt | ba532b36df8aac8c39f638514fb613d077a23b01 | [
"MIT"
] | null | null | null | python/ccxt/async_support/bitfinex2.py | rkingy/ccxt | ba532b36df8aac8c39f638514fb613d077a23b01 | [
"MIT"
] | null | null | null | python/ccxt/async_support/bitfinex2.py | rkingy/ccxt | ba532b36df8aac8c39f638514fb613d077a23b01 | [
"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.async_support.bitfinex import bitfinex
import hashlib
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.error... | 36.937605 | 126 | 0.436359 |
7979ac145adde42eadb5c717c004612a9ce23dbf | 3,789 | py | Python | simtools/tests/test_layout_array.py | gammasim/gammasim-tools | 0b746254916f4c2e2a3fbd1854c565c3bc90d493 | [
"BSD-3-Clause"
] | 5 | 2020-06-02T09:46:38.000Z | 2022-03-26T16:42:26.000Z | simtools/tests/test_layout_array.py | gammasim/gammasim-tools | 0b746254916f4c2e2a3fbd1854c565c3bc90d493 | [
"BSD-3-Clause"
] | 166 | 2020-04-24T10:22:16.000Z | 2022-03-31T12:51:02.000Z | simtools/tests/test_layout_array.py | gammasim/gammasim-tools | 0b746254916f4c2e2a3fbd1854c565c3bc90d493 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
import logging
import astropy.units as u
import simtools.io_handler as io
from simtools.layout.layout_array import LayoutArray
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
def test_read_tel_list():
layout = LayoutArray(name='testLayout')
telFile = io.getTestDataFile('tele... | 32.110169 | 95 | 0.664027 |
7979ac345e0af97b9b0ddf28605bf1d4c6e1a3e2 | 5,882 | py | Python | devito/ir/support/utils.py | alisiahkoohi/devito | f535a44dff12de2837eb6e3217a65ffb2d371cb8 | [
"MIT"
] | null | null | null | devito/ir/support/utils.py | alisiahkoohi/devito | f535a44dff12de2837eb6e3217a65ffb2d371cb8 | [
"MIT"
] | 40 | 2019-02-26T22:59:16.000Z | 2022-03-21T12:32:30.000Z | devito/ir/support/utils.py | alisiahkoohi/devito | f535a44dff12de2837eb6e3217a65ffb2d371cb8 | [
"MIT"
] | null | null | null | from collections import OrderedDict, defaultdict
from devito.ir.support.space import Interval
from devito.ir.support.stencil import Stencil
from devito.symbolics import FunctionFromPointer, retrieve_indexed, retrieve_terminals
from devito.tools import as_tuple, flatten, filter_sorted
from devito.types import Dimension... | 33.611429 | 86 | 0.569704 |
7979ad8a0ecff323e601b72bdb65a9bcf5adf6e0 | 413 | py | Python | src/index_project_command.py | KamasamaK/sublimetext-cfml | 3730fca4679a5294234dfb3207eb41a4b313b87e | [
"MIT"
] | null | null | null | src/index_project_command.py | KamasamaK/sublimetext-cfml | 3730fca4679a5294234dfb3207eb41a4b313b87e | [
"MIT"
] | null | null | null | src/index_project_command.py | KamasamaK/sublimetext-cfml | 3730fca4679a5294234dfb3207eb41a4b313b87e | [
"MIT"
] | 1 | 2022-02-28T17:09:43.000Z | 2022-02-28T17:09:43.000Z | import sublime_plugin
from .component_index import component_index
from .custom_tags import custom_tags
from . import utils
class CfmlIndexProjectCommand(sublime_plugin.WindowCommand):
def run(self):
project_name = utils.get_project_name_from_window(self.window)
if project_name:
custo... | 29.5 | 70 | 0.772397 |
7979ade550fa656186a05f55a54c601b2e65f09c | 588 | py | Python | stats/forms.py | lordzfc/wyborySam2014 | 89d16381c0f1d669719fe54f6895174b2fe82f64 | [
"MIT"
] | 3 | 2015-11-18T16:59:20.000Z | 2017-03-17T17:13:29.000Z | stats/forms.py | lordzfc/wyborySam2014 | 89d16381c0f1d669719fe54f6895174b2fe82f64 | [
"MIT"
] | null | null | null | stats/forms.py | lordzfc/wyborySam2014 | 89d16381c0f1d669719fe54f6895174b2fe82f64 | [
"MIT"
] | null | null | null | from django import forms
class UploadFileForm(forms.Form):
options = forms.ChoiceField(
choices=[('district', 'Dzielnice'), ('candidate', 'Kandydaci'),
('city_council', 'Rada Miasta'), ('voivodeship', 'sejmik'),
('president_first_turn_districts', 'Warszawa I tura dzielnic... | 39.2 | 83 | 0.586735 |
7979ae902947be2eb0d8b6d3d5c30ed5f7ddd11a | 7,093 | py | Python | rocketchat/api.py | rrzaripov/rocket-python | 2735fc0986fc24ac7151a68ebab9a06ca1ee2b90 | [
"MIT"
] | null | null | null | rocketchat/api.py | rrzaripov/rocket-python | 2735fc0986fc24ac7151a68ebab9a06ca1ee2b90 | [
"MIT"
] | null | null | null | rocketchat/api.py | rrzaripov/rocket-python | 2735fc0986fc24ac7151a68ebab9a06ca1ee2b90 | [
"MIT"
] | null | null | null | from rocketchat.calls.chat.send_message import SendMessage
from rocketchat.calls.channels.get_public_rooms import GetPublicRooms
from rocketchat.calls.groups.get_private_rooms import GetPrivateRooms
from rocketchat.calls.channels.get_room_info import GetRoomInfo
from rocketchat.calls.groups.get_private_room_info import... | 31.246696 | 97 | 0.591146 |
7979b0027b8e986ba2497b333eb56a034cea9baf | 1,324 | py | Python | sphinx/source/docs/user_guide/examples/graph_node_and_edge_attributes.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | 1 | 2021-10-30T00:32:00.000Z | 2021-10-30T00:32:00.000Z | sphinx/source/docs/user_guide/examples/graph_node_and_edge_attributes.py | Deng-Fankang/bokeh | 894731860c53b7c9ddd0057dee85cf064278dc0e | [
"BSD-3-Clause"
] | 12 | 2020-08-26T20:19:29.000Z | 2020-08-26T20:19:52.000Z | sphinx/source/docs/user_guide/examples/graph_node_and_edge_attributes.py | Deng-Fankang/bokeh | 894731860c53b7c9ddd0057dee85cf064278dc0e | [
"BSD-3-Clause"
] | 2 | 2021-01-12T18:22:24.000Z | 2021-10-30T00:32:02.000Z | import networkx as nx
from bokeh.io import output_file, show
from bokeh.models import (BoxZoomTool, Circle, HoverTool,
MultiLine, Plot, Range1d, ResetTool,)
from bokeh.palettes import Spectral4
from bokeh.plotting import from_networkx
# Prepare Data
G = nx.karate_club_graph()
SAME_CLUB_COLO... | 35.783784 | 118 | 0.746224 |
7979b077c226b559cbee57cdcd1e5699c0e5b3ad | 2,507 | py | Python | tests/dataset/test_anndataset.py | nrakover/scVI | 07e0b6708de8844fb0dd2998a1170b42b0b941e0 | [
"MIT"
] | null | null | null | tests/dataset/test_anndataset.py | nrakover/scVI | 07e0b6708de8844fb0dd2998a1170b42b0b941e0 | [
"MIT"
] | null | null | null | tests/dataset/test_anndataset.py | nrakover/scVI | 07e0b6708de8844fb0dd2998a1170b42b0b941e0 | [
"MIT"
] | null | null | null | from unittest import TestCase
import anndata
import numpy as np
from scvi.dataset import (
AnnDatasetFromAnnData,
DownloadableAnnDataset,
CellMeasurement,
GeneExpressionDataset,
)
from .utils import unsupervised_training_one_epoch
import scipy.sparse as sp_sparse
class TestAnnDataset(TestCase):
... | 33.878378 | 87 | 0.653769 |
7979b0a36260b829ce3ba4ce6d8e53bed3a146d1 | 4,269 | py | Python | smtbx/structure_factors/direct/__init__.py | latrocinia/cctbx_project | c6b707864ff39f8471aa214d1fbf2cbbb46dcb06 | [
"BSD-3-Clause-LBNL"
] | null | null | null | smtbx/structure_factors/direct/__init__.py | latrocinia/cctbx_project | c6b707864ff39f8471aa214d1fbf2cbbb46dcb06 | [
"BSD-3-Clause-LBNL"
] | null | null | null | smtbx/structure_factors/direct/__init__.py | latrocinia/cctbx_project | c6b707864ff39f8471aa214d1fbf2cbbb46dcb06 | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
import boost.python
ext = boost.python.import_ext("smtbx_structure_factors_direct_ext")
class constructed_with_xray_structure(object):
def __init__(self, xray_structure, table_file_name=None, reflections=None,
*args, **kwds):
xs = x... | 37.778761 | 88 | 0.63598 |
7979b125f473798cf6d5257c9efbae69d2bd308b | 3,886 | py | Python | examples/osc2es.py | iandees/pyosm | 7d7780b3fd3126b96ca3d34dbcd46c1e9bb7e3df | [
"MIT"
] | 10 | 2015-06-13T17:25:50.000Z | 2022-03-14T15:24:13.000Z | examples/osc2es.py | iandees/pyosm | 7d7780b3fd3126b96ca3d34dbcd46c1e9bb7e3df | [
"MIT"
] | 4 | 2015-06-09T23:34:34.000Z | 2021-05-08T13:13:10.000Z | examples/osc2es.py | iandees/pyosm | 7d7780b3fd3126b96ca3d34dbcd46c1e9bb7e3df | [
"MIT"
] | 2 | 2018-11-15T01:59:37.000Z | 2020-07-07T13:00:00.000Z | import pyosm.model
from pyosm.parsing import iter_osm_stream
import pyes
import sys
es = pyes.ES(['ec2-54-226-182-114.compute-1.amazonaws.com:9200'], timeout=3, max_retries=3)
node_mapping = {
'_timestamp': {
'enabled': True,
'path': 'timestamp'
},
'properties': {
'id': {
... | 25.070968 | 121 | 0.459084 |
7979b1651d2723066cea23b1933f08fc7cc0f5cb | 910 | py | Python | HackerRank/Problem Solving/06. PlusMinus/solution.py | accidentalgenius09/competitive-programming-solution | 210746a7928dcd601ad9a735de52cf7135851070 | [
"MIT"
] | 8 | 2020-08-03T01:53:13.000Z | 2022-01-09T14:47:58.000Z | HackerRank/Problem Solving/06. PlusMinus/solution.py | accidentalgenius09/competitive-programming-solution | 210746a7928dcd601ad9a735de52cf7135851070 | [
"MIT"
] | null | null | null | HackerRank/Problem Solving/06. PlusMinus/solution.py | accidentalgenius09/competitive-programming-solution | 210746a7928dcd601ad9a735de52cf7135851070 | [
"MIT"
] | 4 | 2020-09-29T11:28:53.000Z | 2021-06-02T15:34:55.000Z | '''
Topic : Algorithms
Subtopic : Plus Minus
Language : Python
Problem Statement :
Given an array of integers, calculate the fractions of its elements that are positive, negative, and are zeros. Print the decimal value of each fraction on a new line.
Url : https://www.hackerrank.com/challe... | 23.947368 | 175 | 0.650549 |
7979b1bb4a3c9ef4585f144fae94355075ada826 | 2,536 | py | Python | keeper_cnab240/banks/Itau/file_footer.py | BancoDeFormaturas/python-pg-cnab240 | 1d70d5e4203957673def001b7c48c42f194909b9 | [
"MIT"
] | null | null | null | keeper_cnab240/banks/Itau/file_footer.py | BancoDeFormaturas/python-pg-cnab240 | 1d70d5e4203957673def001b7c48c42f194909b9 | [
"MIT"
] | null | null | null | keeper_cnab240/banks/Itau/file_footer.py | BancoDeFormaturas/python-pg-cnab240 | 1d70d5e4203957673def001b7c48c42f194909b9 | [
"MIT"
] | 1 | 2019-12-05T19:40:55.000Z | 2019-12-05T19:40:55.000Z | from keeper_cnab240.file_section import FileSection
class FileFooter(FileSection):
def __init__(self, data=None):
super().__init__('FileFooter', data, {
'bank_code': {
'type': 'int',
'length': 3,
'default': 341,
'pad_content': 0,
... | 29.835294 | 51 | 0.32571 |
7979b237399d195c26892cf570fac076afb0466f | 3,158 | py | Python | experiments/profiling.py | MinghuaShen/BigData | 8f9cba5eef610b2b3a2729f0c58ba6b40b8eea78 | [
"MIT"
] | null | null | null | experiments/profiling.py | MinghuaShen/BigData | 8f9cba5eef610b2b3a2729f0c58ba6b40b8eea78 | [
"MIT"
] | null | null | null | experiments/profiling.py | MinghuaShen/BigData | 8f9cba5eef610b2b3a2729f0c58ba6b40b8eea78 | [
"MIT"
] | null | null | null | import sys
import os
algs = ["homo1","homo2","heter","mbfs","msssp"]
if len(sys.argv) <= 1:
print("Error: Please enter the folder path!")
data_path = sys.argv[1]
data_name = data_path.split('/')[-1]
output = open(data_name + ".prof","w")
def write_framework(lst,name,abbr,inalgs=algs):
output.write(name + "\t")
tr... | 33.242105 | 103 | 0.626979 |
7979b3a702af376defd49dcbf25ddfe064699b77 | 1,156 | py | Python | Latest/venv/Lib/site-packages/envisage/ui/action/i_action_manager_builder.py | adamcvj/SatelliteTracker | 49a8f26804422fdad6f330a5548e9f283d84a55d | [
"Apache-2.0"
] | 1 | 2022-01-09T20:04:31.000Z | 2022-01-09T20:04:31.000Z | Latest/venv/Lib/site-packages/envisage/ui/action/i_action_manager_builder.py | adamcvj/SatelliteTracker | 49a8f26804422fdad6f330a5548e9f283d84a55d | [
"Apache-2.0"
] | 1 | 2022-02-15T12:01:57.000Z | 2022-03-24T19:48:47.000Z | Latest/venv/Lib/site-packages/envisage/ui/action/i_action_manager_builder.py | adamcvj/SatelliteTracker | 49a8f26804422fdad6f330a5548e9f283d84a55d | [
"Apache-2.0"
] | null | null | null | # (C) Copyright 2007-2019 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only
# under the conditions described in the aforementioned license. The license
# is also available online a... | 31.243243 | 79 | 0.689446 |
7979b41939efb910a7f3a5fcacd6b92f4679dd2e | 2,044 | py | Python | desktop/core/src/desktop/management/commands/convert_documents.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/core/src/desktop/management/commands/convert_documents.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | desktop/core/src/desktop/management/commands/convert_documents.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 38.566038 | 162 | 0.725538 |
7979b51aabdc7ca5a0a47ba36817783c9ee764a0 | 5,503 | py | Python | build/numpy/numpy/doc/creation.py | crougeux/-a-i_v1.6.3_modif | b499a812e79f335d082d3f9b1070e0465ad67bab | [
"BSD-3-Clause"
] | 39 | 2016-11-08T11:24:30.000Z | 2021-11-18T06:50:21.000Z | build/numpy/numpy/doc/creation.py | crougeux/-a-i_v1.6.3_modif | b499a812e79f335d082d3f9b1070e0465ad67bab | [
"BSD-3-Clause"
] | 8 | 2021-03-19T04:45:42.000Z | 2021-09-22T19:11:49.000Z | virtual/lib/python3.6/site-packages/numpy/doc/creation.py | tw8130/Awwards | d1296cdc26356443d6ec5869495eedb766ecbcf2 | [
"Unlicense"
] | 13 | 2017-04-08T08:03:12.000Z | 2021-08-25T08:38:52.000Z | """
==============
Array Creation
==============
Introduction
============
There are 5 general mechanisms for creating arrays:
1) Conversion from other Python structures (e.g., lists, tuples)
2) Intrinsic numpy array array creation objects (e.g., arange, ones, zeros,
etc.)
3) Reading arrays from disk, either from... | 37.951724 | 80 | 0.708159 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.