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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b6dfcc1aa89979f25274c267c92368e302bbc2a8 | 2,741 | py | Python | modules/rc3b.py | HondaLab/KeyboardRC | 6740117abf0f3afd4dd5bb1a2d3a1c6c69b29ad6 | [
"MIT"
] | null | null | null | modules/rc3b.py | HondaLab/KeyboardRC | 6740117abf0f3afd4dd5bb1a2d3a1c6c69b29ad6 | [
"MIT"
] | 1 | 2022-03-19T03:35:25.000Z | 2022-03-19T03:35:25.000Z | modules/rc3b.py | HondaLab/KeyboardRC | 6740117abf0f3afd4dd5bb1a2d3a1c6c69b29ad6 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# rc3b.py
# Yasushi Honda 2021 9/3
# How to execute
# sudo pigpiod
# pyhton3 rcXY.py
import modules.keyin as keyin # キーボード入力を監視するモジュール
import modules.motor as mt # pwmでモーターを回転させるためのモジュール
import time
STEP=8
HANDLE_STEP=8
HANDLE_TIME=0.3
TRIM_STEP=8
TRIM_TIME=0.2
ANGL_GAIN=1.2
class KeyAssign():
... | 22.841667 | 72 | 0.573148 |
ad60934d6a1f55fd685585f3cf1018233ab25e49 | 1,817 | py | Python | deepthought3/.experiments/ismir2014/train_convnet.py | chanhakim/deepthought | 9f5dd5c7a21da51b65d6049e7a19e29fc3a072f9 | [
"BSD-3-Clause"
] | null | null | null | deepthought3/.experiments/ismir2014/train_convnet.py | chanhakim/deepthought | 9f5dd5c7a21da51b65d6049e7a19e29fc3a072f9 | [
"BSD-3-Clause"
] | 4 | 2021-06-04T20:36:46.000Z | 2021-06-08T22:32:39.000Z | deepthought3/.experiments/ismir2014/train_convnet.py | chanhakim/deepthought3 | 9f5dd5c7a21da51b65d6049e7a19e29fc3a072f9 | [
"BSD-3-Clause"
] | null | null | null | """
Created on Apr 10, 2014
@author: sstober
"""
import logging
import os
log = logging.getLogger(__name__)
import numpy as np
from pylearn2.utils.timing import log_timing
from deepthought3.experiments.ismir2014.util import load_config
from deepthought3.util.yaml_util import load_yaml_file, save_yaml_file
from de... | 28.84127 | 87 | 0.664832 |
fbbb541299434d447195f7f3e03119b1771e56e2 | 219 | py | Python | test/end-to-end/Graphs/Python/main.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 30 | 2019-10-29T12:47:50.000Z | 2022-02-12T06:41:39.000Z | test/end-to-end/Graphs/Python/main.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 247 | 2017-09-21T17:11:18.000Z | 2019-10-08T12:59:07.000Z | test/end-to-end/Graphs/Python/main.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 17 | 2017-10-01T16:53:20.000Z | 2018-11-28T07:20:35.000Z | from data.unweighted_node import UnweightedNode
from data.weighted_node import WeightedNode
from testing.tests import test_unweighted, test_weighted
if __name__ == "__main__":
test_unweighted()
test_weighted()
| 27.375 | 56 | 0.812785 |
3f45344c0f148e99b5fc9f47ba81e9a36868c335 | 178 | py | Python | software/glasgow/__init__.py | gregdavill/Glasgow | 85f9279e48383453eb116b641473940b8d018307 | [
"Apache-2.0",
"0BSD"
] | 6 | 2020-01-09T10:05:00.000Z | 2021-03-10T07:07:15.000Z | software/glasgow/__init__.py | q3k/Glasgow | 9fa367d486b458ead9225a7a1b1a50cb57f40564 | [
"Apache-2.0",
"0BSD"
] | null | null | null | software/glasgow/__init__.py | q3k/Glasgow | 9fa367d486b458ead9225a7a1b1a50cb57f40564 | [
"Apache-2.0",
"0BSD"
] | 1 | 2020-12-28T11:42:24.000Z | 2020-12-28T11:42:24.000Z | import logging
logging.addLevelName(5, "TRACE")
logging.TRACE = 5
logging.Logger.trace = lambda self, msg, *args, **kwargs: \
self.log(logging.TRACE, msg, *args, **kwargs)
| 22.25 | 59 | 0.696629 |
920920a8ddef03bd1cde967e8525b94387f997fb | 2,391 | py | Python | configs/cosod_path.py | lartpang/CoSaliencyProj | fe2acf887c74977010aed8e2d519a503a7e75ae3 | [
"MIT"
] | 1 | 2020-12-26T04:03:13.000Z | 2020-12-26T04:03:13.000Z | configs/cosod_path.py | lartpang/CoSaliencyProj | fe2acf887c74977010aed8e2d519a503a7e75ae3 | [
"MIT"
] | null | null | null | configs/cosod_path.py | lartpang/CoSaliencyProj | fe2acf887c74977010aed8e2d519a503a7e75ae3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2020/12/3
# @Author : Lart Pang
# @GitHub : https://github.com/lartpang
import os
_CoSOD_ROOT = "/home/lart/Datasets/Saliency/CoSOD"
COCO9213 = dict(
root=os.path.join(_CoSOD_ROOT, "COCO9213-os"),
image=dict(path=os.path.join(_CoSOD_ROOT, "COCO9213-os", "img"), suffix="... | 44.277778 | 98 | 0.664157 |
f3b5010e3f753ebc37456b47850fe3c176915633 | 1,563 | py | Python | setup.py | gyusang/jajucha | 91ebcf8816f8591da955676a4aee578b5f1c4ad9 | [
"MIT-0",
"BSD-3-Clause"
] | 3 | 2020-12-25T08:08:39.000Z | 2022-01-04T14:15:39.000Z | setup.py | gyusang/jajucha | 91ebcf8816f8591da955676a4aee578b5f1c4ad9 | [
"MIT-0",
"BSD-3-Clause"
] | null | null | null | setup.py | gyusang/jajucha | 91ebcf8816f8591da955676a4aee578b5f1c4ad9 | [
"MIT-0",
"BSD-3-Clause"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
setuptools.setup(
name='jajucha',
packages=setuptools.find_packages(),
version='2.2.3',
license='MIT',
description='Controller Library for jajucha, a model car for autonomous driving education.',
... | 33.255319 | 96 | 0.618682 |
8ca7f61056ad111b039f7f71bedc374f47befc5b | 36,753 | py | Python | label_studio/project.py | abduhbm/label-studio | 9a5110d411073e951b84099fa29a5abfc7c0f41d | [
"Apache-2.0"
] | 5 | 2021-04-09T07:54:38.000Z | 2021-09-28T11:42:22.000Z | label_studio/project.py | abduhbm/label-studio | 9a5110d411073e951b84099fa29a5abfc7c0f41d | [
"Apache-2.0"
] | 10 | 2021-01-12T05:56:29.000Z | 2021-05-11T21:37:59.000Z | label_studio/project.py | abduhbm/label-studio | 9a5110d411073e951b84099fa29a5abfc7c0f41d | [
"Apache-2.0"
] | 3 | 2020-09-28T21:34:47.000Z | 2021-01-29T02:04:19.000Z | import os
import io
import logging
import json
import random
from shutil import copy2
from collections import defaultdict, OrderedDict
from operator import itemgetter
from xml.etree import ElementTree
from uuid import uuid4
from copy import deepcopy
from label_studio_converter import Converter
from label_studio.util... | 41.018973 | 135 | 0.625745 |
410733d317c1d9bee69738962a5e62ba4bb3589e | 1,857 | py | Python | project/account/views.py | fael07/Company-Management | e91bbf7bc251edced127c8e5f6acf7bbdf38a580 | [
"MIT"
] | null | null | null | project/account/views.py | fael07/Company-Management | e91bbf7bc251edced127c8e5f6acf7bbdf38a580 | [
"MIT"
] | null | null | null | project/account/views.py | fael07/Company-Management | e91bbf7bc251edced127c8e5f6acf7bbdf38a580 | [
"MIT"
] | null | null | null | # Usuário
from django.contrib.auth.models import User
from django.contrib import messages, auth
from .support import *
# Renderizar
from django.shortcuts import render, redirect
def login(request):
user = auth.get_user(request)
if user.is_authenticated:
return redirect('minha_conta')
elif requ... | 32.578947 | 128 | 0.679052 |
73e04b571db19bbc8434f66e0b0deae5db4b83ba | 5,878 | py | Python | Machine Learning/Preparing Data for Machine Learning Models/extracting_features_from_images_ml.py | data-intelligence-analysis/data_science | 66b5d130129a6b001684f86c58cd91e3f9382140 | [
"Apache-2.0"
] | 2 | 2020-09-23T04:08:25.000Z | 2021-03-17T03:07:59.000Z | Machine Learning/Preparing Data for Machine Learning Models/extracting_features_from_images_ml.py | data-intelligence-analysis/data_science | 66b5d130129a6b001684f86c58cd91e3f9382140 | [
"Apache-2.0"
] | null | null | null | Machine Learning/Preparing Data for Machine Learning Models/extracting_features_from_images_ml.py | data-intelligence-analysis/data_science | 66b5d130129a6b001684f86c58cd91e3f9382140 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
import matplotlib.pyplot as plt
###Final Data Preprocessing
'''Preparing an unorganized data set to feed the machine learning models in an unbiased way so that the model can give good results, for example we don't want the machine learning model to know that
1st 50 records always go to ... | 48.983333 | 199 | 0.703471 |
2fdcc7b24635b91afa8835eb3af0edaaafc1d14d | 5,644 | py | Python | launch/launch/launch_introspector.py | oswinso/launch | abaa861f68f60b77585284c6ebf9fcd5bea419db | [
"Apache-2.0"
] | null | null | null | launch/launch/launch_introspector.py | oswinso/launch | abaa861f68f60b77585284c6ebf9fcd5bea419db | [
"Apache-2.0"
] | null | null | null | launch/launch/launch_introspector.py | oswinso/launch | abaa861f68f60b77585284c6ebf9fcd5bea419db | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 42.43609 | 96 | 0.681963 |
5f8fefb2ac25a44581571469eb00654e1fa5157d | 380 | py | Python | questions/migrations/0005_auto_20150211_1929.py | Kuzenkov/SimpleAnalogueStackOverflow | ae102279ae72170cc84c7c7b08e5c3bf1b7ea61a | [
"MIT"
] | null | null | null | questions/migrations/0005_auto_20150211_1929.py | Kuzenkov/SimpleAnalogueStackOverflow | ae102279ae72170cc84c7c7b08e5c3bf1b7ea61a | [
"MIT"
] | null | null | null | questions/migrations/0005_auto_20150211_1929.py | Kuzenkov/SimpleAnalogueStackOverflow | ae102279ae72170cc84c7c7b08e5c3bf1b7ea61a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('questions', '0004_auto_20150211_0703'),
]
operations = [
migrations.AlterModelOptions(
name='question',
... | 20 | 50 | 0.607895 |
cc20280ebfd2c31c1818b235c24c370df088a4d0 | 751 | py | Python | tests/timing_merge/nboids/nboids_times4.py | vic-c137/mpi-boids-simulation | a822f20f5c1cd7cd2a6261a53adeb24e2c0115ec | [
"Apache-2.0"
] | null | null | null | tests/timing_merge/nboids/nboids_times4.py | vic-c137/mpi-boids-simulation | a822f20f5c1cd7cd2a6261a53adeb24e2c0115ec | [
"Apache-2.0"
] | null | null | null | tests/timing_merge/nboids/nboids_times4.py | vic-c137/mpi-boids-simulation | a822f20f5c1cd7cd2a6261a53adeb24e2c0115ec | [
"Apache-2.0"
] | null | null | null | # Import statements
import subprocess
from os import system
# Variable declarations
np = "10"
cexe = "./Times"
nboids = "50"
nloops = "1000"
k = "7"
maxv = "10"
acc = "1.25"
width = "1000"
height = "1000"
sf1 = "1"
sf2 = "32"
min = "50"
sf3 = "8"
sf4 = "10"
dataPath = "./data/"
timeData = "time_data_... | 28.884615 | 220 | 0.561917 |
d38e6a79db63434cbf9e868cf910c6c9f1f8acf6 | 95 | py | Python | Backjoon/11720.py | hanjungwoo1/CodingTest | 0112488d04dd53cea1c869439341fb602e699f2a | [
"MIT"
] | 3 | 2022-03-29T04:56:50.000Z | 2022-03-30T08:06:42.000Z | Backjoon/11720.py | hanjungwoo1/CodingTest | 0112488d04dd53cea1c869439341fb602e699f2a | [
"MIT"
] | null | null | null | Backjoon/11720.py | hanjungwoo1/CodingTest | 0112488d04dd53cea1c869439341fb602e699f2a | [
"MIT"
] | null | null | null | N = int(input())
data = input()
sum = 0
for i in range(N):
sum += int(data[i])
print(sum) | 11.875 | 23 | 0.557895 |
2b8ec4095a54c3f9ceedb4f2b460c0f080a6703d | 2,480 | py | Python | alerta/models/customer.py | proffust/alerta | 2b53be0cdf8b91ea24560a295ef2e07df556883b | [
"Apache-2.0"
] | null | null | null | alerta/models/customer.py | proffust/alerta | 2b53be0cdf8b91ea24560a295ef2e07df556883b | [
"Apache-2.0"
] | 60 | 2020-07-27T07:00:45.000Z | 2022-03-21T18:02:18.000Z | alerta/models/customer.py | proffust/alerta | 2b53be0cdf8b91ea24560a295ef2e07df556883b | [
"Apache-2.0"
] | 1 | 2020-11-24T03:16:49.000Z | 2020-11-24T03:16:49.000Z | from typing import Any, Dict, List, Optional, Tuple, Union
from uuid import uuid4
from alerta.app import db
from alerta.database.base import Query
from alerta.utils.response import absolute_url
JSON = Dict[str, Any]
class Customer:
def __init__(self, match: str, customer: str, **kwargs) -> None:
self.... | 29.52381 | 83 | 0.592339 |
03f82b285d2c473f19a2d0ab45a6404aa6582e98 | 3,313 | py | Python | tests/200_cli/003_startproject.py | Sam-prog-sudo/boussole | 5d6ec94356f9a91ff4d6d23c1700d3512b67006a | [
"MIT"
] | null | null | null | tests/200_cli/003_startproject.py | Sam-prog-sudo/boussole | 5d6ec94356f9a91ff4d6d23c1700d3512b67006a | [
"MIT"
] | null | null | null | tests/200_cli/003_startproject.py | Sam-prog-sudo/boussole | 5d6ec94356f9a91ff4d6d23c1700d3512b67006a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import os
from click.testing import CliRunner
from boussole.cli.console_script import cli_frontend
from boussole.conf.json_backend import SettingsBackendJson
from boussole.conf.yaml_backend import SettingsBackendYaml
# Backend default filename shortcuts
YAML_FILENAME = SettingsBa... | 28.316239 | 79 | 0.545427 |
f9ec16edbd9899e0837124aeada22dff80b80e60 | 1,150 | py | Python | Language Skills/Python/Unit 07 Lists and Functions/02 Battleship/You Sunk my Battleship/17-A Real Win.py | rhyep/Python_tutorials | f5c8a64b91802b005dfe7dd9035f8d8daae8c3e3 | [
"MIT"
] | 346 | 2016-02-22T20:21:10.000Z | 2022-01-27T20:55:53.000Z | Language Skills/Python/Unit 07 Lists and Functions/02 Battleship/You Sunk my Battleship/17-A Real Win.py | Dithn/Codecademy-Exercise-Answers | 696017af889c3d0bb60965fa32bdafd80740baa3 | [
"MIT"
] | 55 | 2016-04-07T13:58:44.000Z | 2020-06-25T12:20:24.000Z | Language Skills/Python/Unit 07 Lists and Functions/02 Battleship/You Sunk my Battleship/17-A Real Win.py | Dithn/Codecademy-Exercise-Answers | 696017af889c3d0bb60965fa32bdafd80740baa3 | [
"MIT"
] | 477 | 2016-02-21T06:17:02.000Z | 2021-12-22T10:08:01.000Z | from random import randint
board = []
for x in range(5):
board.append(["O"] * 5)
def print_board(board):
for row in board:
print " ".join(row)
print "Let's play Battleship!"
print_board(board)
def random_row(board):
return randint(0, len(board) - 1)
def random_col(board):
return randint(0,... | 23.469388 | 80 | 0.613913 |
9e06cdecf988351cf4079ae52adfe81817acccc7 | 2,684 | py | Python | bundle/YouCompleteMe/third_party/ycmd/third_party/waitress/waitress/compat.py | xiaoyin199/myvim | 910dac2ae265eb4896468d4dd447df4b188ddaf1 | [
"Vim"
] | null | null | null | bundle/YouCompleteMe/third_party/ycmd/third_party/waitress/waitress/compat.py | xiaoyin199/myvim | 910dac2ae265eb4896468d4dd447df4b188ddaf1 | [
"Vim"
] | null | null | null | bundle/YouCompleteMe/third_party/ycmd/third_party/waitress/waitress/compat.py | xiaoyin199/myvim | 910dac2ae265eb4896468d4dd447df4b188ddaf1 | [
"Vim"
] | null | null | null | import sys
import types
try:
import urlparse
except ImportError: # pragma: no cover
from urllib import parse as urlparse
# True if we are running on Python 3.
PY3 = sys.version_info[0] == 3
if PY3: # pragma: no cover
string_types = str,
integer_types = int,
class_types = type,
text_type = str... | 23.964286 | 61 | 0.620343 |
bc15a58eaa41dcae09c1bbf48263c7850b0df7f2 | 2,815 | py | Python | magenta/models/polyphony_rnn/polyphony_encoder_decoder.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | null | null | null | magenta/models/polyphony_rnn/polyphony_encoder_decoder.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | null | null | null | magenta/models/polyphony_rnn/polyphony_encoder_decoder.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | 1 | 2021-09-09T15:30:36.000Z | 2021-09-09T15:30:36.000Z | # Copyright 2020 The Magenta 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 in ... | 35.1875 | 82 | 0.710124 |
15c48fb7a657d0bdfaa4172d3ebe636f2ddf6920 | 8,397 | py | Python | plugins/exchange_rate/qt.py | stratisproject/electrum | c60fa543418c31ce7f5dcf5aa717d82a5c47e216 | [
"MIT"
] | 26 | 2017-06-09T04:13:13.000Z | 2021-11-15T11:35:30.000Z | plugins/exchange_rate/qt.py | stratisproject/electrum | c60fa543418c31ce7f5dcf5aa717d82a5c47e216 | [
"MIT"
] | 29 | 2017-05-07T05:08:06.000Z | 2021-02-19T13:15:03.000Z | plugins/exchange_rate/qt.py | stratisproject/electrum | c60fa543418c31ce7f5dcf5aa717d82a5c47e216 | [
"MIT"
] | 21 | 2017-05-31T14:24:20.000Z | 2021-01-30T17:35:43.000Z | import time
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from electrum_stratis_gui.qt.util import *
from electrum_stratis_gui.qt.amountedit import AmountEdit
from electrum_stratis.stratis import COIN
from electrum_stratis.i18n import _
from decimal import Decimal
from functools import partial
from electrum_st... | 36.828947 | 105 | 0.623437 |
c1b97e6d59454536a5cc112d373a54746337d1be | 520 | py | Python | data/scripts/templates/object/tangible/component/weapon/shared_vibro_unit_enhancement_durability.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/component/weapon/shared_vibro_unit_enhancement_durability.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/component/weapon/shared_vibro_unit_enhancement_durability.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/component/weapon/shared_vibro_unit_enhancement_durability.iff"
resu... | 30.588235 | 98 | 0.763462 |
95bcedecbb4954c0b6b17654bc9ef2d1bf65b50b | 4,523 | py | Python | tests/contrib/sensors/test_emr_job_flow_sensor.py | dyna-dot/airflow | 02ef974e4b7c2a91b3074ddd8abcf4cd31d09e6f | [
"Apache-2.0"
] | 2 | 2020-09-30T01:06:15.000Z | 2021-08-07T09:16:21.000Z | tests/contrib/sensors/test_emr_job_flow_sensor.py | dyna-dot/airflow | 02ef974e4b7c2a91b3074ddd8abcf4cd31d09e6f | [
"Apache-2.0"
] | 1 | 2020-11-23T08:40:10.000Z | 2020-11-23T08:40:10.000Z | tests/contrib/sensors/test_emr_job_flow_sensor.py | dyna-dot/airflow | 02ef974e4b7c2a91b3074ddd8abcf4cd31d09e6f | [
"Apache-2.0"
] | 2 | 2019-07-04T02:46:30.000Z | 2019-07-15T00:56:09.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 34.265152 | 103 | 0.621932 |
0c76e28aeebab0b61d2f322aa68cd32b5c338a05 | 1,805 | py | Python | src/main.py | gimoAI/Colorization-PR-V1 | 7c28bd71f25a445678c61c65d4dc480b50df5d13 | [
"Apache-2.0"
] | null | null | null | src/main.py | gimoAI/Colorization-PR-V1 | 7c28bd71f25a445678c61c65d4dc480b50df5d13 | [
"Apache-2.0"
] | null | null | null | src/main.py | gimoAI/Colorization-PR-V1 | 7c28bd71f25a445678c61c65d4dc480b50df5d13 | [
"Apache-2.0"
] | null | null | null | import os
import random
import numpy as np
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
from .options import ModelOptions
from .models import Cifar10Model, Places365Model
from .dataset import CIFAR10_DATASET, PLACES365_DATASET
def main(options):
# reset tensorflow graph
tf.reset_default_graph()... | 26.544118 | 87 | 0.578393 |
8504d14b93c8f582922f3681d65e568705298a91 | 78 | py | Python | cmdlogger/__init__.py | Kami-DiscordBot/JojoCogs | 15e737831995eda83d5599e3edf87b85ba9395bf | [
"MIT"
] | null | null | null | cmdlogger/__init__.py | Kami-DiscordBot/JojoCogs | 15e737831995eda83d5599e3edf87b85ba9395bf | [
"MIT"
] | 3 | 2021-07-28T12:20:18.000Z | 2021-08-14T03:03:54.000Z | cmdlogger/__init__.py | Kami-DiscordBot/JojoCogs | 15e737831995eda83d5599e3edf87b85ba9395bf | [
"MIT"
] | null | null | null | from .core import CmdLogger
def setup(bot):
bot.add_cog(CmdLogger(bot))
| 13 | 31 | 0.717949 |
cd7fe56f681e05841aaa557540e4ade95ef5c062 | 13,287 | py | Python | tests/job/test_jobStatus.py | pyiron/pyiron_base | 3f62c6c59b90b774a04a61dd6d8a461fc6ef5bd1 | [
"BSD-3-Clause"
] | 7 | 2020-09-12T11:01:09.000Z | 2022-03-01T20:59:46.000Z | tests/job/test_jobStatus.py | pyiron/pyiron_base | 3f62c6c59b90b774a04a61dd6d8a461fc6ef5bd1 | [
"BSD-3-Clause"
] | 417 | 2018-07-03T12:44:00.000Z | 2022-03-31T14:25:31.000Z | tests/job/test_jobStatus.py | pyiron/pyiron_base | 3f62c6c59b90b774a04a61dd6d8a461fc6ef5bd1 | [
"BSD-3-Clause"
] | 8 | 2018-04-03T05:21:07.000Z | 2021-12-27T09:55:19.000Z | # coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
import os
from datetime import datetime
from pyiron_base.project.generic import Project
from pyiron_base.database.generi... | 43.563934 | 108 | 0.693535 |
12077cd1c1d9fae98dc3988c79bd4fbf53cc43a8 | 2,925 | py | Python | dags/oss_know/oss_know_dags/dags_github/dag_github_init_issues_comments.py | HexaemeronFsk/airflow-jobs | 674f4c15f6889653bf5578117b085ef794c7b3f4 | [
"Apache-2.0"
] | null | null | null | dags/oss_know/oss_know_dags/dags_github/dag_github_init_issues_comments.py | HexaemeronFsk/airflow-jobs | 674f4c15f6889653bf5578117b085ef794c7b3f4 | [
"Apache-2.0"
] | null | null | null | dags/oss_know/oss_know_dags/dags_github/dag_github_init_issues_comments.py | HexaemeronFsk/airflow-jobs | 674f4c15f6889653bf5578117b085ef794c7b3f4 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from airflow import DAG
from airflow.operators.python import PythonOperator
from oss_know.libs.base_dict.variable_key import OPENSEARCH_CONN_DATA, GITHUB_TOKENS
from oss_know.libs.util.proxy import KuaiProxyService, ProxyManager, GithubTokenProxyAccommodator
from oss_know.libs.util.token... | 39.527027 | 111 | 0.728547 |
69ced9578b76ac63101f8922a9419e30ffc3d2f7 | 8,561 | py | Python | telethon/client/account.py | kingjan123/Telethon | c21b2d3ed7123834e1f0e08f1dc0361136dece56 | [
"MIT"
] | null | null | null | telethon/client/account.py | kingjan123/Telethon | c21b2d3ed7123834e1f0e08f1dc0361136dece56 | [
"MIT"
] | null | null | null | telethon/client/account.py | kingjan123/Telethon | c21b2d3ed7123834e1f0e08f1dc0361136dece56 | [
"MIT"
] | null | null | null | import functools
import inspect
from .users import UserMethods, _NOT_A_REQUEST
from .. import helpers, utils
from ..tl import functions, TLRequest
# TODO Make use of :tl:`InvokeWithMessagesRange` somehow
# For that, we need to use :tl:`GetSplitRanges` first.
class _TakeoutClient:
"""
Proxy object over t... | 41.158654 | 79 | 0.633104 |
d6b340379bf394f4757c6054d049251a527e5c43 | 491 | py | Python | polymatrix/game.py | python-polymatrix-games/polymatrix | cd7966ff0f028bb9bcd80f5c5340918b1748735e | [
"MIT"
] | 2 | 2020-10-31T00:27:42.000Z | 2020-11-20T15:52:30.000Z | polymatrix/game.py | python-polymatrix-games/polymatrix-games | cd7966ff0f028bb9bcd80f5c5340918b1748735e | [
"MIT"
] | null | null | null | polymatrix/game.py | python-polymatrix-games/polymatrix-games | cd7966ff0f028bb9bcd80f5c5340918b1748735e | [
"MIT"
] | 1 | 2021-03-05T15:50:01.000Z | 2021-03-05T15:50:01.000Z | import plac
from polymatrixgame import QuickPolymatrixGame
@plac.annotations(number_of_players=("Amount of players", "option", "n", int),
log_level=("Preferred level of logging", "option", "log", str),
timesteps=("Amount of rounds to be played", "option", "t", int))
def main(num... | 37.769231 | 84 | 0.676171 |
8bd69deabc2579811e212810d92eded249d99458 | 566 | py | Python | src/products/urls.py | ilyshev/try-django | 158cc6ba9f50890ffeb2fb488cfb8ba20719745f | [
"MIT"
] | null | null | null | src/products/urls.py | ilyshev/try-django | 158cc6ba9f50890ffeb2fb488cfb8ba20719745f | [
"MIT"
] | null | null | null | src/products/urls.py | ilyshev/try-django | 158cc6ba9f50890ffeb2fb488cfb8ba20719745f | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path
from products.views import (
product_detail_view,
product_create_view,
render_initial_data,
dynamic_lookup_view,
product_list_view,
product_delete_view
)
app_name = 'products'
urlpatterns = [
path('create/', product_create_view, name='product-cre... | 29.789474 | 73 | 0.745583 |
db400174954b81085fc7e1ee13e9597ed2064a6d | 11,571 | py | Python | src/pytorch-template/old/baseline/Network_num_1.py | kaderghal/ADNI_Data_processing | 454462d3913d77e3bc4de2b9725b456301c7b351 | [
"MIT"
] | 5 | 2021-01-07T10:11:57.000Z | 2022-01-16T04:57:51.000Z | src/pytorch-template/old/baseline/Network_num_1.py | kaderghal/ADNI_Data_processing | 454462d3913d77e3bc4de2b9725b456301c7b351 | [
"MIT"
] | null | null | null | src/pytorch-template/old/baseline/Network_num_1.py | kaderghal/ADNI_Data_processing | 454462d3913d77e3bc4de2b9725b456301c7b351 | [
"MIT"
] | 1 | 2021-08-05T07:34:16.000Z | 2021-08-05T07:34:16.000Z |
import torch.nn as nn
from torch import optim
from torch.utils.data import Dataset, DataLoader
from torch.utils.data.dataset import Dataset
from torch.utils.data.sampler import BatchSampler
from torchsummary import summary
from torchvision import transforms
from torchvision.datasets import DatasetFolder
import errno
i... | 33.932551 | 127 | 0.548872 |
e3dce2d09de97bc075bd488acd87eb7b5bc98723 | 1,414 | py | Python | snakemake/configs/mm10_Oct_10_2016_Oct_10_2016_HuR_Human_Mouse_Liver_RNA-Seq-Mouse.py | saketkc/re-ribo-smk | c9326cbafdfa060e22e9af692d9146c37f5035ba | [
"BSD-2-Clause"
] | 1 | 2019-09-11T17:09:48.000Z | 2019-09-11T17:09:48.000Z | snakemake/configs/mm10_Oct_10_2016_Oct_10_2016_HuR_Human_Mouse_Liver_RNA-Seq-Mouse.py | saketkc/re-ribo-smk | c9326cbafdfa060e22e9af692d9146c37f5035ba | [
"BSD-2-Clause"
] | null | null | null | snakemake/configs/mm10_Oct_10_2016_Oct_10_2016_HuR_Human_Mouse_Liver_RNA-Seq-Mouse.py | saketkc/re-ribo-smk | c9326cbafdfa060e22e9af692d9146c37f5035ba | [
"BSD-2-Clause"
] | null | null | null |
RAWDATA_DIR = '/home/cmb-06/as/skchoudh/dna/Oct_10_2016_HuR_Human_Mouse_Liver/rna-seq/Penalva_L_08182016/mouse'
OUT_DIR = '/staging/as/skchoudh/rna/Oct_10_2016_HuR_Human_Mouse_Liver_ribocop_run_Jan2019/RNA-Seq-Mouse'
GENOME_FASTA = '/home/cmb-06/as/skchoudh/genomes/mm10/fasta/mm10.fa'
CHROM_SIZES = '/home/cmb-06/as/sk... | 78.555556 | 121 | 0.806223 |
96dc6a26350a0c78357936b9a9536c1ff6811c68 | 6,677 | py | Python | src/mcmc_alpha.py | QEC-project-2020/EWD-QEC | 1bc80ba406a70a802898b43c661378b689f10622 | [
"MIT"
] | null | null | null | src/mcmc_alpha.py | QEC-project-2020/EWD-QEC | 1bc80ba406a70a802898b43c661378b689f10622 | [
"MIT"
] | null | null | null | src/mcmc_alpha.py | QEC-project-2020/EWD-QEC | 1bc80ba406a70a802898b43c661378b689f10622 | [
"MIT"
] | 2 | 2021-12-13T15:12:10.000Z | 2021-12-20T19:20:38.000Z | import numpy as np
import random as rand
import copy
from numba import njit
from src.xzzx_model import xzzx_code, _apply_random_stabilizer as apply_stabilizer_fast_xzzx
from src.rotated_surface_model import RotSurCode, _apply_random_stabilizer as apply_stabilizer_fast_rotated
from src.planar_model import Planar_code,... | 38.819767 | 132 | 0.6449 |
ae6ce073b348563767a598dbadb4ac79dab3164c | 2,035 | py | Python | plugins/cuckoo/komand_cuckoo/actions/submit_files/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/cuckoo/komand_cuckoo/actions/submit_files/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/cuckoo/komand_cuckoo/actions/submit_files/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Component:
DESCRIPTION = "Adds one or more files and/or files embedded in archives to the list of pending tasks"
class Input:
FILES = "files"
class Output:
ERRORS = "errors"
SUBMIT_ID = "submit_id"
TASK_ID = "task_id"
... | 19.757282 | 124 | 0.503686 |
911f6d144f9ce1d4cdcc80b48a4e3bb483a05d38 | 67,589 | py | Python | tests/integration/test_storage_rabbitmq/test.py | edani/ClickHouse | 17a8a4e9664fabed5b370b37e148139ba698acf5 | [
"Apache-2.0"
] | 3 | 2021-02-16T13:50:34.000Z | 2021-03-19T12:22:52.000Z | tests/integration/test_storage_rabbitmq/test.py | edani/ClickHouse | 17a8a4e9664fabed5b370b37e148139ba698acf5 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_storage_rabbitmq/test.py | edani/ClickHouse | 17a8a4e9664fabed5b370b37e148139ba698acf5 | [
"Apache-2.0"
] | 1 | 2021-07-30T19:50:45.000Z | 2021-07-30T19:50:45.000Z | import json
import os.path as p
import random
import subprocess
import threading
import time
from random import randrange
import pika
import pytest
from google.protobuf.internal.encoder import _VarintBytes
from helpers.client import QueryRuntimeException
from helpers.cluster import ClickHouseCluster
from helpers.test_... | 35.220948 | 136 | 0.611875 |
e108d0ccbd5bda558348bee9344caccaeaa8336b | 1,020 | py | Python | firebolt/config.py | juddcraft12/Firebolt | 05625677a5f0b604a799f99e5f6e79348b1c6749 | [
"MIT"
] | null | null | null | firebolt/config.py | juddcraft12/Firebolt | 05625677a5f0b604a799f99e5f6e79348b1c6749 | [
"MIT"
] | 12 | 2021-09-10T04:34:52.000Z | 2022-03-25T04:28:56.000Z | firebolt/config.py | juddcraft12/Firebolt | 05625677a5f0b604a799f99e5f6e79348b1c6749 | [
"MIT"
] | null | null | null | import os
import firebolt
def bot_owner():
return os.environ['BOT_OWNER']
def bot_token():
return os.environ['BOT_TOKEN']
def bot_prefix():
return os.environ['BOT_PREFIX']
def bot_status():
default_prefix = f'{", ".join(firebolt.config.bot_prefix())} | Teapot.py {firebolt.version()}'
try:
... | 16.721311 | 98 | 0.667647 |
8e86cc29eb6f63a6f5012a0937991b13e20e4011 | 45,761 | py | Python | devkit/python/evaluate_tracking.py | yoyomimi/TNT_pytorch | 165c5da0bc66baf84bb1ddc5fe0cf6a101555c59 | [
"Apache-2.0"
] | 20 | 2020-03-08T14:47:04.000Z | 2021-11-14T12:55:28.000Z | devkit/python/evaluate_tracking.py | conq44/MOT-trackletNet-Visdrone | 0fa717de9d682abcdbf56acbd33b8807b50bfba3 | [
"Apache-2.0"
] | 13 | 2020-03-08T14:39:01.000Z | 2022-03-12T00:18:08.000Z | devkit/python/evaluate_tracking.py | yoyomimi/TNT_pytorch | 165c5da0bc66baf84bb1ddc5fe0cf6a101555c59 | [
"Apache-2.0"
] | 6 | 2020-03-08T14:47:11.000Z | 2021-05-21T10:33:05.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
function that does the evaluation
input:
- result_sha (sha key where the results are located
- mail (messenger object for output messages sent via email and to cout)
output:
- True if at least one of the sub-benchmarks could be processed ... | 47.568607 | 176 | 0.500229 |
67795c835b77f8d02ccedf828375b1cfedae3d5f | 1,286 | py | Python | app/core/tests/test_admin.py | matallonor/recipe-app-api- | 78b997321d6ce55d4ef7bafa30c8d7c70693bf28 | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | matallonor/recipe-app-api- | 78b997321d6ce55d4ef7bafa30c8d7c70693bf28 | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | matallonor/recipe-app-api- | 78b997321d6ce55d4ef7bafa30c8d7c70693bf28 | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email='test_admin@email.com',
... | 30.619048 | 68 | 0.635303 |
4df12b1597aeb60bf50c2e5602f34725ac6b31a9 | 1,049 | py | Python | model-optimizer/extensions/front/mxnet/null_ext.py | calvinfeng/openvino | 11f591c16852637506b1b40d083b450e56d0c8ac | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/front/mxnet/null_ext.py | calvinfeng/openvino | 11f591c16852637506b1b40d083b450e56d0c8ac | [
"Apache-2.0"
] | 19 | 2021-03-26T08:11:00.000Z | 2022-02-21T13:06:26.000Z | model-optimizer/extensions/front/mxnet/null_ext.py | calvinfeng/openvino | 11f591c16852637506b1b40d083b450e56d0c8ac | [
"Apache-2.0"
] | 1 | 2021-07-28T17:30:46.000Z | 2021-07-28T17:30:46.000Z | """
Copyright (C) 2018-2021 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 i... | 31.787879 | 78 | 0.729266 |
805f39ac417456d2d96b2b66a0a38046dc6f404e | 1,444 | py | Python | py/0050.pow-x-n.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0050.pow-x-n.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0050.pow-x-n.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=50 lang=python3
#
# [50] Pow(x, n)
#
# https://leetcode.com/problems/powx-n/description/
#
# algorithms
# Medium (30.92%)
# Likes: 2161
# Dislikes: 3621
# Total Accepted: 600.4K
# Total Submissions: 1.9M
# Testcase Example: '2.00000\n10'
#
# Implement pow(x, n), which calculates x raised ... | 17.190476 | 75 | 0.452909 |
0b3fae55ea24f33724477b0f699d523a9eabe40e | 5,267 | py | Python | piki.py | mrpiqipiq/auto | a0648b751481070644c9c63ab3f6c9647146782d | [
"Apache-2.0"
] | null | null | null | piki.py | mrpiqipiq/auto | a0648b751481070644c9c63ab3f6c9647146782d | [
"Apache-2.0"
] | null | null | null | piki.py | mrpiqipiq/auto | a0648b751481070644c9c63ab3f6c9647146782d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2
# -*- coding: utf-8 -*-
# coded by kereh
try:
import mechanize,requests,os,sys,subprocess,cookielib,time,random
except ImportError:
subprocess.call("pip2 install requests mechanize", shell=True)
subprocess.call("clear",shell=True)
#color
green = "\033[1;32m"
normal = "\033[0m"
red = "\033[... | 30.80117 | 314 | 0.549649 |
506cf77aa06a99b1edc7031c8eb7e4745efc9432 | 374 | py | Python | hiddenwifi.py | scottwedge/python_pentesting_scripts | b57fdbebc8ada05a771eaf3fd3b72d232e3f7dac | [
"MIT"
] | null | null | null | hiddenwifi.py | scottwedge/python_pentesting_scripts | b57fdbebc8ada05a771eaf3fd3b72d232e3f7dac | [
"MIT"
] | null | null | null | hiddenwifi.py | scottwedge/python_pentesting_scripts | b57fdbebc8ada05a771eaf3fd3b72d232e3f7dac | [
"MIT"
] | null | null | null | from scapy.all import *
import os
iface = "wlan0"
def h_packet(packet):
if packet.haslayer(Dot11ProbeREq) or packet.haslayer(Dot11ProbeResp) or packet.haslayer(Dot11AssoReq):
print "SSID identified " + packet.info
os.system("iwconfig " + iface + "mode monitor")
print "Sniffing traffic on inte... | 24.933333 | 107 | 0.703209 |
7412a2f2d85002b4915d14bf2f95f4598971f074 | 5,310 | py | Python | kubernetes/client/models/v1alpha1_volume_attachment_spec.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | 1 | 2020-05-08T12:41:04.000Z | 2020-05-08T12:41:04.000Z | kubernetes/client/models/v1alpha1_volume_attachment_spec.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1alpha1_volume_attachment_spec.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | 2 | 2021-07-09T08:49:05.000Z | 2021-08-03T18:08:36.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.10.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 28.548387 | 133 | 0.591714 |
68d839f685c7f2a9c5bddd7934d657afbdb5c169 | 12,980 | py | Python | openprocurement/tender/openeu/tests/award.py | tarasvaskiv/openprocurement.tender.openeu | 47a02fb9fc7cbad7fc52b5373a43c82be2d983a7 | [
"Apache-2.0"
] | 8 | 2016-01-31T20:38:18.000Z | 2021-06-01T10:59:24.000Z | openprocurement/tender/openeu/tests/award.py | tarasvaskiv/openprocurement.tender.openeu | 47a02fb9fc7cbad7fc52b5373a43c82be2d983a7 | [
"Apache-2.0"
] | 80 | 2016-02-24T16:44:44.000Z | 2018-07-13T12:06:28.000Z | openprocurement/tender/openeu/tests/award.py | tarasvaskiv/openprocurement.tender.openeu | 47a02fb9fc7cbad7fc52b5373a43c82be2d983a7 | [
"Apache-2.0"
] | 26 | 2016-02-02T09:55:06.000Z | 2018-06-15T14:37:46.000Z | # -*- coding: utf-8 -*-
import unittest
from openprocurement.api.tests.base import snitch
from openprocurement.tender.belowthreshold.tests.base import test_organization
from openprocurement.tender.belowthreshold.tests.award import (
TenderAwardComplaintResourceTestMixin,
TenderAwardDocumentResourceTestMixin,
... | 42.980132 | 191 | 0.714715 |
6df76cad5d671784f1cfac8364a650ba088c067b | 3,529 | py | Python | Extra/final_Scrapper.py | AkshayBhimani/Ecommerce-cahtbot-using-NLP | 16ff857187870bc39ee4d9a04ab97eba82d49afa | [
"MIT"
] | null | null | null | Extra/final_Scrapper.py | AkshayBhimani/Ecommerce-cahtbot-using-NLP | 16ff857187870bc39ee4d9a04ab97eba82d49afa | [
"MIT"
] | null | null | null | Extra/final_Scrapper.py | AkshayBhimani/Ecommerce-cahtbot-using-NLP | 16ff857187870bc39ee4d9a04ab97eba82d49afa | [
"MIT"
] | 1 | 2022-02-23T18:42:56.000Z | 2022-02-23T18:42:56.000Z | import urllib
from urllib.parse import urlparse
import requests
from fake_useragent import UserAgent
from bs4 import BeautifulSoup
import re
import pandas as pd
import re
reviewlist =[]
def getAll(productName):
print()
# = input("product name :")
query = productName+"'amazon.in'"
query = urlli... | 29.90678 | 179 | 0.573534 |
4ba1d302576df695c5b2e867452b91b3d1d2844a | 2,621 | py | Python | python/paddle/fluid/dygraph/dygraph_to_static/call_transformer.py | laipaang/Paddle | d7f35434b761707a8479b75636546a624399369a | [
"Apache-2.0"
] | 3 | 2021-06-11T06:48:10.000Z | 2021-09-02T10:18:06.000Z | python/paddle/fluid/dygraph/dygraph_to_static/call_transformer.py | laipaang/Paddle | d7f35434b761707a8479b75636546a624399369a | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/dygraph/dygraph_to_static/call_transformer.py | laipaang/Paddle | d7f35434b761707a8479b75636546a624399369a | [
"Apache-2.0"
] | 1 | 2020-11-05T08:41:11.000Z | 2020-11-05T08:41:11.000Z | # Copyright (c) 2020 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 app... | 36.915493 | 107 | 0.69897 |
8d85db8378cbc82cfe2a2becbf3507a20943b7c9 | 1,588 | py | Python | growth/too/catalogs.py | deepchatterjeeligo/growth-too-marshal | cefd6a4549cdd34895bd8067833273baaf891341 | [
"MIT"
] | null | null | null | growth/too/catalogs.py | deepchatterjeeligo/growth-too-marshal | cefd6a4549cdd34895bd8067833273baaf891341 | [
"MIT"
] | null | null | null | growth/too/catalogs.py | deepchatterjeeligo/growth-too-marshal | cefd6a4549cdd34895bd8067833273baaf891341 | [
"MIT"
] | null | null | null | import os
from astroquery.vizier import VizierClass
from astropy.table import Column, Table
from celery.local import PromiseProxy
import numpy as np
import pkg_resources
from .flask import app
vizier = VizierClass(row_limit=-1)
def fixup(table):
# Add dummy 2D and 3D credible level columns.
# These column... | 26.915254 | 71 | 0.68136 |
1817b185230d5ef430c61eea4cfe2e910428901a | 7,540 | py | Python | adafruit_logo_vector.py | pmartel/CircuitPyDisk | 4bcd71850dab9da84829126dfbd0e09948c3324f | [
"MIT"
] | null | null | null | adafruit_logo_vector.py | pmartel/CircuitPyDisk | 4bcd71850dab9da84829126dfbd0e09948c3324f | [
"MIT"
] | null | null | null | adafruit_logo_vector.py | pmartel/CircuitPyDisk | 4bcd71850dab9da84829126dfbd0e09948c3324f | [
"MIT"
] | null | null | null | ### Adafruit logo
"""Adafruit logo created from bitmap,
vectorised and flattened to straight lines by Inkscape
then points extracte from SVG data.
(Other route is to ask Adafruit for vector version!)
"""
### pylint 2.3.1 has some strange opinions on data structure indentation here
### and this conflicts with version ... | 33.811659 | 77 | 0.535013 |
b9f00bf8a1fda9c1f8df45f585762e98bfe14cde | 1,095 | py | Python | scraper/storage_spiders/nguyenhopphatvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | null | null | null | scraper/storage_spiders/nguyenhopphatvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 10 | 2020-02-11T23:34:28.000Z | 2022-03-11T23:16:12.000Z | scraper/storage_spiders/nguyenhopphatvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 3 | 2018-08-05T14:54:25.000Z | 2021-06-07T01:49:59.000Z | # Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@id='Column-Right-Product']/div[@class='ProductNameLink']/h1/a",
'price' : "//div[@class='row']/div[@id='Product-Right']/div[@cl... | 40.555556 | 118 | 0.642009 |
facd62080ec3804fef871d55c39924d8c268a214 | 2,740 | py | Python | Chapter3/ch3_svc.py | buiksat/Learn-Algorithmic-Trading | b85807483dd869f2b6912556a99842f05b646e31 | [
"MIT"
] | 449 | 2019-12-13T09:53:41.000Z | 2022-03-30T23:06:44.000Z | Chapter3/ch3_svc.py | zecaclasher/Learn-Algorithmic-Trading | e938502980d3bf8d560f260437b4bb162e1b1bfd | [
"MIT"
] | 10 | 2020-05-14T20:18:07.000Z | 2022-02-11T15:13:19.000Z | Chapter3/ch3_svc.py | zecaclasher/Learn-Algorithmic-Trading | e938502980d3bf8d560f260437b4bb162e1b1bfd | [
"MIT"
] | 178 | 2019-12-15T02:56:31.000Z | 2022-03-31T19:21:32.000Z | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.metrics import accuracy_score
from sklearn.svm import SVC
from sklearn.model_selection import train_test_split
from pandas_datareader import data
def load_financial_data(start_date, end_date,output_file):
try:
df = pd.rea... | 32.235294 | 87 | 0.736131 |
5292daaf2348f3e254df3b13a228a3a21fc790a1 | 6,085 | py | Python | pinry/core/migrations/0002_auto__add_field_pin_learned.py | wids-eria/pinry | bde1aa109c162a24fca0d41d3b5cadf0c433c21b | [
"BSD-2-Clause"
] | 1 | 2015-02-02T02:48:12.000Z | 2015-02-02T02:48:12.000Z | pinry/core/migrations/0002_auto__add_field_pin_learned.py | wids-eria/pinry | bde1aa109c162a24fca0d41d3b5cadf0c433c21b | [
"BSD-2-Clause"
] | null | null | null | pinry/core/migrations/0002_auto__add_field_pin_learned.py | wids-eria/pinry | bde1aa109c162a24fca0d41d3b5cadf0c433c21b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Pin.learned'
db.add_column(u'core_pin', 'learned',
... | 66.141304 | 187 | 0.562202 |
0c18e42fd838b3f64ccd7ab5920dc8785cec31ba | 567 | py | Python | Gathered CTF writeups/cysc19-ctf/crypto/dictionary/generate/generate.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:00:41.000Z | 2022-03-27T06:00:41.000Z | Gathered CTF writeups/cysc19-ctf/crypto/dictionary/generate/generate.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | null | null | null | Gathered CTF writeups/cysc19-ctf/crypto/dictionary/generate/generate.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:01:42.000Z | 2022-03-27T06:01:42.000Z | #!/usr/bin/env python3
import random
from string import ascii_letters, digits
charlist = ascii_letters + digits + "_"
flag = "CYS{p1np01n7_4ccur4cy}"
with open("./distrib/lookup.lst","a") as fp:
# Write 100000 lines of strings to file
for line in range(100000):
if line == 75212:
fp.write(f... | 29.842105 | 63 | 0.619048 |
19f077674e45539c32a28b3bb0a54a4b3684cc4c | 224 | py | Python | main.py | brybalti/Exercise-01b-Guessing-Game | 4ea335cd52543d293a15ea74b61928ed239363db | [
"MIT"
] | null | null | null | main.py | brybalti/Exercise-01b-Guessing-Game | 4ea335cd52543d293a15ea74b61928ed239363db | [
"MIT"
] | null | null | null | main.py | brybalti/Exercise-01b-Guessing-Game | 4ea335cd52543d293a15ea74b61928ed239363db | [
"MIT"
] | null | null | null | number = 5
guess = input("Guess a number from 1 to 10: ")
guess = int(guess)
if guess == number:
print("Great job! You got it!")
else:
print("Sorry, better luck next time.")
print("The number was " + str(number)) | 28 | 46 | 0.638393 |
9d490c06167353affa4c515800afe0cf3adecd64 | 1,043 | py | Python | pyramid_igniter/examples/bash/bash/scripts/initializedb.py | tark-hidden/pyramid_igniter | d0723e5547811c652f100763d36538985a97c11e | [
"BSD-3-Clause"
] | 2 | 2015-03-10T17:45:56.000Z | 2015-03-12T06:31:31.000Z | pyramid_igniter/examples/bash/bash/scripts/initializedb.py | tark-hidden/pyramid_igniter | d0723e5547811c652f100763d36538985a97c11e | [
"BSD-3-Clause"
] | null | null | null | pyramid_igniter/examples/bash/bash/scripts/initializedb.py | tark-hidden/pyramid_igniter | d0723e5547811c652f100763d36538985a97c11e | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
from sqlalchemy import engine_from_config
from pyramid.paster import get_appsettings, setup_logging
from pyramid.scripts.common import parse_vars
from bash.models import dbs, Base, StaffModel
import transaction
def usage(argv):
cmd = os.path.basename(argv[0])
print('usage: %s <config_uri... | 28.189189 | 59 | 0.668265 |
043b8a0f13df5cc501bac0ac4dec51b71aaf6189 | 12,947 | py | Python | Kaggle-PyTorch/PyTorch-Ensembler/main-statoil.py | pseemakurthi/Deep-Learning-Boot-Camp | c7830b6791b3ef4b8711a78f6290dfa415f678a7 | [
"MIT"
] | 1 | 2021-12-30T09:27:35.000Z | 2021-12-30T09:27:35.000Z | Kaggle-PyTorch/PyTorch-Ensembler/main-statoil.py | PermanentPon/Deep-Learning-Boot-Camp | f8889cd109135d065da141fc0fa8e74040016887 | [
"MIT"
] | null | null | null | Kaggle-PyTorch/PyTorch-Ensembler/main-statoil.py | PermanentPon/Deep-Learning-Boot-Camp | f8889cd109135d065da141fc0fa8e74040016887 | [
"MIT"
] | 1 | 2019-09-17T09:42:17.000Z | 2019-09-17T09:42:17.000Z | from __future__ import print_function
import argparse
import sys
import torch.backends.cudnn as cudnn
from tqdm import tqdm
from utils import *
# from losses import Eve
from pycrayon import *
model_names = sorted(name for name in nnmodels.__dict__
if name.islower() and not name.startswith("__")... | 49.605364 | 142 | 0.613347 |
4e90a71ddb4fb9bab8399c16b66aba01ebf3940a | 150 | py | Python | gastarme/wallets/apps.py | rafaeltardivo/gastarme | 7e97e611118ab61885f5088a0df7ab1792b71e6e | [
"MIT"
] | null | null | null | gastarme/wallets/apps.py | rafaeltardivo/gastarme | 7e97e611118ab61885f5088a0df7ab1792b71e6e | [
"MIT"
] | null | null | null | gastarme/wallets/apps.py | rafaeltardivo/gastarme | 7e97e611118ab61885f5088a0df7ab1792b71e6e | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class WalletsConfig(AppConfig):
name = 'wallets'
def ready(self):
import wallets.signals # noqa
| 16.666667 | 38 | 0.686667 |
bd38ffed0791a1b5a79f8c77051784fab091a7ec | 1,202 | py | Python | imperative/python/gen_version.py | MegChai/MegEngine | edfd38befdd15d2108209ef44b1f92c840fd0cee | [
"Apache-2.0"
] | null | null | null | imperative/python/gen_version.py | MegChai/MegEngine | edfd38befdd15d2108209ef44b1f92c840fd0cee | [
"Apache-2.0"
] | null | null | null | imperative/python/gen_version.py | MegChai/MegEngine | edfd38befdd15d2108209ef44b1f92c840fd0cee | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import subprocess
def get_git_commit(src_dir):
try:
return subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=src_dir).decode('ascii').strip()
except Exception:
return 'unknown'
def get_mge_version(version_txt_path):
v = {}
with open(version_txt_path) a... | 36.424242 | 105 | 0.659734 |
973cf4b8c263ecb6ae38f083c76f00e46df19f5d | 2,075 | py | Python | mistral/notifiers/base.py | shubhamdang/mistral | 3c83837f6ce1e4ab74fb519a63e82eaae70f9d2d | [
"Apache-2.0"
] | 205 | 2015-06-21T11:51:47.000Z | 2022-03-05T04:00:04.000Z | mistral/notifiers/base.py | shubhamdang/mistral | 3c83837f6ce1e4ab74fb519a63e82eaae70f9d2d | [
"Apache-2.0"
] | 8 | 2015-06-23T14:47:58.000Z | 2021-01-28T06:06:44.000Z | mistral/notifiers/base.py | shubhamdang/mistral | 3c83837f6ce1e4ab74fb519a63e82eaae70f9d2d | [
"Apache-2.0"
] | 110 | 2015-06-14T03:34:38.000Z | 2021-11-11T12:12:56.000Z | # Copyright 2018 - Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 26.265823 | 77 | 0.703133 |
2dbe6ab08c60b639010e8708293e7460bf13513b | 907 | py | Python | aoc_wim/aoc2016/q13.py | wimglenn/advent-of-code-wim | 6308c3fa5d29b318680419f877fd5b8ac1359b5d | [
"WTFPL"
] | 20 | 2019-10-15T07:33:13.000Z | 2022-01-19T13:40:36.000Z | aoc_wim/aoc2016/q13.py | wimglenn/advent-of-code-wim | 6308c3fa5d29b318680419f877fd5b8ac1359b5d | [
"WTFPL"
] | 5 | 2019-02-01T23:31:27.000Z | 2021-12-03T06:55:58.000Z | aoc_wim/aoc2016/q13.py | wimglenn/advent-of-code-wim | 6308c3fa5d29b318680419f877fd5b8ac1359b5d | [
"WTFPL"
] | 8 | 2019-12-03T15:41:23.000Z | 2021-12-06T17:13:57.000Z | """
--- Day 13: A Maze of Twisty Little Cubicles ---
https://adventofcode.com/2016/day/13
"""
from aoc_wim.zgrid import ZGrid
from aocd import data
class WallMap:
def __init__(self, fav_number=None):
if fav_number is None:
fav_number = int(data)
self.fav_number = fav_number
def __... | 25.194444 | 60 | 0.566703 |
491f367727670abd65a488be8bdf49906b7140a5 | 4,859 | py | Python | lib/galaxy_utils/sequence/vcf.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | 2 | 2016-02-23T00:09:14.000Z | 2019-02-11T07:48:44.000Z | lib/galaxy_utils/sequence/vcf.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy_utils/sequence/vcf.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | 6 | 2015-05-27T13:09:50.000Z | 2019-02-11T07:48:46.000Z | #Dan Blankenberg
# See http://www.1000genomes.org/wiki/Analysis/variant-call-format
NOT_A_NUMBER = float( 'NaN' )
class VariantCall( object ):
version = None
header_startswith = None
required_header_fields = None
required_header_length = None
@classmethod
def get_class_by_format( cls, for... | 43 | 223 | 0.613707 |
4bbe86de84079b4cd4396e29b592a53fb5dd2755 | 8,245 | py | Python | python/pyarrow/tests/strategies.py | Root-App/arrow | 793c60a276171595dd6cc80845106aaeb9b37905 | [
"Apache-2.0"
] | 2 | 2019-08-22T10:40:17.000Z | 2021-06-30T11:43:38.000Z | python/pyarrow/tests/strategies.py | dewott-technologies/arrow | 5fa694ba787facfb22f6471262784569cdcbbe28 | [
"Apache-2.0"
] | 7 | 2020-01-31T18:29:09.000Z | 2021-12-14T21:41:59.000Z | python/pyarrow/tests/strategies.py | zettaflowio/arrow | 3a53c9b334f8a2bfa2141fa62336d5f556c9277f | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0"
] | 1 | 2019-10-14T01:44:35.000Z | 2019-10-14T01:44:35.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 31.231061 | 79 | 0.699454 |
0dd1943032afae16ac1ad240e84e949ac71b0b2a | 3,572 | py | Python | django/docs/releases/1.6.10.txt.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | django/docs/releases/1.6.10.txt.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | django/docs/releases/1.6.10.txt.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXX XXXXXX XXXXXXX XXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXX XXX XXXXX
XXXXXX XXXXXX XXXXX XXXXXXX XXXXXXXX XXXXXX XX XXXXXX
XXXX XXXXXX XXXXXXXX XXX XXXXXXXXXXXXXXX XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXX XXXX XXXXXXX XXX XXXXXX XXXX XXX XXXX XXXXXXXX XXX... | 51.028571 | 79 | 0.862822 |
3afc7639dfde295451edef13273cd0f33030f2d1 | 8,431 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20190701/get_connection_monitor.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/network/v20190701/get_connection_monitor.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/network/v20190701/get_connection_monitor.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 37.30531 | 246 | 0.655675 |
9a312df30ea37c34cdfe096f401ba98b0cb835bf | 1,571 | py | Python | utils/pretrained_utils.py | EliasKassapis/CAR | ff7ec86aab68c4b9ff8aea171244991bd132d487 | [
"Apache-2.0"
] | 17 | 2020-06-23T20:59:07.000Z | 2021-01-06T11:36:05.000Z | utils/pretrained_utils.py | EliasKassapis/CAR | ff7ec86aab68c4b9ff8aea171244991bd132d487 | [
"Apache-2.0"
] | 5 | 2021-03-19T13:28:40.000Z | 2022-03-12T00:34:32.000Z | utils/pretrained_utils.py | EliasKassapis/CAR | ff7ec86aab68c4b9ff8aea171244991bd132d487 | [
"Apache-2.0"
] | 1 | 2020-07-05T20:59:05.000Z | 2020-07-05T20:59:05.000Z | from utils.constants import *
import torch.nn as nn
import torchvision.models.vgg as vgg
import torchvision
def deeplabv3_segmentation(n_classes):
model = torchvision.models.segmentation.deeplabv3_resnet101(pretrained=False, progress=True, num_classes=n_classes, aux_loss=None)
model = model.to(DEVICE)
re... | 28.563636 | 134 | 0.745385 |
215301f912708d81c7145426d9438837cae4c3b2 | 2,598 | py | Python | Statistical_Machine_Learning/6/SML6_python/1.py | yoshi-ki/BACHELOR | 65d01c62ab2ea4a6d2616a6b6c535bd4f1645630 | [
"MIT"
] | null | null | null | Statistical_Machine_Learning/6/SML6_python/1.py | yoshi-ki/BACHELOR | 65d01c62ab2ea4a6d2616a6b6c535bd4f1645630 | [
"MIT"
] | null | null | null | Statistical_Machine_Learning/6/SML6_python/1.py | yoshi-ki/BACHELOR | 65d01c62ab2ea4a6d2616a6b6c535bd4f1645630 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
np.random.seed(0)
def data_generate(n=3000):
x = np.zeros(n)
u = np.random.rand(n)
index1 = np.where((0 <= u) & (u < 1 / 8))
x[index1] = np.sqrt(8 * u[index1])
index2 = np.where((1 / 8 <= u) & (u < 1 / 4))
x[index2] = 2 - np.sqrt(2 - 8 * ... | 27.347368 | 88 | 0.573133 |
3409b921156601ac6a3df41d8b6106abb20ac55e | 9,244 | py | Python | sara_flexbe_behaviors/src/sara_flexbe_behaviors/action_takebag_sm.py | WalkingMachine/sara_behaviors | fcb55d274331915cd39d7d444546f17a39f85a44 | [
"BSD-3-Clause"
] | 5 | 2018-05-07T19:58:08.000Z | 2021-04-21T10:49:05.000Z | sara_flexbe_behaviors/src/sara_flexbe_behaviors/action_takebag_sm.py | WalkingMachine/sara_behaviors | fcb55d274331915cd39d7d444546f17a39f85a44 | [
"BSD-3-Clause"
] | 21 | 2017-05-26T01:20:06.000Z | 2021-01-26T23:03:36.000Z | sara_flexbe_behaviors/src/sara_flexbe_behaviors/action_takebag_sm.py | WalkingMachine/sara_behaviors | fcb55d274331915cd39d7d444546f17a39f85a44 | [
"BSD-3-Clause"
] | 2 | 2019-07-22T07:21:20.000Z | 2019-11-11T20:49:22.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###########################################################
# WARNING: Generated code! #
# ************************** #
# Manual changes may get lost if file is generated again. #
# Only code inside the [MANUAL] ta... | 35.968872 | 120 | 0.643444 |
61202e0ae8222260ffb41579a8e0c773f80abd9b | 30 | py | Python | ecs/components/healingpotion.py | joehowells/7drl2020 | ec92c0870fb9ee975530d6a92c1b96634040ebc4 | [
"MIT"
] | null | null | null | ecs/components/healingpotion.py | joehowells/7drl2020 | ec92c0870fb9ee975530d6a92c1b96634040ebc4 | [
"MIT"
] | 2 | 2020-03-25T10:30:31.000Z | 2020-03-25T20:13:43.000Z | ecs/components/healingpotion.py | joehowells/two-button-berserker | ec92c0870fb9ee975530d6a92c1b96634040ebc4 | [
"MIT"
] | null | null | null | class HealingPotion:
pass
| 10 | 20 | 0.733333 |
2d4bd0e59b872fcd5c72efcecc82578c4dd53fa2 | 499 | py | Python | library/opcode.py | creativemindplus/skybison | d1740e08d8de85a0a56b650675717da67de171a0 | [
"CNRI-Python-GPL-Compatible"
] | 278 | 2021-08-31T00:46:51.000Z | 2022-02-13T19:43:28.000Z | library/opcode.py | creativemindplus/skybison | d1740e08d8de85a0a56b650675717da67de171a0 | [
"CNRI-Python-GPL-Compatible"
] | 9 | 2021-11-05T22:28:43.000Z | 2021-11-23T08:39:04.000Z | library/opcode.py | tekknolagi/skybison | bea8fc2af0a70e7203b4c19f36c14a745512a335 | [
"CNRI-Python-GPL-Compatible"
] | 12 | 2021-08-31T07:49:54.000Z | 2021-10-08T01:09:01.000Z | # Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
__all__ = [ # noqa: F405
"cmp_op",
"hasconst",
"hasname",
"hasjrel",
"hasjabs",
"haslocal",
"hascompare",
"hasfree",
"opname",
"opmap",
"HAVE_ARGUMENT",
"EXTENDED_ARG",
]
from _compiler_opcode ... | 16.096774 | 76 | 0.577154 |
0750a8ed13880d09cbd7b4e84636a76f2d4adea1 | 7,596 | py | Python | tests/normal/models/sir_test.py | DarkShadeKnigh/chime_sims | 1e2994a9f48d17e531a6d9b5129392dcdfe8b6b7 | [
"MIT"
] | 24 | 2020-04-14T01:05:37.000Z | 2021-07-12T17:50:36.000Z | tests/normal/models/sir_test.py | DarkShadeKnigh/chime_sims | 1e2994a9f48d17e531a6d9b5129392dcdfe8b6b7 | [
"MIT"
] | 44 | 2020-04-09T17:46:36.000Z | 2020-12-18T22:22:16.000Z | tests/normal/models/sir_test.py | DarkShadeKnigh/chime_sims | 1e2994a9f48d17e531a6d9b5129392dcdfe8b6b7 | [
"MIT"
] | 23 | 2020-04-08T22:41:36.000Z | 2021-03-02T21:34:29.000Z | """Tests for SIR model in this repo
* Compares conserved quantities
* Compares model against Penn CHIME w/wo social policies
* Checks logistic policies in extreme limit
"""
from typing import Tuple
from datetime import date, timedelta
from pytest import fixture
from pandas import DataFrame, Series, DatetimeIndex
from... | 30.753036 | 88 | 0.689968 |
6b86428b6c45b9eed93787de0995366ae4e45667 | 23,690 | py | Python | gallery/tutorial/tensorIR_cpu_HPCG.py | miraclezqc/tvm | 1c10775fea211ec326d1516b5193766fd339d8b5 | [
"Apache-2.0"
] | null | null | null | gallery/tutorial/tensorIR_cpu_HPCG.py | miraclezqc/tvm | 1c10775fea211ec326d1516b5193766fd339d8b5 | [
"Apache-2.0"
] | null | null | null | gallery/tutorial/tensorIR_cpu_HPCG.py | miraclezqc/tvm | 1c10775fea211ec326d1516b5193766fd339d8b5 | [
"Apache-2.0"
] | null | null | null | import os
import time
import tvm
import math
import numpy as np
from tvm.script import tir as T
@T.prim_func
def GenerateProblem(Aval: T.handle, Aidx: T.handle, B: T.handle, X:T.handle, n: T.int32, nnzinrow: T.int32):
T.func_attr({"global_symbol": "GenerateProblem", "tir.noalias": True})
aval = T.match_buffer... | 41.781305 | 167 | 0.535036 |
0896f95f94d69e1822c21e27f95e9752005b86b8 | 5,239 | py | Python | tensorflow/python/keras/optimizer_v2/adagrad.py | m4rkl1u/tensorflow | 90a8825c7ae9719e8969d45040b4155b0e7de130 | [
"Apache-2.0"
] | 2 | 2018-12-05T10:58:40.000Z | 2019-01-24T11:36:01.000Z | tensorflow/python/keras/optimizer_v2/adagrad.py | m4rkl1u/tensorflow | 90a8825c7ae9719e8969d45040b4155b0e7de130 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/optimizer_v2/adagrad.py | m4rkl1u/tensorflow | 90a8825c7ae9719e8969d45040b4155b0e7de130 | [
"Apache-2.0"
] | 2 | 2019-02-26T16:21:15.000Z | 2020-12-04T17:48:17.000Z | # Copyright 2018 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 applica... | 37.963768 | 80 | 0.703569 |
54e453305585016bf999592e6340589aecbdb06a | 447 | py | Python | data/scripts/templates/object/draft_schematic/food/shared_drink_alcohol.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/draft_schematic/food/shared_drink_alcohol.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/draft_schematic/food/shared_drink_alcohol.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/food/shared_drink_alcohol.iff"
result.attribute_template_i... | 26.294118 | 73 | 0.727069 |
9e21626bc6e123973f054dfb6c0712c0acc1d515 | 650 | py | Python | perma_web/perma/migrations/0010_auto_20150618_1534.py | leppert/perma | adb0cec29679c3d161d72330e19114f89f8c42ac | [
"MIT",
"Unlicense"
] | null | null | null | perma_web/perma/migrations/0010_auto_20150618_1534.py | leppert/perma | adb0cec29679c3d161d72330e19114f89f8c42ac | [
"MIT",
"Unlicense"
] | null | null | null | perma_web/perma/migrations/0010_auto_20150618_1534.py | leppert/perma | adb0cec29679c3d161d72330e19114f89f8c42ac | [
"MIT",
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def approve_registrars(apps, schema_editor):
# We can't import the Registrar model directly as it may be a newer
# version than this migration expects. We use the historical version.
Registrar = apps.g... | 27.083333 | 73 | 0.695385 |
1c871bae4e0f303ff8f935b5967f6a3a8788aecf | 23,402 | py | Python | filip/models/ngsi_v2/context.py | dnikolay-ebc/FiLiP | 9a84979da8dff4523cb91e40869070bd02aa91fe | [
"BSD-3-Clause"
] | 6 | 2021-11-21T21:57:38.000Z | 2022-02-22T08:20:30.000Z | filip/models/ngsi_v2/context.py | RWTH-EBC/FiLiP | e294c5ef94b2b6ad9611316e50b5c550bcd77c1b | [
"BSD-3-Clause"
] | 83 | 2021-04-08T18:34:20.000Z | 2022-03-30T12:18:32.000Z | filip/models/ngsi_v2/context.py | dnikolay-ebc/FiLiP | 9a84979da8dff4523cb91e40869070bd02aa91fe | [
"BSD-3-Clause"
] | 5 | 2021-10-04T08:39:21.000Z | 2022-03-30T07:30:57.000Z | """
NGSIv2 models for context broker interaction
"""
import json
from typing import Any, Type, List, Dict, Union, Optional, Set, Tuple
from aenum import Enum
from pydantic import \
BaseModel, \
create_model, \
Field, \
validator
from filip.models.ngsi_v2.base import \
EntityPattern, \
Expressio... | 36.395023 | 80 | 0.58025 |
e0131dcbbaea0684712d83b172147dc815167a7a | 1,634 | py | Python | Chapter09/myshop/cart/views.py | sabin-web/Django-3-by-Example | a0239c954d66fee190014fbd3fa975ddb6eeba17 | [
"MIT"
] | 628 | 2019-11-13T14:13:40.000Z | 2022-03-30T19:02:05.000Z | Chapter09/myshop/cart/views.py | HAKN1999/Django-3-by-Example | a0239c954d66fee190014fbd3fa975ddb6eeba17 | [
"MIT"
] | 96 | 2020-04-17T17:35:33.000Z | 2022-02-17T09:25:06.000Z | Chapter09/myshop/cart/views.py | HAKN1999/Django-3-by-Example | a0239c954d66fee190014fbd3fa975ddb6eeba17 | [
"MIT"
] | 782 | 2019-10-15T07:29:27.000Z | 2022-03-30T17:25:08.000Z | from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from shop.models import Product
from shop.recommender import Recommender
from coupons.forms import CouponApplyForm
from .cart import Cart
from .forms import CartAddProductForm
@require_POST
def cart_... | 34.765957 | 96 | 0.643207 |
42fbf235bb5c9e3fd727ef4546e839852e2a56ff | 29,428 | py | Python | tensorflow/lite/python/convert.py | exynerve/tensorflow | 60f8979fcdb3ba4b0ed4c45d4ed64d471c619882 | [
"Apache-2.0"
] | 9 | 2019-06-05T06:48:07.000Z | 2020-09-29T07:08:02.000Z | tensorflow/lite/python/convert.py | exynerve/tensorflow | 60f8979fcdb3ba4b0ed4c45d4ed64d471c619882 | [
"Apache-2.0"
] | 3 | 2021-08-25T15:06:34.000Z | 2022-02-10T02:50:24.000Z | tensorflow/lite/python/convert.py | exynerve/tensorflow | 60f8979fcdb3ba4b0ed4c45d4ed64d471c619882 | [
"Apache-2.0"
] | 3 | 2019-06-28T02:28:27.000Z | 2021-07-06T08:16:19.000Z | # Lint as: python2, python3
# Copyright 2018 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
#
... | 42.897959 | 80 | 0.705281 |
0499123883e00444790840196274b421e5bf78de | 1,801 | py | Python | translator/__main__.py | marco-nicola/python-translator | 6a559874c9899e52a4cac9c2954dcca6b638f002 | [
"Apache-2.0"
] | null | null | null | translator/__main__.py | marco-nicola/python-translator | 6a559874c9899e52a4cac9c2954dcca6b638f002 | [
"Apache-2.0"
] | null | null | null | translator/__main__.py | marco-nicola/python-translator | 6a559874c9899e52a4cac9c2954dcca6b638f002 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Marco Nicola
#
# 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, ... | 28.587302 | 78 | 0.71849 |
199043b3b781b077d85fcf10a0c69c0f1bba7765 | 680 | py | Python | socket_utilities.py | kznts9v-1lya/tracert | 73ee8062c525d16e944c0b52e477a5066961e96c | [
"MIT"
] | null | null | null | socket_utilities.py | kznts9v-1lya/tracert | 73ee8062c525d16e944c0b52e477a5066961e96c | [
"MIT"
] | null | null | null | socket_utilities.py | kznts9v-1lya/tracert | 73ee8062c525d16e944c0b52e477a5066961e96c | [
"MIT"
] | null | null | null | import socket
import struct
__all__ = ["init_udp_socket", "init_icmp_socket"]
def init_udp_socket(time_to_live):
"""
Initializes UDP socket
"""
udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
udp_socket.setsockopt(socket.SOL_IP, socket.IP_TTL, time_to_live)
... | 21.25 | 85 | 0.714706 |
2c8bab53f07f6eed519b8d38f7d265b1ef05afdc | 1,725 | py | Python | tests/integration_tests/test_group_routes.py | jay-aye-see-kay/mealie | 903a9d8861daea1b12a1986cb0bf6a442ec723eb | [
"MIT"
] | null | null | null | tests/integration_tests/test_group_routes.py | jay-aye-see-kay/mealie | 903a9d8861daea1b12a1986cb0bf6a442ec723eb | [
"MIT"
] | null | null | null | tests/integration_tests/test_group_routes.py | jay-aye-see-kay/mealie | 903a9d8861daea1b12a1986cb0bf6a442ec723eb | [
"MIT"
] | null | null | null | import json
import pytest
from fastapi.testclient import TestClient
from tests.app_routes import AppRoutes
@pytest.fixture
def group_data():
return {"name": "Test Group"}
def test_create_group(api_client: TestClient, api_routes: AppRoutes, token):
response = api_client.post(api_routes.groups, json={"name":... | 29.237288 | 93 | 0.696812 |
7d1898af78f4c9f91de9658f61bbfc88d9b209a0 | 2,145 | py | Python | strux/helpers.py | justinchiu/strux | 364183c3d04c96d67dd91cce547cb4dd3661aa10 | [
"MIT"
] | 17 | 2020-09-03T15:42:43.000Z | 2022-03-10T23:34:41.000Z | strux/helpers.py | justinchiu/strux | 364183c3d04c96d67dd91cce547cb4dd3661aa10 | [
"MIT"
] | null | null | null | strux/helpers.py | justinchiu/strux | 364183c3d04c96d67dd91cce547cb4dd3661aa10 | [
"MIT"
] | 2 | 2020-09-18T21:30:53.000Z | 2022-02-16T02:52:19.000Z | import jax.numpy as np
import math
from .semirings import LogSemiring
import jax
class _Struct:
length_axes = (0,)
def __init__(self, semiring=LogSemiring):
self.semiring = semiring
if False:
self.sum = (jax.vmap(self._dp, (0, 0)))
self.marginals = (jax.grad(lambda *arg... | 32.5 | 87 | 0.582751 |
c8786fe63a6d1bf6c2e6df36ca11b62f4c1f1c83 | 2,767 | py | Python | libs/imagesList.py | ytkachov/LabelVideoWithRecogintion | b2d1705613b135ef35f7ec59992dc832346bf9fb | [
"MIT"
] | null | null | null | libs/imagesList.py | ytkachov/LabelVideoWithRecogintion | b2d1705613b135ef35f7ec59992dc832346bf9fb | [
"MIT"
] | null | null | null | libs/imagesList.py | ytkachov/LabelVideoWithRecogintion | b2d1705613b135ef35f7ec59992dc832346bf9fb | [
"MIT"
] | null | null | null | from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
import time
import pickle
from libs.threading import *
from libs.utils import *
class ImagesList(QDockWidget):
def __init__(self, title, settings, parent_window):
super(ImagesList, self).__init__(title, parent_window)
... | 31.089888 | 82 | 0.675822 |
22fcb11114069a201043e1b60c4b97be1176c4f6 | 170 | py | Python | asyncio_fast_portscanner/__init__.py | Razikus/asyncio-fast-portscanner | 634bf125bb31864602b037d39c7ac6a739cc9998 | [
"MIT"
] | 3 | 2019-10-28T06:50:53.000Z | 2022-02-26T23:22:06.000Z | asyncio_fast_portscanner/__init__.py | Razikus/asyncio-fast-portscanner | 634bf125bb31864602b037d39c7ac6a739cc9998 | [
"MIT"
] | null | null | null | asyncio_fast_portscanner/__init__.py | Razikus/asyncio-fast-portscanner | 634bf125bb31864602b037d39c7ac6a739cc9998 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for asyncio-fast-portscanner."""
__author__ = """Adam Raźniewski"""
__email__ = 'adam@razniewski.eu'
__version__ = '0.0.1'
| 21.25 | 53 | 0.664706 |
eefb497492d3d2d1ff8372d353ac9065a101a76c | 4,849 | py | Python | aiida/cmdline/commands/cmd_data/cmd_bands.py | sshepherd637/aiida-core | 99fd841f33a5c2afa6a0c808c5e6ef9eff73a9df | [
"MIT",
"BSD-3-Clause"
] | null | null | null | aiida/cmdline/commands/cmd_data/cmd_bands.py | sshepherd637/aiida-core | 99fd841f33a5c2afa6a0c808c5e6ef9eff73a9df | [
"MIT",
"BSD-3-Clause"
] | null | null | null | aiida/cmdline/commands/cmd_data/cmd_bands.py | sshepherd637/aiida-core | 99fd841f33a5c2afa6a0c808c5e6ef9eff73a9df | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 34.390071 | 115 | 0.660136 |
669bea80897f39699b13d24add05a5be4afee5a8 | 6,898 | py | Python | src/tutorials/craft_adversarial_examples.py | csce585-mlsystems/project | d150afd1d33528f7d91228f9e0b0dbb4b15cc926 | [
"MIT"
] | 2 | 2020-10-01T08:27:13.000Z | 2020-10-01T20:23:04.000Z | src/tutorials/craft_adversarial_examples.py | Jacob-L-Vincent/project-athena | d1d300e375941399f116cbaa4678a9ed7c6652db | [
"MIT"
] | 3 | 2020-09-29T13:57:24.000Z | 2020-10-01T20:26:03.000Z | src/tutorials/craft_adversarial_examples.py | csce585-mlsystems/project | d150afd1d33528f7d91228f9e0b0dbb4b15cc926 | [
"MIT"
] | null | null | null | """
A sample to generate adversarial examples in the context of white-box threat model.
@author: Ying Meng (y(dot)meng201011(at)gmail(dot)com)
"""
import sys
sys.path.append("../")
import argparse
import numpy as np
import os
import time
from matplotlib import pyplot as plt
from utils.model import load_lenet, load_p... | 39.193182 | 91 | 0.587127 |
a7d94c9ef044354c96e893cf97cc7029e4d84c05 | 4,078 | py | Python | scripts/diffusionEq1D_ForwardEuler.py | RyanClement/DiffusionEquationSolvers | b698e1aa1426e02d29cf5bf1ee2c3cb293046680 | [
"MIT"
] | 1 | 2021-02-25T16:55:00.000Z | 2021-02-25T16:55:00.000Z | scripts/diffusionEq1D_ForwardEuler.py | RyanClement/DiffusionEquationSolvers | b698e1aa1426e02d29cf5bf1ee2c3cb293046680 | [
"MIT"
] | null | null | null | scripts/diffusionEq1D_ForwardEuler.py | RyanClement/DiffusionEquationSolvers | b698e1aa1426e02d29cf5bf1ee2c3cb293046680 | [
"MIT"
] | 1 | 2021-02-25T16:55:01.000Z | 2021-02-25T16:55:01.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Program: diffusionEq1D_ForwardEuler
Created: Aug 2020
@author: Ryan Clement (RRCC)
scisoft@outlook.com
Purpose: Solve the
u_t = alpha * u_xx
on the interval (0,L) with boundary conditions
u = 10 for x = 0
and
... | 26.480519 | 94 | 0.502943 |
ae0fd271e370c0ed63bc65d8c3e3318d2d93f649 | 439 | py | Python | openff/bespokefit/fragmentation/__init__.py | openforcefield/openff-bespokefit | 85c92a51055a5a82e5d50fee1668a7de4ce2b1d4 | [
"MIT"
] | 7 | 2021-12-10T20:56:36.000Z | 2022-03-15T22:20:27.000Z | openff/bespokefit/fragmentation/__init__.py | openforcefield/openff-bespokefit | 85c92a51055a5a82e5d50fee1668a7de4ce2b1d4 | [
"MIT"
] | 44 | 2021-12-07T16:57:28.000Z | 2022-03-31T07:26:11.000Z | openff/bespokefit/fragmentation/__init__.py | openforcefield/openff-bespokefit | 85c92a51055a5a82e5d50fee1668a7de4ce2b1d4 | [
"MIT"
] | null | null | null | """Support for molecular fragmentation"""
from openff.bespokefit.fragmentation.base import (
FragmentationEngine,
deregister_fragmentation_engine,
get_fragmentation_engine,
list_fragmentation_engines,
register_fragmentation_engine,
)
__all__ = [
"FragmentationEngine",
"deregister_fragmenta... | 24.388889 | 50 | 0.774487 |
3f4187965148f1975fb792afa5a194eeb63bb49b | 3,046 | py | Python | src/traders/fts_option_trader.py | pdkary/black-scholes-plus | 1df6d0e18416900ce9380e5428da58af6bb785fa | [
"MIT"
] | 2 | 2021-02-18T04:22:55.000Z | 2021-02-20T23:40:29.000Z | src/traders/fts_option_trader.py | pdkary/black-scholes-plus | 1df6d0e18416900ce9380e5428da58af6bb785fa | [
"MIT"
] | null | null | null | src/traders/fts_option_trader.py | pdkary/black-scholes-plus | 1df6d0e18416900ce9380e5428da58af6bb785fa | [
"MIT"
] | null | null | null | from datetime import datetime
from src.report_generator import ReportGenerator
class FTSOptionTrader:
@staticmethod
def create_call_bear_spread(tkr, expr, strike_low, strike_high, quantity):
returnString = dict()
key_low = FTSOptionTrader.get_fts_option_key(
tkr, 'CALL', e... | 41.162162 | 89 | 0.637229 |
18f2536a7992ac17c5202217498b7d25ab4a9808 | 10,441 | py | Python | Music Generator/generator pre-ui form.py | sambowyer/musicgenerator | 8d4b74e136e9a1df944f7125ab1b1d39c74224b5 | [
"MIT"
] | null | null | null | Music Generator/generator pre-ui form.py | sambowyer/musicgenerator | 8d4b74e136e9a1df944f7125ab1b1d39c74224b5 | [
"MIT"
] | null | null | null | Music Generator/generator pre-ui form.py | sambowyer/musicgenerator | 8d4b74e136e9a1df944f7125ab1b1d39c74224b5 | [
"MIT"
] | null | null | null | from midiutil.MidiFile import MIDIFile
import random
"""
MIDI Standards:
Tone-numbers - all relative to Middle C (C5) which is 60
- int (0-127)
Duration - (of notes) measured in beats, length of which is defined by tempo (bpm)
- float (usually power of 2 (even eg. 0.25 - semi-de... | 39.104869 | 187 | 0.63289 |
fc2103237eb2f96adcfefbf8bd12fc6460c33c6f | 2,277 | py | Python | setup.py | ruohola/pgcli | 87ffae295edf4fb2a9c33c552b12f09921def29f | [
"BSD-3-Clause"
] | 9,135 | 2015-04-19T06:09:48.000Z | 2022-03-30T22:21:05.000Z | setup.py | ruohola/pgcli | 87ffae295edf4fb2a9c33c552b12f09921def29f | [
"BSD-3-Clause"
] | 1,121 | 2015-04-19T07:34:10.000Z | 2022-03-30T23:46:06.000Z | setup.py | ruohola/pgcli | 87ffae295edf4fb2a9c33c552b12f09921def29f | [
"BSD-3-Clause"
] | 533 | 2015-04-19T05:27:51.000Z | 2022-03-31T02:23:06.000Z | import platform
from setuptools import setup, find_packages
from pgcli import __version__
description = "CLI for Postgres Database. With auto-completion and syntax highlighting."
install_requirements = [
"pgspecial>=1.11.8",
"click >= 4.1",
"Pygments >= 2.0", # Pygments has to be Capitalcased. WTF?
... | 35.030769 | 88 | 0.642073 |
063c9d16de200243363a2b290aff0ca3b760d7fa | 1,405 | py | Python | oanda-api-v20-master/tests/test_contrib_generic.py | cdibble2011/OANDA | 68327d6d65dd92952d7a1dc49fe29efca766d900 | [
"MIT"
] | 389 | 2016-07-22T17:19:17.000Z | 2022-03-18T21:14:55.000Z | oanda-api-v20-master/tests/test_contrib_generic.py | cdibble2011/OANDA | 68327d6d65dd92952d7a1dc49fe29efca766d900 | [
"MIT"
] | 162 | 2016-10-04T18:17:48.000Z | 2021-12-22T10:53:54.000Z | oanda-api-v20-master/tests/test_contrib_generic.py | cdibble2011/OANDA | 68327d6d65dd92952d7a1dc49fe29efca766d900 | [
"MIT"
] | 120 | 2016-08-08T18:52:41.000Z | 2022-03-24T06:53:38.000Z | import unittest
try:
from nose_parameterized import parameterized
except ImportError:
print("*** Please install 'nose_parameterized' to run these tests ***")
exit(0)
import oandapyV20.contrib.generic as gen
class TestContribGeneric(unittest.TestCase):
"""Tests regarding contrib generic."""
def... | 29.270833 | 77 | 0.620641 |
262c5c62af896029e1d7bb3bb9a9788b6150d6b0 | 897 | py | Python | tests/backends/vk_test.py | Diolor/python-social-auth | ba4e30d4a11b2e188954770bae4df9426d61a470 | [
"BSD-3-Clause"
] | 1 | 2020-09-06T09:30:02.000Z | 2020-09-06T09:30:02.000Z | tests/backends/vk_test.py | cyroxx/python-social-auth | f6c0fa22524ef7c9ade4c5c323cf13ace86a247b | [
"BSD-3-Clause"
] | null | null | null | tests/backends/vk_test.py | cyroxx/python-social-auth | f6c0fa22524ef7c9ade4c5c323cf13ace86a247b | [
"BSD-3-Clause"
] | 1 | 2020-05-23T05:49:36.000Z | 2020-05-23T05:49:36.000Z | #coding: utf-8
from __future__ import unicode_literals
from social.exceptions import AuthUnknownError
from social.p3 import urlencode
from tests.oauth import OAuth2Test
import json
class VKOAuth2Test(OAuth2Test):
backend_path = 'social.backends.vk.VKOAuth2'
user_data_url = 'https://api.vk.com/method/users.get... | 27.181818 | 77 | 0.615385 |
cb306d42206176160d73bca0b9f69c20ed4ffacf | 981 | py | Python | rejected_peps/pep336.py | wyz23x2/rejected-peps | 2000797a7ea9dea58e60b2d83267a7fbb57c0ca4 | [
"MIT"
] | 1 | 2021-08-08T10:48:53.000Z | 2021-08-08T10:48:53.000Z | rejected_peps/pep336.py | wyz23x2/rejected-peps | 2000797a7ea9dea58e60b2d83267a7fbb57c0ca4 | [
"MIT"
] | null | null | null | rejected_peps/pep336.py | wyz23x2/rejected-peps | 2000797a7ea9dea58e60b2d83267a7fbb57c0ca4 | [
"MIT"
] | null | null | null | """\
PEP INFO
PEP 336 -- Make None callable
Status: Rejected
Created: 2004-10-28
MODULE INFO
This module adds NoneType that makes None callable,
and instance none (None is a keyword). This breaks the `x is None` usage,
so `isNone(obj)` checks if obj is None or none.
REFERENCES
PEP 336: <https://www.python.org/dev... | 25.815789 | 74 | 0.662589 |
53c59f66cbf6093baf0ec1765345e12cc6b0f177 | 9,478 | py | Python | tests/integration/sts/topology/sts_switches_manager_test.py | jhall11/sts | b484f184824c9fe59864103f24fdfa24ff8bcdcd | [
"Apache-2.0"
] | null | null | null | tests/integration/sts/topology/sts_switches_manager_test.py | jhall11/sts | b484f184824c9fe59864103f24fdfa24ff8bcdcd | [
"Apache-2.0"
] | null | null | null | tests/integration/sts/topology/sts_switches_manager_test.py | jhall11/sts | b484f184824c9fe59864103f24fdfa24ff8bcdcd | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Ahmed El-Hassany
#
# 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 i... | 34.465455 | 79 | 0.707322 |
bf5e649f1784c0dca447d724f565bac5f1c780b1 | 1,266 | py | Python | src/capture.py | pallabganguly/gestures-cnn | 8778760d7a5854a5987d24d7b8ff30afb216a624 | [
"MIT"
] | 1 | 2018-05-08T15:34:50.000Z | 2018-05-08T15:34:50.000Z | src/capture.py | pallabganguly/gestures-cnn | 8778760d7a5854a5987d24d7b8ff30afb216a624 | [
"MIT"
] | 9 | 2018-04-25T09:09:08.000Z | 2022-03-11T23:24:27.000Z | src/capture.py | pallabganguly/gestures-cnn | 8778760d7a5854a5987d24d7b8ff30afb216a624 | [
"MIT"
] | 1 | 2018-06-14T08:44:48.000Z | 2018-06-14T08:44:48.000Z | import numpy as np
import cv2
cap = cv2.VideoCapture(0)
count = 1
while count != 1001:
ret, frame = cap.read()
cv2.rectangle(frame, (400,400), (200,200), (0,255,0),0)
crop_img = frame[200:400, 200:400]
value = (33, 33)
hsv = cv2.cvtColor(crop_img,cv2.COLOR_BGR2GRAY)
blur = cv2.GaussianBlur(hsv,... | 36.171429 | 112 | 0.64376 |
a9c2808382f784cb0d01f035b6c4c9f1d02b4179 | 91 | py | Python | src/apps/core/purpleserver/providers/apps.py | blueprin4/purplship-server | e4817d6f6fb358adb10eab81153cf564fdcbc784 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/apps/core/purpleserver/providers/apps.py | blueprin4/purplship-server | e4817d6f6fb358adb10eab81153cf564fdcbc784 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/apps/core/purpleserver/providers/apps.py | blueprin4/purplship-server | e4817d6f6fb358adb10eab81153cf564fdcbc784 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class CarriersConfig(AppConfig):
name = 'carriers'
| 15.166667 | 33 | 0.758242 |
c1866a48351eee304e3f1eb108f8cec8ea987c03 | 3,920 | py | Python | graphgallery/gallery/nodeclas/pytorch/gcn.py | EdisonLeeeee/GraphGallery | 4eec9c5136bda14809bd22584b26cc346cdb633b | [
"MIT"
] | 300 | 2020-08-09T04:27:41.000Z | 2022-03-30T07:43:41.000Z | graphgallery/gallery/nodeclas/pytorch/gcn.py | EdisonLeeeee/GraphGallery | 4eec9c5136bda14809bd22584b26cc346cdb633b | [
"MIT"
] | 5 | 2020-11-05T06:16:50.000Z | 2021-12-11T05:05:22.000Z | graphgallery/gallery/nodeclas/pytorch/gcn.py | EdisonLeeeee/GraphGallery | 4eec9c5136bda14809bd22584b26cc346cdb633b | [
"MIT"
] | 51 | 2020-09-23T15:37:12.000Z | 2022-03-05T01:28:56.000Z | from graphgallery.data.sequence import FullBatchSequence
from graphgallery import functional as gf
from graphgallery.gallery.nodeclas import PyTorch
from graphgallery.gallery import Trainer
from graphgallery.nn.models import get_model
@PyTorch.register()
class GCN(Trainer):
"""
Implementation of... | 33.220339 | 104 | 0.502806 |
be25287823641613cabd767d3bbf0a081db3be25 | 131 | py | Python | recbole/__init__.py | Ahren09/RecBole | b3921818dfbc1b81f9eda8d5e9f05bc9d9114089 | [
"MIT"
] | 16 | 2021-11-03T02:12:49.000Z | 2022-03-27T05:48:19.000Z | recbole/__init__.py | Ahren09/RecBole | b3921818dfbc1b81f9eda8d5e9f05bc9d9114089 | [
"MIT"
] | 2 | 2021-11-21T14:12:25.000Z | 2022-03-11T03:00:04.000Z | recbole/__init__.py | Ahren09/RecBole | b3921818dfbc1b81f9eda8d5e9f05bc9d9114089 | [
"MIT"
] | 4 | 2021-11-25T09:23:41.000Z | 2022-03-26T11:23:26.000Z | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
__version__ = '0.2.1' | 26.2 | 38 | 0.847328 |
88691586f499a899057ae36d5c53a790aa771e64 | 149 | py | Python | source/__init__.py | wasiahmad/SumGenToBT | 84cc82a23c3207811a6b17dfd408570e94009c29 | [
"MIT"
] | 1 | 2022-02-25T11:19:35.000Z | 2022-02-25T11:19:35.000Z | source/__init__.py | wasiahmad/SumGenToBT | 84cc82a23c3207811a6b17dfd408570e94009c29 | [
"MIT"
] | null | null | null | source/__init__.py | wasiahmad/SumGenToBT | 84cc82a23c3207811a6b17dfd408570e94009c29 | [
"MIT"
] | null | null | null | import os
import sys
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
from . import multi_translation
from . import backtranslation
| 18.625 | 63 | 0.791946 |
5104b247da2dce85b7c983fcd39d75ca58e8b938 | 20,779 | py | Python | auto_lights/auto_lights.py | dermotduffy/appdaemon-apps | 117ee558e3e9dfbcc1e02f7f9538626d52fb0b47 | [
"MIT"
] | null | null | null | auto_lights/auto_lights.py | dermotduffy/appdaemon-apps | 117ee558e3e9dfbcc1e02f7f9538626d52fb0b47 | [
"MIT"
] | null | null | null | auto_lights/auto_lights.py | dermotduffy/appdaemon-apps | 117ee558e3e9dfbcc1e02f7f9538626d52fb0b47 | [
"MIT"
] | null | null | null | import datetime
import functools
import os
import traceback
import appdaemon.plugins.hass.hassapi as hass
import voluptuous as vol
import conditions
CONF_TRIGGER_ACTIVATE_CONDITION = 'trigger_activate_condition'
CONF_TRIGGER_DEACTIVATE_CONDITION = 'trigger_deactivate_condition'
CONF_EXTEND_CONDITION = 'extend_condit... | 37.575045 | 85 | 0.705472 |
90433bebb71e32b847a29c824b1e39420d5c7b6b | 5,169 | py | Python | tests/test_dsl.py | KeshavInamdar/rasa_core | 432638e9df53e2b5d68771ea5cf6af6ef1ac6b72 | [
"Apache-2.0"
] | null | null | null | tests/test_dsl.py | KeshavInamdar/rasa_core | 432638e9df53e2b5d68771ea5cf6af6ef1ac6b72 | [
"Apache-2.0"
] | null | null | null | tests/test_dsl.py | KeshavInamdar/rasa_core | 432638e9df53e2b5d68771ea5cf6af6ef1ac6b72 | [
"Apache-2.0"
] | 1 | 2018-05-09T06:57:22.000Z | 2018-05-09T06:57:22.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import io
import os
import numpy as np
from rasa_core.events import ActionExecuted, UserUttered
from rasa_core.featurizers import BinaryFeaturizer
from rasa_core.traini... | 38.288889 | 79 | 0.65177 |
a0bd85e5f78dc3281ce6e26b7b05a5f4846339f4 | 375 | py | Python | experiments/heat-3d/tmp_files/6467.py | LoopTilingBenchmark/benchmark | 52a3d2e70216552a498fd91de02a2fa9cb62122c | [
"BSD-2-Clause"
] | null | null | null | experiments/heat-3d/tmp_files/6467.py | LoopTilingBenchmark/benchmark | 52a3d2e70216552a498fd91de02a2fa9cb62122c | [
"BSD-2-Clause"
] | null | null | null | experiments/heat-3d/tmp_files/6467.py | LoopTilingBenchmark/benchmark | 52a3d2e70216552a498fd91de02a2fa9cb62122c | [
"BSD-2-Clause"
] | null | null | null | from chill import *
source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c')
destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/heat-3d/tmp_files/6467.c')
procedure('kernel_heat_3d')
loop(0)
tile(0,2,16,2)
tile(0,4,16,4)
tile(0,... | 23.4375 | 116 | 0.746667 |
6f6beed60da9d3222f7e6c8766086213570d3a23 | 13,855 | py | Python | sdk/python/pulumi_azure_native/documentdb/v20160331/database_account_mongo_db_database.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20160331/database_account_mongo_db_database.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20160331/database_account_mongo_db_database.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 57.729167 | 2,996 | 0.702346 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.