hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4b44ab85799151e1020d7bb62b4190682ce5fa39 | 1,974 | py | Python | src/entities/report/actions/consult.py | LuisArmando-TestCoder/ShareGraph | fa89d37c8fe522c526b903fe25bd1e22fd769425 | [
"MIT"
] | null | null | null | src/entities/report/actions/consult.py | LuisArmando-TestCoder/ShareGraph | fa89d37c8fe522c526b903fe25bd1e22fd769425 | [
"MIT"
] | null | null | null | src/entities/report/actions/consult.py | LuisArmando-TestCoder/ShareGraph | fa89d37c8fe522c526b903fe25bd1e22fd769425 | [
"MIT"
] | null | null | null | from utilities.getStore import getStore
filePath = "./entities/bill/store.json"
productFilePath = "./entities/product/store.json"
def getProduct(name):
for product in getStore(productFilePath):
if product["name"] == name:
return product
def getProductBillsAverage(name):
productPriceSummat... | 28.608696 | 103 | 0.644377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 462 | 0.234043 |
4b44b5778d0cc6b0adc1458cef3d5591585dd53d | 1,826 | py | Python | discordbot.py | kinotan/discordpy-startup | 1505c4f78deff7f793de75985e669ee84a78a3f2 | [
"MIT"
] | null | null | null | discordbot.py | kinotan/discordpy-startup | 1505c4f78deff7f793de75985e669ee84a78a3f2 | [
"MIT"
] | null | null | null | discordbot.py | kinotan/discordpy-startup | 1505c4f78deff7f793de75985e669ee84a78a3f2 | [
"MIT"
] | null | null | null | #discord.pyのインポート
from asyncio import sleep
import discord
client = discord.Client()
#BOTログイン処理
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
await client.change_presence(game=discord.Game(name='!delchat *'))
# BOT動作プログラム
@cli... | 37.265306 | 107 | 0.545455 | 0 | 0 | 0 | 0 | 1,963 | 0.921596 | 1,935 | 0.908451 | 587 | 0.275587 |
4b453f03ad86e35ca9832f88f32cb3f426b3e7ef | 1,191 | py | Python | api/migrations/0002_element_pokemon.py | danielchikara/pokemon_in_hom | 5da9baa3f87e012ae0d4278668409e1668bf87a6 | [
"MIT"
] | null | null | null | api/migrations/0002_element_pokemon.py | danielchikara/pokemon_in_hom | 5da9baa3f87e012ae0d4278668409e1668bf87a6 | [
"MIT"
] | null | null | null | api/migrations/0002_element_pokemon.py | danielchikara/pokemon_in_hom | 5da9baa3f87e012ae0d4278668409e1668bf87a6 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.11 on 2022-01-08 03:50
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Element',
fi... | 35.029412 | 146 | 0.572628 | 1,064 | 0.893367 | 0 | 0 | 0 | 0 | 0 | 0 | 201 | 0.168766 |
4b45b1a0f99a331cd3db5bcbd3c80d4d359c59e4 | 5,468 | py | Python | src/CLI/actioner/sonic-cli-ip-prefix.py | project-arlo/sonic-mgmt-framework | 562cd84ff3fec9ca705c7df621742f2daa61ce71 | [
"Apache-2.0"
] | 7 | 2019-10-17T06:12:02.000Z | 2021-09-08T11:16:19.000Z | src/CLI/actioner/sonic-cli-ip-prefix.py | noolex/sonic-mgmt-framework | 5493889adc47fc584b04dca1a0cc0a2007211df4 | [
"Apache-2.0"
] | 207 | 2019-06-24T04:48:11.000Z | 2020-05-06T05:51:37.000Z | src/CLI/actioner/sonic-cli-ip-prefix.py | noolex/sonic-mgmt-framework | 5493889adc47fc584b04dca1a0cc0a2007211df4 | [
"Apache-2.0"
] | 20 | 2019-06-27T19:24:45.000Z | 2021-07-15T21:12:30.000Z | #!/usr/bin/python
###########################################################################
#
# Copyright 2019 Dell, 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.... | 34.389937 | 285 | 0.599854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,018 | 0.369056 |
4b465725a6717037599028f9aa649996198118b6 | 268 | py | Python | exec-shell.py | zqsheng/snippet | cb14300fc62c616d48e6552ad93c6d33b5e8c9a1 | [
"Apache-2.0"
] | 1 | 2018-09-10T11:31:33.000Z | 2018-09-10T11:31:33.000Z | exec-shell.py | zqsheng/snippet | cb14300fc62c616d48e6552ad93c6d33b5e8c9a1 | [
"Apache-2.0"
] | null | null | null | exec-shell.py | zqsheng/snippet | cb14300fc62c616d48e6552ad93c6d33b5e8c9a1 | [
"Apache-2.0"
] | null | null | null | import os
import time
exec_count = 100
cmds = []
cmds.append("tar -cPzf /opt/web.tar.gz /opt/web/ /opt/soft")
cmds.append("rm -f /opt/web.tar.gz")
for i in range(exec_count):
for cmd in cmds:
if os.system(cmd) != 0:
break
time.sleep(1) | 24.363636 | 60 | 0.604478 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.261194 |
4b489a2a948e0d5e9116987af060d05a349b77d2 | 123 | py | Python | handlers/__init__.py | IronWolf-K/nonebot_plugin_fr24 | f3752882598de54f41cd9b27456dd3b6f88971e2 | [
"MIT"
] | null | null | null | handlers/__init__.py | IronWolf-K/nonebot_plugin_fr24 | f3752882598de54f41cd9b27456dd3b6f88971e2 | [
"MIT"
] | null | null | null | handlers/__init__.py | IronWolf-K/nonebot_plugin_fr24 | f3752882598de54f41cd9b27456dd3b6f88971e2 | [
"MIT"
] | null | null | null | from .help import help_handler
from .pre import pre_handler
from .now import now_handler
from .filter import filter_handler | 30.75 | 34 | 0.845528 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4b48a1ce648ccd7eddf1077ee9304a100d815be4 | 581 | py | Python | day6_10/day6b.py | invincible-akshay/advent_of_code2020 | 81f207c6f7218ff235c31d67e1b4659cc482297c | [
"MIT"
] | null | null | null | day6_10/day6b.py | invincible-akshay/advent_of_code2020 | 81f207c6f7218ff235c31d67e1b4659cc482297c | [
"MIT"
] | null | null | null | day6_10/day6b.py | invincible-akshay/advent_of_code2020 | 81f207c6f7218ff235c31d67e1b4659cc482297c | [
"MIT"
] | null | null | null | import utils.fileutils as futils
inp = futils.read_list("../data/day6.txt")
nums_dict = dict()
group_size, res_count = 0, 0
for line in inp:
if line == "":
# res_count += len(nums_set)
for k, v in nums_dict.items():
if v == group_size:
res_count += 1
nums_dict = ... | 25.26087 | 48 | 0.567986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.11704 |
4b48d527c36dcd783a13d6a5609545147bc8c89c | 45,165 | py | Python | platform/hwconf_data/zgm13/PythonSnippet/ExporterModel.py | lenloe1/v2.7 | 9ac9c4a7bb37987af382c80647f42d84db5f2e1d | [
"Zlib"
] | null | null | null | platform/hwconf_data/zgm13/PythonSnippet/ExporterModel.py | lenloe1/v2.7 | 9ac9c4a7bb37987af382c80647f42d84db5f2e1d | [
"Zlib"
] | 1 | 2020-08-25T02:36:22.000Z | 2020-08-25T02:36:22.000Z | platform/hwconf_data/zgm13/PythonSnippet/ExporterModel.py | lenloe1/v2.7 | 9ac9c4a7bb37987af382c80647f42d84db5f2e1d | [
"Zlib"
] | 1 | 2020-08-25T01:56:04.000Z | 2020-08-25T01:56:04.000Z | from . import types
from . import dep
from . import RuntimeModel
from . import Metadata
class Property(object):
def __init__(self, name, description, namespace='', visible=False, readonly=False, define_name=None, long_description=None):
'''
:param name: Name of the property (string)
:param... | 44.497537 | 179 | 0.613949 | 43,280 | 0.958264 | 0 | 0 | 0 | 0 | 0 | 0 | 8,896 | 0.196967 |
4b4b052054557003ef2b409b1b9f8cb5ed96012e | 48,837 | py | Python | tests/schematics_proto3_tests_pb2.py | mlga/schematics-proto3 | 588fe5bc212e203688166638a1c52dfeda931403 | [
"MIT"
] | null | null | null | tests/schematics_proto3_tests_pb2.py | mlga/schematics-proto3 | 588fe5bc212e203688166638a1c52dfeda931403 | [
"MIT"
] | 11 | 2020-04-09T13:33:54.000Z | 2020-08-19T17:38:26.000Z | tests/schematics_proto3_tests_pb2.py | mlga/schematics-proto3 | 588fe5bc212e203688166638a1c52dfeda931403 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tests/schematics_proto3_tests.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descri... | 33.750518 | 3,198 | 0.757377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,389 | 0.253681 |
4b4dceb98d231438a803f497f8f31de32f299051 | 241 | py | Python | sps_demo/accounts/api/serializers.py | JuanDM93/sps_django | df47c7ee63a1e99468644a6f428a6cdabc7ac6ae | [
"MIT"
] | null | null | null | sps_demo/accounts/api/serializers.py | JuanDM93/sps_django | df47c7ee63a1e99468644a6f428a6cdabc7ac6ae | [
"MIT"
] | 1 | 2021-07-27T06:46:05.000Z | 2021-07-27T06:46:05.000Z | sps_demo/accounts/api/serializers.py | JuanDM93/sps_django | df47c7ee63a1e99468644a6f428a6cdabc7ac6ae | [
"MIT"
] | null | null | null | from rest_framework.serializers import ModelSerializer
from accounts.models import Account
class AccountSerializer(ModelSerializer):
class Meta:
model = Account
fields = [
'account_id', 'limit',
]
| 21.909091 | 54 | 0.6639 | 145 | 0.60166 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0.078838 |
4b4ddf5eeb83ed879035c41d407475a7baf89592 | 6,320 | py | Python | benchmark/HIGGS/explore/contour_nll.py | victor-estrade/SystGradDescent | 822e7094290301ec47a99433381a8d6406798aff | [
"MIT"
] | 2 | 2019-03-20T09:05:02.000Z | 2019-03-20T15:23:44.000Z | benchmark/HIGGS/explore/contour_nll.py | victor-estrade/SystGradDescent | 822e7094290301ec47a99433381a8d6406798aff | [
"MIT"
] | null | null | null | benchmark/HIGGS/explore/contour_nll.py | victor-estrade/SystGradDescent | 822e7094290301ec47a99433381a8d6406798aff | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import logging
import datetime
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from config impor... | 39.012346 | 125 | 0.708861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 626 | 0.099051 |
4b4e8e6fb685efd1c0bdeed695e0d638ddd30af1 | 1,376 | py | Python | backend/framework/qlf/dashboard/migrations/0012_auto_20180921_1717.py | desihub/qlf | a9c455f7aee41d7901c89ae90dd821c617340a86 | [
"BSD-3-Clause"
] | 8 | 2017-09-08T00:24:20.000Z | 2019-02-03T07:31:03.000Z | backend/framework/qlf/dashboard/migrations/0012_auto_20180921_1717.py | desihub/qlf | a9c455f7aee41d7901c89ae90dd821c617340a86 | [
"BSD-3-Clause"
] | 77 | 2017-06-15T21:39:09.000Z | 2019-07-13T19:41:27.000Z | backend/framework/qlf/dashboard/migrations/0012_auto_20180921_1717.py | desihub/qlf | a9c455f7aee41d7901c89ae90dd821c617340a86 | [
"BSD-3-Clause"
] | 5 | 2017-09-10T02:25:03.000Z | 2019-02-06T20:55:59.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-09-21 17:17
from __future__ import unicode_literals
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0011_auto_... | 38.222222 | 152 | 0.635174 | 1,149 | 0.835029 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.15843 |
4b53328e075db009dbb8d21c3c121da0a2ce955a | 476 | py | Python | qcodes/instrument_drivers/rohde_schwarz/HMC8042.py | LGruenhaupt/Qcodes | ffb74dae53c13c4885e61b5a2df3f833d524de04 | [
"MIT"
] | 1 | 2019-12-07T01:25:49.000Z | 2019-12-07T01:25:49.000Z | qcodes/instrument_drivers/rohde_schwarz/HMC8042.py | Dominik-Vogel/Qcodes | b4cf7d58bc1bf3be97af6bf48f57cb6b87d588bb | [
"MIT"
] | 12 | 2020-10-13T16:53:37.000Z | 2020-10-14T17:16:22.000Z | qcodes/instrument_drivers/rohde_schwarz/HMC8042.py | Dominik-Vogel/Qcodes | b4cf7d58bc1bf3be97af6bf48f57cb6b87d588bb | [
"MIT"
] | 1 | 2020-05-03T22:47:40.000Z | 2020-05-03T22:47:40.000Z | from .private.HMC804x import _RohdeSchwarzHMC804x
from qcodes.utils.deprecate import deprecate_moved_to_qcd
@deprecate_moved_to_qcd(alternative="qcodes_contrib_drivers.drivers.RohdeSchwarz.HMC8042.RohdeSchwarzHMC8042")
class RohdeSchwarzHMC8042(_RohdeSchwarzHMC804x):
"""
This is the qcodes driver for the Rohd... | 39.666667 | 110 | 0.781513 | 254 | 0.533613 | 0 | 0 | 365 | 0.766807 | 0 | 0 | 159 | 0.334034 |
4b5611952b114a3d2cf44eadfe8d22e693d8c643 | 682 | py | Python | python_fundamentals/Multiple_Sum_Average/index.py | justnclrk/Python | 0922961cbd94694a69ae8132a5c33baf552d8d89 | [
"MIT"
] | null | null | null | python_fundamentals/Multiple_Sum_Average/index.py | justnclrk/Python | 0922961cbd94694a69ae8132a5c33baf552d8d89 | [
"MIT"
] | 8 | 2020-06-06T01:02:06.000Z | 2022-03-12T00:24:13.000Z | python_fundamentals/Multiple_Sum_Average/index.py | justnclrk/Python | 0922961cbd94694a69ae8132a5c33baf552d8d89 | [
"MIT"
] | null | null | null | # Multiples -- Part I - Write code that prints all the odd numbers from 1 to 1000. Use the for loop and don't use a list to do this exercise
for i in range(1, 1000, 2):
print(i)
# Multiples -- Part II - Create another program that prints all the multiples of 5 from 5 to 1,000,000
for m in range(5, 1000000, 5):
... | 40.117647 | 140 | 0.64956 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 460 | 0.674487 |
4b5646cef1fca290360a2f8a03244f3cf60a9b62 | 2,817 | py | Python | examples/gen9_valset_test.py | mgesteiro/pyubx2 | 02fd8fa2863b88ed2d746b5800717a1b6b213181 | [
"BSD-3-Clause"
] | null | null | null | examples/gen9_valset_test.py | mgesteiro/pyubx2 | 02fd8fa2863b88ed2d746b5800717a1b6b213181 | [
"BSD-3-Clause"
] | null | null | null | examples/gen9_valset_test.py | mgesteiro/pyubx2 | 02fd8fa2863b88ed2d746b5800717a1b6b213181 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
Demo example to test CFG-VALSET ublox message - generation 9
@author: mgesteiro
"""
import sys
import time
from serial import Serial, SerialException, SerialTimeoutException
from pyubx2 import (
UBXMessage,
GET,
SET,
VALSET_RAM,
UBXMessageError,
UBXTypeError,
UBXP... | 28.17 | 88 | 0.606674 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,205 | 0.425946 |
4b57edd76cfedc441b5ed69fe2a9fd78c4dbd2d2 | 3,996 | py | Python | main.py | saswatsamal/Snake-Game | 2c0f427fd6001f09d26a4586ce55453af706c355 | [
"CC0-1.0"
] | 2 | 2021-04-25T07:34:14.000Z | 2021-04-30T15:24:55.000Z | main.py | saswatsamal/Snake-Game | 2c0f427fd6001f09d26a4586ce55453af706c355 | [
"CC0-1.0"
] | null | null | null | main.py | saswatsamal/Snake-Game | 2c0f427fd6001f09d26a4586ce55453af706c355 | [
"CC0-1.0"
] | null | null | null | import pygame
import time
import sys, random
pygame.init()
yellow = (255, 255, 102)
green = (0, 255, 0)
black = (0,0,0)
width = 1280
height = 720
gameDisplay = pygame.display.set_mode((width, height))
pygame.display.set_caption('Snake Game By Saswat Samal')
clock = pygame.time.Clock()
snake_block = 10
snak... | 27.369863 | 104 | 0.56006 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.039289 |
4b59cb1bcbcd0c6d58e12de2aac812a57e139151 | 918 | py | Python | SoftMax_Regression.py | chunish/tfboy-is-on-the-way | 7cd4c1f7c0c1dd94189377ee0751f2c232a1e98c | [
"Apache-2.0"
] | null | null | null | SoftMax_Regression.py | chunish/tfboy-is-on-the-way | 7cd4c1f7c0c1dd94189377ee0751f2c232a1e98c | [
"Apache-2.0"
] | null | null | null | SoftMax_Regression.py | chunish/tfboy-is-on-the-way | 7cd4c1f7c0c1dd94189377ee0751f2c232a1e98c | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot = True)
sess = tf.InteractiveSession()
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.nn.softmax(tf.matm... | 31.655172 | 87 | 0.734205 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.029158 |
4b5a4dc0a470a6b6a0219e69281685d307bd50e5 | 465 | py | Python | ltc/analyzer/migrations/0006_graphitevariable_function.py | v0devil/jltom | b302a39a187b8e1154c6deda636a4db8b30bb40b | [
"MIT"
] | 4 | 2016-12-30T13:26:59.000Z | 2017-04-26T12:07:36.000Z | ltc/analyzer/migrations/0006_graphitevariable_function.py | v0devil/jltom | b302a39a187b8e1154c6deda636a4db8b30bb40b | [
"MIT"
] | null | null | null | ltc/analyzer/migrations/0006_graphitevariable_function.py | v0devil/jltom | b302a39a187b8e1154c6deda636a4db8b30bb40b | [
"MIT"
] | null | null | null | # Generated by Django 2.2.20 on 2021-05-27 14:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('analyzer', '0005_auto_20210526_1755'),
]
operations = [
migrations.AddField(
model_name='graphitevariable',
name='f... | 24.473684 | 117 | 0.584946 | 371 | 0.797849 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.301075 |
4b5c74257ca507c7289c021413a4bdff6ed7d6a6 | 2,865 | py | Python | Python/061.py | jaimeliew1/Project_Euler_Solutions | 963c9c6d6571cade8f87341f97a6a2cd1af202bb | [
"MIT"
] | null | null | null | Python/061.py | jaimeliew1/Project_Euler_Solutions | 963c9c6d6571cade8f87341f97a6a2cd1af202bb | [
"MIT"
] | 1 | 2018-04-16T21:01:50.000Z | 2018-04-16T21:01:50.000Z | Python/061.py | jaimeliew1/Project_Euler_Solutions | 963c9c6d6571cade8f87341f97a6a2cd1af202bb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Solution to Project Euler problem X
Author: Jaime Liew
https://github.com/jaimeliew1/Project_Euler_Solutions
"""
import math
def isTri(n):
return ((math.sqrt(1+8*n)-1)/2).is_integer()
def isSqr(n):
return (math.sqrt(n)).is_integer()
def isPent(n):
return ((1+math.sqrt(1+24*n)... | 25.131579 | 89 | 0.506806 | 433 | 0.151134 | 0 | 0 | 0 | 0 | 0 | 0 | 391 | 0.136475 |
4b5cbe04dec6e7c55b09522e71410c55307b8fa0 | 302 | py | Python | shop/views/shop_views.py | cuescience/cuescience-shop | bf5ea159f9277d1d6ab7acfcad3f2517723a225c | [
"MIT"
] | null | null | null | shop/views/shop_views.py | cuescience/cuescience-shop | bf5ea159f9277d1d6ab7acfcad3f2517723a225c | [
"MIT"
] | null | null | null | shop/views/shop_views.py | cuescience/cuescience-shop | bf5ea159f9277d1d6ab7acfcad3f2517723a225c | [
"MIT"
] | null | null | null | from shop.models import Product
from django.shortcuts import render_to_response
from django.template import RequestContext
def index_view(request):
products = Product.objects.all()
return render_to_response("cuescience_shop/index.html", RequestContext(request, {"products": products}))
| 20.133333 | 108 | 0.788079 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.125828 |
4b5d16684195ca44a761cc1ab6755c005952e4d5 | 163 | py | Python | qrogue/test/statevector_tests.py | 7Magic7Mike7/Qrogue | 70bd5671a77981c1d4b633246321ba44f13c21ff | [
"MIT"
] | 4 | 2021-12-14T19:13:43.000Z | 2022-02-16T13:25:38.000Z | qrogue/test/statevector_tests.py | 7Magic7Mike7/Qrogue | 70bd5671a77981c1d4b633246321ba44f13c21ff | [
"MIT"
] | null | null | null | qrogue/test/statevector_tests.py | 7Magic7Mike7/Qrogue | 70bd5671a77981c1d4b633246321ba44f13c21ff | [
"MIT"
] | 1 | 2022-01-04T18:35:51.000Z | 2022-01-04T18:35:51.000Z | import numpy as np
from qrogue.game.logic.actors import StateVector
stv = StateVector([1 / np.sqrt(2), 0 + 0j, 0 + 0j, 1 / np.sqrt(2)])
#stv.extend(1)
print(stv) | 23.285714 | 67 | 0.680982 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.08589 |
4b5fd841b1005516ab298b5be16fb1dd41b071b3 | 3,190 | py | Python | taehyoungram/images/views.py | TaeHyoungKwon/taehyoungram | 055c9effdaa718d60e7627196754ea6b48dded20 | [
"MIT"
] | null | null | null | taehyoungram/images/views.py | TaeHyoungKwon/taehyoungram | 055c9effdaa718d60e7627196754ea6b48dded20 | [
"MIT"
] | 7 | 2020-02-12T01:23:48.000Z | 2022-03-11T23:26:02.000Z | taehyoungram/images/views.py | TaeHyoungKwon/taehyoungram | 055c9effdaa718d60e7627196754ea6b48dded20 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from .models import Image, Comment, Like
from .serializers import ImageSerializer, CommentSerializer, LikeSerializer
class Feed(APIView):
def get(self, request, format=None):
user ... | 27.73913 | 89 | 0.626646 | 2,927 | 0.917555 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4b6108a9e3aec6079aa6d738f5836676b16bd14f | 4,195 | py | Python | examples/zoomed.py | ColmTalbot/psd-covariance-matrices | 59631dd1860e9cf28658df1ce28b10f6f8d59868 | [
"MIT"
] | null | null | null | examples/zoomed.py | ColmTalbot/psd-covariance-matrices | 59631dd1860e9cf28658df1ce28b10f6f8d59868 | [
"MIT"
] | null | null | null | examples/zoomed.py | ColmTalbot/psd-covariance-matrices | 59631dd1860e9cf28658df1ce28b10f6f8d59868 | [
"MIT"
] | 2 | 2021-07-01T02:00:10.000Z | 2021-08-02T07:29:03.000Z | #!/usr/bin/env python
"""
Compute the comparison of the analytic and experimental PSD matrices.
This will generate Figure 1.
This is probably the only example that will run in a reasonable time without
a GPU.
For more details on the method see https://arxiv.org/abs/2106.13785.
"""
import numpy as np
import matplotli... | 32.269231 | 77 | 0.695828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 555 | 0.1323 |
4b624ab13f54c8cfd7032b48000491920f6d9a27 | 5,581 | py | Python | web_spider/web_spider/pipelines.py | syun0216/simple_ci | 83d31cb04357fe0bd428ab8f09c2db81a06eb723 | [
"MIT"
] | null | null | null | web_spider/web_spider/pipelines.py | syun0216/simple_ci | 83d31cb04357fe0bd428ab8f09c2db81a06eb723 | [
"MIT"
] | null | null | null | web_spider/web_spider/pipelines.py | syun0216/simple_ci | 83d31cb04357fe0bd428ab8f09c2db81a06eb723 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
import pymysql
class WebSpiderPipeline(object):
def init_insert_db(self,key,table_name):
pass
def proc... | 52.650943 | 226 | 0.392403 | 5,364 | 0.961118 | 0 | 0 | 0 | 0 | 0 | 0 | 4,061 | 0.727647 |
4b63b53c7d4c16192575ee81d07d9b767d76c245 | 239 | py | Python | etl_framework/config_mixins/AddDestinationMixin.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 2 | 2017-03-01T20:09:06.000Z | 2019-02-08T17:10:16.000Z | etl_framework/config_mixins/AddDestinationMixin.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 40 | 2015-10-10T15:02:21.000Z | 2020-03-17T22:32:04.000Z | etl_framework/config_mixins/AddDestinationMixin.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 2 | 2018-11-14T21:50:58.000Z | 2022-03-07T20:59:27.000Z | """mixin to add destinations to config attributes"""
class AddDestinationMixin(object):
"""stuff"""
def add_destination_chooser(self, destination_chooser_mappings):
"""adds destination_choosers to config"""
pass
| 23.9 | 68 | 0.707113 | 184 | 0.769874 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.435146 |
4b65eb4040ecf11e53140f9d3ec6fb5084fff907 | 6,298 | py | Python | src/utilities/download_bc.py | geoschem/integrated_methane_inversion | 0615e3b76c111beadaf0d7fb5b9fa99aa782f403 | [
"MIT"
] | null | null | null | src/utilities/download_bc.py | geoschem/integrated_methane_inversion | 0615e3b76c111beadaf0d7fb5b9fa99aa782f403 | [
"MIT"
] | 3 | 2022-02-14T20:42:35.000Z | 2022-03-29T18:11:40.000Z | src/utilities/download_bc.py | geoschem/integrated_methane_inversion | 0615e3b76c111beadaf0d7fb5b9fa99aa782f403 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Description:
------------
This Python script (assumes Python3) downloads boundary conditions
files from AWS S3 to a target directory for the requested date range.
Remarks:
--------
(1) Jiawei Zhuang found that it is much faster to issue aws s3 cp
commands from a bash script than... | 30.872549 | 88 | 0.580343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,909 | 0.461893 |
4b675eebc011dcbf30a99943e8204d368b2ed0b9 | 216 | py | Python | backend/core/__init__.py | itimor/one-ops | f1111735de252012752dfabe11598e9690c89257 | [
"MIT"
] | 2 | 2020-09-25T05:52:55.000Z | 2021-01-14T07:06:17.000Z | backend/core/__init__.py | itimor/one-ops | f1111735de252012752dfabe11598e9690c89257 | [
"MIT"
] | 6 | 2021-03-19T10:20:05.000Z | 2021-09-22T19:30:21.000Z | backend/core/__init__.py | itimor/one-ops | f1111735de252012752dfabe11598e9690c89257 | [
"MIT"
] | 1 | 2022-02-24T01:37:06.000Z | 2022-02-24T01:37:06.000Z | from __future__ import absolute_import, unicode_literals
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
# import pymysql
#
# pymysql.install_as_MySQLdb()
| 30.857143 | 56 | 0.805556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.712963 |
4b6ab5ac671d440fac187ec117fb8831906a3c8f | 39 | tac | Python | semantics_and_generate/samples/link1.tac | AHEADer/my_decaf_compiler | 42ba9f140c5fda3cd2b4fdb727745d2cfd39c923 | [
"MIT"
] | 1 | 2018-01-03T03:35:38.000Z | 2018-01-03T03:35:38.000Z | semantics_and_generate/samples/link1.tac | AHEADer/my_decaf_compiler | 42ba9f140c5fda3cd2b4fdb727745d2cfd39c923 | [
"MIT"
] | null | null | null | semantics_and_generate/samples/link1.tac | AHEADer/my_decaf_compiler | 42ba9f140c5fda3cd2b4fdb727745d2cfd39c923 | [
"MIT"
] | null | null | null | ____notmain:
BeginFunc 0 ;
EndFunc ;
| 9.75 | 14 | 0.717949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4b6add180192d528e3ed133e29c757a81886beb8 | 483 | py | Python | NoteBooks/Curso de Python/Python/Paradigmas/Object Oriented Programming/Modelando Objetos_2.py | Alejandro-sin/Learning_Notebooks | 161d6bed4c7b1d171b45f61c0cc6fa91e9894aad | [
"MIT"
] | 1 | 2021-02-26T13:12:22.000Z | 2021-02-26T13:12:22.000Z | NoteBooks/Curso de Python/Python/Paradigmas/Object Oriented Programming/Modelando Objetos_2.py | Alejandro-sin/Learning_Notebooks | 161d6bed4c7b1d171b45f61c0cc6fa91e9894aad | [
"MIT"
] | null | null | null | NoteBooks/Curso de Python/Python/Paradigmas/Object Oriented Programming/Modelando Objetos_2.py | Alejandro-sin/Learning_Notebooks | 161d6bed4c7b1d171b45f61c0cc6fa91e9894aad | [
"MIT"
] | null | null | null | """
Ejercicio para operación entre currencies
"""
""" Representación del currency"""
class Curency:
def __init__(self, name, symbol, factor):
self.name = name
self.symbol = symbol
self.factor = factor
# No me queda muy claro el uso de esta función, sirve para mostrar puntualmente qué?... | 17.888889 | 84 | 0.621118 | 143 | 0.293634 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.593429 |
4b6b2b2466b7f50264d915b0b9ab9925c879719e | 587 | py | Python | kora/install/blender.py | wannaphong/kora | 8a9034097d07b14094e077769c02a0b4857d179b | [
"MIT"
] | 91 | 2020-05-26T05:54:51.000Z | 2022-03-09T07:33:44.000Z | kora/install/blender.py | wannaphong/kora | 8a9034097d07b14094e077769c02a0b4857d179b | [
"MIT"
] | 12 | 2020-10-03T10:09:11.000Z | 2021-03-06T23:12:21.000Z | kora/install/blender.py | wannaphong/kora | 8a9034097d07b14094e077769c02a0b4857d179b | [
"MIT"
] | 16 | 2020-07-07T18:39:29.000Z | 2021-03-06T03:46:49.000Z | import os
from IPython import get_ipython
# need this fix first
os.environ["LD_PRELOAD"] = ""
os.system("apt remove libtcmalloc-minimal4")
os.system("apt install libtcmalloc-minimal4")
os.environ["LD_PRELOAD"] = "/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4.3.0"
os.system("dpkg -L libtcmalloc-minimal4")
# then ... | 36.6875 | 86 | 0.749574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.713799 |
4b6cb29835a30f52c4bb14e8a53ca4a8d4a5cdb7 | 2,352 | py | Python | parks/models.py | ExpertOfNone/expert_of_none | 9ff4e4279a570712766546122c014c754f753485 | [
"MIT"
] | null | null | null | parks/models.py | ExpertOfNone/expert_of_none | 9ff4e4279a570712766546122c014c754f753485 | [
"MIT"
] | null | null | null | parks/models.py | ExpertOfNone/expert_of_none | 9ff4e4279a570712766546122c014c754f753485 | [
"MIT"
] | null | null | null | from django.db import models
from django_countries.fields import CountryField
from localflavor.us.models import USStateField
from base.models import EONBaseModel
class Amenity(EONBaseModel):
"""Common amenities, i.e. Pool, Lake, Hiking Trail, Primitive Camping, etc."""
name = models.CharField(max_length=50)... | 31.36 | 97 | 0.702381 | 2,177 | 0.925595 | 0 | 0 | 0 | 0 | 0 | 0 | 333 | 0.141582 |
4b6d6ef8de7836397b32a70984d9c9488bd0f64f | 3,891 | py | Python | roomfinder_dispo/roomfinder_dispo/dispo.py | GuillaumeMorini/roomfinder | d756bba6e50a7361ecf9cf529af4a1775a0e836b | [
"Apache-2.0"
] | 14 | 2017-01-23T02:58:53.000Z | 2020-12-21T14:05:07.000Z | roomfinder_dispo/roomfinder_dispo/dispo.py | GuillaumeMorini/roomfinder | d756bba6e50a7361ecf9cf529af4a1775a0e836b | [
"Apache-2.0"
] | 2 | 2017-01-23T09:46:54.000Z | 2017-09-11T10:15:07.000Z | roomfinder_dispo/roomfinder_dispo/dispo.py | GuillaumeMorini/roomfinder | d756bba6e50a7361ecf9cf529af4a1775a0e836b | [
"Apache-2.0"
] | 9 | 2017-01-23T02:55:27.000Z | 2020-05-20T18:38:18.000Z | #!/usr/bin/env python2.7
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
from flask import Flask, render_template, request, jsonify
import argparse
import datetime
import os, sys
import requests
from socket import error as SocketError
import errno
import json
import pika
import uuid
app = Flask(__name__)
@a... | 31.893443 | 138 | 0.627602 | 0 | 0 | 0 | 0 | 1,148 | 0.29504 | 0 | 0 | 765 | 0.196608 |
4b6e6530e3333cd913c07220255b812f35a812cc | 167 | py | Python | Sea/model/components/Component3D.py | FRidh/Sea | b474e93a449570a9ba3b915c4d80f814feee2545 | [
"BSD-3-Clause"
] | 2 | 2015-07-02T13:34:09.000Z | 2015-09-28T09:07:52.000Z | Sea/model/components/Component3D.py | FRidh/Sea | b474e93a449570a9ba3b915c4d80f814feee2545 | [
"BSD-3-Clause"
] | null | null | null | Sea/model/components/Component3D.py | FRidh/Sea | b474e93a449570a9ba3b915c4d80f814feee2545 | [
"BSD-3-Clause"
] | 1 | 2022-01-22T03:01:54.000Z | 2022-01-22T03:01:54.000Z |
import numpy as np
from ComponentStructural import ComponentStructural
from ..subsystems import SubsystemStructural
class Component3D(ComponentStructural):
pass | 20.875 | 51 | 0.844311 | 48 | 0.287425 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4b6f1aec2b3a7aa82fa7792516bb55e9223b7c08 | 1,063 | py | Python | bot.py | federicosapienza/InboxNotionTelegramBot | 031d5e78cd352dfb692b93f3e0b421695f1dc18e | [
"MIT"
] | null | null | null | bot.py | federicosapienza/InboxNotionTelegramBot | 031d5e78cd352dfb692b93f3e0b421695f1dc18e | [
"MIT"
] | null | null | null | bot.py | federicosapienza/InboxNotionTelegramBot | 031d5e78cd352dfb692b93f3e0b421695f1dc18e | [
"MIT"
] | null | null | null | from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, ConversationHandler
import logging
from utils import TELEGRAM_TOKEN
from handlers import start, ask_new_url, get_url, get_description, cancel
from handlers import URL_URL, URL_DESCRIPTION
logging.basicConfig(format='%(levelname)s - %(message)s... | 25.926829 | 94 | 0.739417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.03857 |
4b6fc4e98137fcd105847298b470d6ad64f71618 | 841 | py | Python | examples/face.py | birkenfeld/python-gr | 1d6cd36616a73c8e569b8348869e6e30f3830ec4 | [
"RSA-MD"
] | null | null | null | examples/face.py | birkenfeld/python-gr | 1d6cd36616a73c8e569b8348869e6e30f3830ec4 | [
"RSA-MD"
] | null | null | null | examples/face.py | birkenfeld/python-gr | 1d6cd36616a73c8e569b8348869e6e30f3830ec4 | [
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""
Simple surface plot example
"""
from gr import *
from math import *
x = [-2 + i * 0.5 for i in range(0, 29)]
y = [-7 + i * 0.5 for i in range(0, 29)]
z = list(range(0, 841))
for i in range(0, 29):
for j in range(0, 29):
r1 = sqrt((x[j] - 5)**2 + y[i]**2)
r2 = sqrt((x[j] + 5)**2 +... | 22.72973 | 64 | 0.567182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.135553 |
4b70e648e25de3717c9f7effa2fbe1723459da27 | 344 | py | Python | tests/system/examples/dask/assets/dask_function.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | 1 | 2021-02-17T08:12:33.000Z | 2021-02-17T08:12:33.000Z | tests/system/examples/dask/assets/dask_function.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | 1 | 2020-12-31T14:36:29.000Z | 2020-12-31T14:36:29.000Z | tests/system/examples/dask/assets/dask_function.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | 1 | 2021-08-30T21:43:38.000Z | 2021-08-30T21:43:38.000Z | # function that will be distributed
def inc(x):
return x + 2
# wrapper function, uses the dask client object
def main(context, x=1, y=2):
context.logger.info(f"params: x={x},y={y}")
print(f"params: x={x},y={y}")
x = context.dask_client.submit(inc, x)
print(x)
print(x.result())
context.log_... | 24.571429 | 47 | 0.627907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 129 | 0.375 |
4b714a892a0b336d54d129baf723bfd26bcf8c4a | 1,495 | py | Python | app/core.py | antmicro/raw-image-data-previewer | 1fc14848a27ce628047cf3e473a9f30f83c9892d | [
"Apache-2.0"
] | 5 | 2021-06-08T15:37:23.000Z | 2021-06-10T15:41:21.000Z | app/core.py | antmicro/raw-image-data-previewer | 1fc14848a27ce628047cf3e473a9f30f83c9892d | [
"Apache-2.0"
] | 37 | 2021-03-12T12:48:56.000Z | 2021-12-09T11:41:05.000Z | app/core.py | antmicro/raw-image-data-previewer | 1fc14848a27ce628047cf3e473a9f30f83c9892d | [
"Apache-2.0"
] | 9 | 2021-03-22T14:03:37.000Z | 2021-12-31T07:22:04.000Z | """Main functionalities."""
from .image.image import (Image, RawDataContainer)
from .image.color_format import AVAILABLE_FORMATS
from .parser.factory import ParserFactory
import cv2 as cv
import os
def load_image(file_path, color_format, width):
try:
image = Image.from_file(file_path)
parser = Pa... | 26.22807 | 69 | 0.681605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.08495 |
4b73785d9dd8a4aaaf6a1aac49dbeb16165c0050 | 1,423 | py | Python | demo/demo/urls.py | AlanCoding/Example-Django-App | 1cca52b720d1b117ccce780618d9af94f584ac2c | [
"MIT"
] | null | null | null | demo/demo/urls.py | AlanCoding/Example-Django-App | 1cca52b720d1b117ccce780618d9af94f584ac2c | [
"MIT"
] | null | null | null | demo/demo/urls.py | AlanCoding/Example-Django-App | 1cca52b720d1b117ccce780618d9af94f584ac2c | [
"MIT"
] | null | null | null | """demo URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | 33.093023 | 79 | 0.702741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 886 | 0.622628 |
4b7544498643883f50311519a373ed59f4faa469 | 3,478 | py | Python | app/urls.py | etihadprime/etihadwebclass | 3b46d9068afeb0806198ef08fe26849ab9a09bb9 | [
"Apache-2.0"
] | null | null | null | app/urls.py | etihadprime/etihadwebclass | 3b46d9068afeb0806198ef08fe26849ab9a09bb9 | [
"Apache-2.0"
] | 6 | 2021-03-19T03:55:20.000Z | 2021-09-22T19:06:06.000Z | app/urls.py | etihadprime/etihadwebclass | 3b46d9068afeb0806198ef08fe26849ab9a09bb9 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from .views import teacherregister,studentregister,login_view,logout
from . import views
from .views import (
ClassroomCreateView,ClassroomListView,ClassroomDetailView,ClassroomUpdateView,ClassroomDeleteView,
SubjectCreateView,SubjectListView,SubjectDetailView,SubjectUpdateView,SubjectDelet... | 70.979592 | 115 | 0.648074 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,110 | 0.319149 |
4b76dabace6084b6df07b8d27c9db12c437ca835 | 44,634 | py | Python | qaboard/qa.py | Samsung/qaboard | a2290f33da2bbd87cacf95822e1c85376083dfa1 | [
"Apache-2.0"
] | 51 | 2019-12-02T07:25:58.000Z | 2022-03-23T13:27:11.000Z | qaboard/qa.py | Samsung/qaboard | a2290f33da2bbd87cacf95822e1c85376083dfa1 | [
"Apache-2.0"
] | 25 | 2020-01-20T16:13:49.000Z | 2022-02-19T17:07:38.000Z | qaboard/qa.py | Samsung/qaboard | a2290f33da2bbd87cacf95822e1c85376083dfa1 | [
"Apache-2.0"
] | 15 | 2020-01-17T21:21:17.000Z | 2022-02-23T10:13:48.000Z | #!/usr/bin/env python
"""
CLI tool to runs various tasks related to QA.
"""
import os
import time
from pathlib import Path
import sys
import traceback
import json
import yaml
import uuid
import datetime
import click
from .run import RunContext
from .runners import runners, Job, JobGroup
from .runners.lsf import LsfPr... | 50.720455 | 318 | 0.703992 | 0 | 0 | 0 | 0 | 39,018 | 0.874177 | 0 | 0 | 17,249 | 0.386454 |
4b77f58f441974f14bdaad4bde4687feee866e3a | 5,838 | py | Python | 20210220_simulation_sample/data_handler.py | 3x3x3/Presentations | 3c31b136ed4d9214bb3730fa41a4a575da38edc9 | [
"MIT"
] | null | null | null | 20210220_simulation_sample/data_handler.py | 3x3x3/Presentations | 3c31b136ed4d9214bb3730fa41a4a575da38edc9 | [
"MIT"
] | null | null | null | 20210220_simulation_sample/data_handler.py | 3x3x3/Presentations | 3c31b136ed4d9214bb3730fa41a4a575da38edc9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import threading
import time
import global_def as gd
from db_reader import DbReaderDef, DbReaer
from queue import Queue, Empty
class DataHandlerThd(threading.Thread):
def __init__(self, req_queue: Queue, rcv_queue: Queue, db_host: str, db_port: int, db_user: str, db_pw: str, db_name: str, ... | 32.797753 | 162 | 0.52381 | 5,790 | 0.974092 | 0 | 0 | 0 | 0 | 0 | 0 | 385 | 0.064771 |
4b786431aa3dbf51672c3a6c4d1ccbdb01c1f809 | 7,865 | py | Python | todo/views.py | Azarn/mytodo | 599b5017b9a952100f05a6180dba5bca0823ad70 | [
"Apache-2.0"
] | null | null | null | todo/views.py | Azarn/mytodo | 599b5017b9a952100f05a6180dba5bca0823ad70 | [
"Apache-2.0"
] | null | null | null | todo/views.py | Azarn/mytodo | 599b5017b9a952100f05a6180dba5bca0823ad70 | [
"Apache-2.0"
] | null | null | null | import logging
from rest_framework import mixins, generics, permissions, exceptions
from django.conf import settings
from django.utils import timezone
from .serializers import CategorySerializer, TagSerializer, TodoSerializer
from .models import Category, Tag, Todo
logger = logging.getLogger(__name__)
class MyGen... | 34.047619 | 105 | 0.628608 | 7,537 | 0.958296 | 0 | 0 | 279 | 0.035474 | 0 | 0 | 885 | 0.112524 |
4b7a04ca06d8701872be7f11c6588abbce31dce4 | 16,294 | py | Python | hypothesis/_settings.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | hypothesis/_settings.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | hypothesis/_settings.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # coding=utf-8
#
# This file is part of Hypothesis (https://github.com/DRMacIver/hypothesis)
#
# Most of this work is copyright (C) 2013-2015 David R. MacIver
# (david@drmaciver.com), but it contains contributions by others. See
# https://github.com/DRMacIver/hypothesis/blob/master/CONTRIBUTING.rst for a
# full list of... | 31.334615 | 79 | 0.650669 | 10,162 | 0.623665 | 0 | 0 | 4,463 | 0.273905 | 0 | 0 | 6,233 | 0.382533 |
4b7b56b22f9f50b0ab5dcb31b7bb4cdc39078ed0 | 2,014 | py | Python | 2_writeups/4_other/pdf/pipeline.py | araujorayza/robot_hacking_manual | d11feecc8931b1449b0ab30a51a55f71f51dd965 | [
"Apache-2.0"
] | 141 | 2021-11-14T15:27:04.000Z | 2022-03-30T00:44:48.000Z | 2_writeups/4_other/pdf/pipeline.py | araujorayza/robot_hacking_manual | d11feecc8931b1449b0ab30a51a55f71f51dd965 | [
"Apache-2.0"
] | 1 | 2021-11-17T06:38:44.000Z | 2021-11-17T06:38:45.000Z | 2_writeups/4_other/pdf/pipeline.py | araujorayza/robot_hacking_manual | d11feecc8931b1449b0ab30a51a55f71f51dd965 | [
"Apache-2.0"
] | 18 | 2021-11-15T09:55:48.000Z | 2022-03-08T10:25:58.000Z | """
Script to generate a security pipeline for PDF files.
It does the following:
- Adds specified meta-data
- Encrypts file
Run:
python3 pipeline.py
"""
from PyPDF2 import PdfFileWriter, PdfFileReader
from PyPDF2.generic import NameObject, createStringObject
def encrypt(input_pdf, output_pdf, password):
pdf... | 28.366197 | 77 | 0.682224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 639 | 0.317279 |
4b7c945d6b1d560f6d85d5ab876aed99787d4072 | 1,989 | py | Python | code/MergeTrack/print_max_reid_distance.py | MTonyM/PReMVOS | 3d01f0c6156628083a4c8441b4b57622c500e04e | [
"MIT"
] | 140 | 2018-10-25T11:58:34.000Z | 2022-01-18T15:29:38.000Z | code/MergeTrack/print_max_reid_distance.py | MTonyM/PReMVOS | 3d01f0c6156628083a4c8441b4b57622c500e04e | [
"MIT"
] | 18 | 2018-11-21T04:48:03.000Z | 2020-09-14T09:30:56.000Z | code/MergeTrack/print_max_reid_distance.py | MTonyM/PReMVOS | 3d01f0c6156628083a4c8441b4b57622c500e04e | [
"MIT"
] | 32 | 2018-10-25T11:58:57.000Z | 2021-12-27T06:13:45.000Z | import glob
from numpy.linalg import norm
import numpy as np
from copy import deepcopy as copy
from MergeTrack.merge_functions import read_ann,read_props
from MergeTrack.ReID_net_functions import ReID_net_init, add_ReID
input_images = "DAVIS/val17/"
input_proposals = "DAVIS/ReID_props/"
first_frame_anns = "DAVIS/val1... | 38.25 | 142 | 0.723479 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.201106 |
4b7d11da5ac6e1b0ebc4170e7d035cb4092ec2fa | 1,377 | py | Python | algorithms/tests/test_string_matching.py | t3rm1n4l/python-algorithms | 0fbcb38b26d8690028cd5a676743950fdf3a060f | [
"MIT"
] | 1 | 2018-05-02T07:37:43.000Z | 2018-05-02T07:37:43.000Z | algorithms/tests/test_string_matching.py | t3rm1n4l/python-algorithms | 0fbcb38b26d8690028cd5a676743950fdf3a060f | [
"MIT"
] | null | null | null | algorithms/tests/test_string_matching.py | t3rm1n4l/python-algorithms | 0fbcb38b26d8690028cd5a676743950fdf3a060f | [
"MIT"
] | null | null | null | import unittest
import string_matching
class StringMatchingTest(unittest.TestCase):
def test_string_matching_naive(self):
t = 'ababbababa'
s = 'aba'
self.assertEquals(string_matching.string_matching_naive(t, s), [0, 5, 7])
t = 'ababbababa'
s = 'abbb'
self.assertEq... | 33.585366 | 96 | 0.655773 | 1,287 | 0.934641 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.108932 |
4b7d6c918015930582e1fb1d514d24f1d777be05 | 1,411 | py | Python | molecool_test/tests/test_molecule.py | radifar/molecool_test | 9e0027656d6f68d2efd9cdf8f24872b4bcea6cb9 | [
"BSD-3-Clause"
] | null | null | null | molecool_test/tests/test_molecule.py | radifar/molecool_test | 9e0027656d6f68d2efd9cdf8f24872b4bcea6cb9 | [
"BSD-3-Clause"
] | null | null | null | molecool_test/tests/test_molecule.py | radifar/molecool_test | 9e0027656d6f68d2efd9cdf8f24872b4bcea6cb9 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
import molecool_test
@pytest.fixture
def methane_molecule():
symbols = np.array(['C', 'H', 'H', 'H', 'H'])
coordinates = np.array([
[1, 1, 1],
[2.4, 1, 1],
[-0.4, 1, 1],
[1, 1, 2.4],
[1, 1, -0.4],
])
return symbols, coordinates... | 21.707692 | 81 | 0.697378 | 0 | 0 | 0 | 0 | 263 | 0.186393 | 0 | 0 | 15 | 0.010631 |
4b7e597bab0f3442569b2c0f944ee9a51ebdc5c8 | 5,004 | py | Python | tests/unit/html/test_search_page.py | tttgm/basketball_reference_web_scraper | 2dbd9d7bacbcfee17f08bcf8629bd7d50893761d | [
"MIT"
] | 325 | 2015-10-27T03:15:49.000Z | 2022-03-16T06:49:12.000Z | tests/unit/html/test_search_page.py | tttgm/basketball_reference_web_scraper | 2dbd9d7bacbcfee17f08bcf8629bd7d50893761d | [
"MIT"
] | 173 | 2018-10-16T04:11:05.000Z | 2022-03-29T17:52:08.000Z | tests/unit/html/test_search_page.py | tttgm/basketball_reference_web_scraper | 2dbd9d7bacbcfee17f08bcf8629bd7d50893761d | [
"MIT"
] | 97 | 2016-04-09T19:11:28.000Z | 2022-03-21T09:57:50.000Z | from unittest import TestCase
from unittest.mock import patch, MagicMock, PropertyMock
from basketball_reference_web_scraper.html import SearchPage, PlayerSearchResult
class TestSearchPage(TestCase):
def test_nba_aba_baa_players_content_query(self):
self.assertEqual(
SearchPage(html=MagicMock... | 42.40678 | 116 | 0.711631 | 4,832 | 0.965627 | 0 | 0 | 4,531 | 0.905476 | 0 | 0 | 714 | 0.142686 |
4b7fad07fb9954bb150ff9b9a3fc6a0e8f2cf560 | 19,891 | py | Python | cave/com.raytheon.viz.gfe/localization/gfe/userPython/smartTools/WindGustFromAlgorithm.py | srcarter3/awips2 | 37f31f5e88516b9fd576eaa49d43bfb762e1d174 | [
"Apache-2.0"
] | null | null | null | cave/com.raytheon.viz.gfe/localization/gfe/userPython/smartTools/WindGustFromAlgorithm.py | srcarter3/awips2 | 37f31f5e88516b9fd576eaa49d43bfb762e1d174 | [
"Apache-2.0"
] | null | null | null | cave/com.raytheon.viz.gfe/localization/gfe/userPython/smartTools/WindGustFromAlgorithm.py | srcarter3/awips2 | 37f31f5e88516b9fd576eaa49d43bfb762e1d174 | [
"Apache-2.0"
] | 1 | 2021-10-30T00:03:05.000Z | 2021-10-30T00:03:05.000Z | ##
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to ... | 48.045894 | 195 | 0.42934 | 17,304 | 0.869941 | 0 | 0 | 0 | 0 | 0 | 0 | 12,495 | 0.628174 |
4b7fc93c2e30ca54b02519e2a781a191d7e736a1 | 6,705 | py | Python | pochta/tracking.py | john-phonk/fs-pochta-api | c3b7df4ecdbfc45fb482cedd8ab6c2927e0a1c9d | [
"MIT"
] | 16 | 2019-05-13T01:12:10.000Z | 2022-01-17T06:21:35.000Z | pochta/tracking.py | john-phonk/fs-pochta-api | c3b7df4ecdbfc45fb482cedd8ab6c2927e0a1c9d | [
"MIT"
] | 4 | 2020-03-06T06:46:35.000Z | 2020-11-22T04:24:34.000Z | pochta/tracking.py | john-phonk/fs-pochta-api | c3b7df4ecdbfc45fb482cedd8ab6c2927e0a1c9d | [
"MIT"
] | 6 | 2019-08-10T13:18:21.000Z | 2021-11-25T08:57:30.000Z | from abc import ABC
from typing import List
from zeep import CachingClient, Client, Settings
from .exceptions import APIError
class _BaseClient(ABC):
"""API клиент сервиса отслеживания посылок.
https://tracking.pochta.ru/specification
"""
WSDL = ''
def __init__(self, login: str, password: str... | 40.149701 | 99 | 0.670097 | 9,091 | 0.985154 | 0 | 0 | 0 | 0 | 0 | 0 | 7,109 | 0.770373 |
4b7fd5f816b4e255d1e40adf591dc8b3e21efaa2 | 2,291 | py | Python | CH04_Iterators_and_Generators/4.4.Implementing_the_iterator_protocol.py | Chang-Liu-TAMU/Python-Cookbook-reading | 7b974c32f77b4b3d7cfeed30d1671081057c566f | [
"MIT"
] | null | null | null | CH04_Iterators_and_Generators/4.4.Implementing_the_iterator_protocol.py | Chang-Liu-TAMU/Python-Cookbook-reading | 7b974c32f77b4b3d7cfeed30d1671081057c566f | [
"MIT"
] | null | null | null | CH04_Iterators_and_Generators/4.4.Implementing_the_iterator_protocol.py | Chang-Liu-TAMU/Python-Cookbook-reading | 7b974c32f77b4b3d7cfeed30d1671081057c566f | [
"MIT"
] | null | null | null | # @Time: 2022/4/12 20:50
# @Author: chang liu
# @Email: chang_liu_tamu@gmail.com
# @File:4.4.Implementing_the_iterator_protocol.py
################ clean version #########################
# class Node:
# def __init__(self, val):
# self._value = val
# self._children = []
#
# def __repr__(self):
... | 22.91 | 70 | 0.572676 | 1,340 | 0.584897 | 0 | 0 | 0 | 0 | 0 | 0 | 907 | 0.395897 |
4b800dc76b871db39c746e292171f32b25ee44ff | 29,762 | py | Python | FGPVAE_model.py | metodj/FGP-VAE | 607559ab465b29878f10a5d95b8e3c6ec8d94e0c | [
"MIT"
] | 3 | 2021-01-27T14:06:01.000Z | 2021-09-09T12:10:34.000Z | FGPVAE_model.py | metodj/FGP-VAE | 607559ab465b29878f10a5d95b8e3c6ec8d94e0c | [
"MIT"
] | null | null | null | FGPVAE_model.py | metodj/FGP-VAE | 607559ab465b29878f10a5d95b8e3c6ec8d94e0c | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow_probability as tfp
import numpy as np
import pickle
import random
from utils import gauss_cross_entropy
tfk = tfp.math.psd_kernels
def _add_diagonal_jitter(matrix, jitter=1e-6):
return tf.linalg.set_diag(matrix, tf.linalg.diag_part(matrix) + jitter)
cla... | 42.456491 | 123 | 0.556145 | 14,600 | 0.490558 | 0 | 0 | 1,543 | 0.051845 | 0 | 0 | 8,632 | 0.290034 |
4b81b5fe4aceb22e7a99ad217502d745e5a0019f | 1,069 | py | Python | spotty/commands/abstract_command.py | Inculus/spotty | 56863012668a6c13ad13c2a04f900047e229fbe6 | [
"MIT"
] | 246 | 2018-09-03T09:09:48.000Z | 2020-07-18T21:07:15.000Z | spotty/commands/abstract_command.py | Inculus/spotty | 56863012668a6c13ad13c2a04f900047e229fbe6 | [
"MIT"
] | 42 | 2018-10-09T19:41:56.000Z | 2020-06-15T22:55:58.000Z | spotty/commands/abstract_command.py | Inculus/spotty | 56863012668a6c13ad13c2a04f900047e229fbe6 | [
"MIT"
] | 27 | 2018-10-09T22:16:40.000Z | 2020-06-08T22:26:00.000Z | from abc import ABC, abstractmethod
from argparse import Namespace, ArgumentParser
from spotty.commands.writers.abstract_output_writrer import AbstractOutputWriter
class AbstractCommand(ABC):
"""Abstract class for a Spotty sub-command."""
@property
@abstractmethod
def name(self) -> str:
"""Th... | 30.542857 | 93 | 0.654818 | 902 | 0.843779 | 0 | 0 | 612 | 0.572498 | 0 | 0 | 454 | 0.424696 |
4b849b209996da99ee667a5b45419939d4653d3a | 9,495 | py | Python | tests/test_protocols/test_generator.py | cyenyxe/agents-aea | c2aec9127028ae13def3f69fbc80d35400de1565 | [
"Apache-2.0"
] | null | null | null | tests/test_protocols/test_generator.py | cyenyxe/agents-aea | c2aec9127028ae13def3f69fbc80d35400de1565 | [
"Apache-2.0"
] | 1 | 2020-02-21T14:28:13.000Z | 2020-03-05T14:53:53.000Z | tests/test_protocols/test_generator.py | cyenyxe/agents-aea | c2aec9127028ae13def3f69fbc80d35400de1565 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# 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 ... | 45.214286 | 128 | 0.685519 | 2,705 | 0.284887 | 0 | 0 | 2,195 | 0.231174 | 0 | 0 | 7,697 | 0.810637 |
4b86ef7acd08f81f39f9fde4c5d2779a3995da3e | 6,981 | py | Python | tabfkioskgoogledrive/MyGDTest3.py | isalan06/myflaskapiserver | 2922f62c9b9ede2b6cba2db774e924b226a120f7 | [
"MIT"
] | null | null | null | tabfkioskgoogledrive/MyGDTest3.py | isalan06/myflaskapiserver | 2922f62c9b9ede2b6cba2db774e924b226a120f7 | [
"MIT"
] | null | null | null | tabfkioskgoogledrive/MyGDTest3.py | isalan06/myflaskapiserver | 2922f62c9b9ede2b6cba2db774e924b226a120f7 | [
"MIT"
] | null | null | null | import os.path
import os
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from datetime import datetime
# If modifying these scopes, delete the file token.json.
SCOPES ... | 37.331551 | 104 | 0.578284 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,228 | 0.318059 |
4b8822ba30ebfce8e71617e36c3ea7b8cc487de1 | 46 | py | Python | qarithmetic/__init__.py | daniil-lyakhov/QArithmetic | 7a5df9504e17c1979107c119bbaf0c5b2750a619 | [
"Apache-2.0"
] | null | null | null | qarithmetic/__init__.py | daniil-lyakhov/QArithmetic | 7a5df9504e17c1979107c119bbaf0c5b2750a619 | [
"Apache-2.0"
] | null | null | null | qarithmetic/__init__.py | daniil-lyakhov/QArithmetic | 7a5df9504e17c1979107c119bbaf0c5b2750a619 | [
"Apache-2.0"
] | null | null | null | from .QArithmetic import *
from .qft import *
| 15.333333 | 26 | 0.73913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4b88bb3938cbed6bd9ddf6e52090c0d588399179 | 2,631 | py | Python | clustering/conditional_probs.py | griffij/QuakeRates | 70069bb271a1987e72fcbdf3aa0c0a8a79591580 | [
"Apache-2.0"
] | null | null | null | clustering/conditional_probs.py | griffij/QuakeRates | 70069bb271a1987e72fcbdf3aa0c0a8a79591580 | [
"Apache-2.0"
] | null | null | null | clustering/conditional_probs.py | griffij/QuakeRates | 70069bb271a1987e72fcbdf3aa0c0a8a79591580 | [
"Apache-2.0"
] | null | null | null | """Calculate conditional probability of a short interevent
time being followed by another short interevent time, compared
with the unconditional probability.
This is used to test whether fault records have memory
"""
import os, sys
from glob import glob
import numpy as np
import matplotlib.pyplot as plt
from QuakeRat... | 36.541667 | 84 | 0.707336 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 734 | 0.278981 |
4b8d4301cde6fb6de24f8efb96ff5081761e33de | 643 | py | Python | Computer Science/Development/GUI/robo_controls.py | zbendt/ECE-Capstone-Project | 1bafc61f896191ccd5a843980500fb4b8bbeb8bd | [
"MIT"
] | null | null | null | Computer Science/Development/GUI/robo_controls.py | zbendt/ECE-Capstone-Project | 1bafc61f896191ccd5a843980500fb4b8bbeb8bd | [
"MIT"
] | null | null | null | Computer Science/Development/GUI/robo_controls.py | zbendt/ECE-Capstone-Project | 1bafc61f896191ccd5a843980500fb4b8bbeb8bd | [
"MIT"
] | null | null | null | import time
#Controls functions for the delta
sleep_time = 0.5
def turn_on_vacuum():
print("Turning on vacuum pump")
def pickup():
print("Picking up sample...")
time.sleep(sleep_time)
def drop():
print("Dropping sample...")
time.sleep(sleep_time)
def move_to_start():
... | 20.09375 | 37 | 0.634526 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.29549 |
4b8e4f10e68bbf6b6e9801bf943ec3cb8b4d1bf7 | 3,120 | py | Python | src/dynamic_programming/basic_scripts/value_iteration.py | johannesharmse/move_37_course | a2060129cbc6fb651113aa18f1a6ea2673845182 | [
"MIT"
] | 1 | 2019-03-13T06:29:54.000Z | 2019-03-13T06:29:54.000Z | src/dynamic_programming/basic_scripts/value_iteration.py | johannesharmse/move_37_course | a2060129cbc6fb651113aa18f1a6ea2673845182 | [
"MIT"
] | null | null | null | src/dynamic_programming/basic_scripts/value_iteration.py | johannesharmse/move_37_course | a2060129cbc6fb651113aa18f1a6ea2673845182 | [
"MIT"
] | null | null | null | # From The School of AI's Move 37 Course https://www.theschool.ai/courses/move-37-course/
# Coding demo by Colin Skow
# Forked from https://github.com/lazyprogrammer/machine_learning_examples/tree/master/rl
# Credit goes to LazyProgrammer
from __future__ import print_function, division
from builtins import range
# Note... | 31.515152 | 89 | 0.709936 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,329 | 0.425962 |
4b8f66af4fc844e8c289287b2a2bc4ba119f529e | 19,238 | py | Python | photoplace/addons/CSVImport/GTKcsvimport.py | jriguera/photoplace | 93674ef8531d0e5b8f26de9ba568ed8e115b27e1 | [
"Apache-2.0"
] | 10 | 2015-02-20T19:01:19.000Z | 2021-12-13T23:07:19.000Z | photoplace/addons/CSVImport/GTKcsvimport.py | jriguera/photoplace | 93674ef8531d0e5b8f26de9ba568ed8e115b27e1 | [
"Apache-2.0"
] | 1 | 2020-06-16T13:23:05.000Z | 2021-02-13T14:14:57.000Z | photoplace/addons/CSVImport/GTKcsvimport.py | jriguera/photoplace | 93674ef8531d0e5b8f26de9ba568ed8e115b27e1 | [
"Apache-2.0"
] | 4 | 2017-03-28T23:06:14.000Z | 2019-09-25T07:59:36.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GTKcsvimport.py
#
# Copyright 2010-2015 Jose Riguera Lopez <jriguera@gmail.com>
#
# 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... | 39.995842 | 218 | 0.615501 | 17,159 | 0.891933 | 0 | 0 | 0 | 0 | 0 | 0 | 2,542 | 0.132134 |
4b8fcf8f0fe4212ea52ae11e77f6cd66ebb3437f | 9,024 | py | Python | src/opt_utils.py | mateuszz0000/POSA | 1295065251dd22c89d923fbff7d8bf4c53339d95 | [
"CNRI-Python",
"Xnet",
"Info-ZIP",
"X11"
] | 71 | 2021-05-02T21:40:29.000Z | 2022-03-30T03:52:01.000Z | src/opt_utils.py | mateuszz0000/POSA | 1295065251dd22c89d923fbff7d8bf4c53339d95 | [
"CNRI-Python",
"Xnet",
"Info-ZIP",
"X11"
] | 4 | 2021-06-18T06:31:29.000Z | 2021-12-07T07:29:21.000Z | src/opt_utils.py | mateuszz0000/POSA | 1295065251dd22c89d923fbff7d8bf4c53339d95 | [
"CNRI-Python",
"Xnet",
"Info-ZIP",
"X11"
] | 10 | 2021-05-08T08:16:31.000Z | 2022-02-17T04:40:30.000Z | # -*- coding: utf-8 -*-
# Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is
# holder of all proprietary rights on this computer program.
# You can only use this computer program if you have closed
# a license agreement with MPG or you get the right to use the computer
# program from someone who is... | 47 | 120 | 0.625332 | 3,983 | 0.441232 | 0 | 0 | 0 | 0 | 0 | 0 | 1,020 | 0.112994 |
4b90f733d945576384389e3af5e8eb7b26b24785 | 137 | py | Python | gan_provider.py | jiameng1010/pointNet | 17d230f46f64136baba2c3d6cb7f05ab4bbb9f31 | [
"MIT"
] | null | null | null | gan_provider.py | jiameng1010/pointNet | 17d230f46f64136baba2c3d6cb7f05ab4bbb9f31 | [
"MIT"
] | null | null | null | gan_provider.py | jiameng1010/pointNet | 17d230f46f64136baba2c3d6cb7f05ab4bbb9f31 | [
"MIT"
] | 1 | 2019-02-03T12:19:36.000Z | 2019-02-03T12:19:36.000Z | from tensorflow.contrib.slim.python.slim.data import data_provider
from tensorflow.contrib.slim.python.slim.data import parallel_reader
| 34.25 | 68 | 0.861314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4b91ba97fda9b2ee93796afb30a9ecc697c21159 | 1,205 | py | Python | script.module.placenta/lib/resources/lib/modules/thexem.py | parser4life/tantrumrepo | 3b37145f4772409e538cbddb0b7aa23be525772a | [
"Beerware"
] | 1 | 2021-05-09T19:55:51.000Z | 2021-05-09T19:55:51.000Z | script.module.placenta/lib/resources/lib/modules/thexem.py | parser4life/tantrumrepo | 3b37145f4772409e538cbddb0b7aa23be525772a | [
"Beerware"
] | null | null | null | script.module.placenta/lib/resources/lib/modules/thexem.py | parser4life/tantrumrepo | 3b37145f4772409e538cbddb0b7aa23be525772a | [
"Beerware"
] | 2 | 2020-04-01T22:11:12.000Z | 2020-05-07T23:54:52.000Z | # -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @tantrumdev wrote this file. As long as you retain this notice you
# can do whatever you want wit... | 36.515152 | 100 | 0.480498 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 790 | 0.655602 |
4b92d579f1edf869213b966f3c57e11cb659219d | 1,048 | py | Python | Day18/main.py | MHKomeili/100DaysofCode | a5799011a43f777ddc5ac9e649aa27291313b62b | [
"MIT"
] | null | null | null | Day18/main.py | MHKomeili/100DaysofCode | a5799011a43f777ddc5ac9e649aa27291313b62b | [
"MIT"
] | null | null | null | Day18/main.py | MHKomeili/100DaysofCode | a5799011a43f777ddc5ac9e649aa27291313b62b | [
"MIT"
] | null | null | null | # import colorgram
#
# colors = colorgram.extract('image.jpg', 30)
# rgb_colors = []
# for color in colors:
# rgb_colors.append((color.rgb.r, color.rgb.g, color.rgb.b))
#
# print(rgb_colors)
from turtle import Turtle, Screen
import random
color_list = [(238, 251, 245), (250, 228, 15), (213, 12, 8), (199, 11, 36),... | 31.757576 | 119 | 0.540076 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 187 | 0.178435 |
4b9490ebcc233667c0f331f949a3dfce27be8b1f | 8,723 | py | Python | hirebob/portal/forms.py | shantanub0/hirebob | 5a55e97c6e220059964fbb55439b0189abae1307 | [
"MIT"
] | null | null | null | hirebob/portal/forms.py | shantanub0/hirebob | 5a55e97c6e220059964fbb55439b0189abae1307 | [
"MIT"
] | 1 | 2018-06-23T01:20:26.000Z | 2018-06-25T21:49:17.000Z | hirebob/portal/forms.py | shantanub0/hirebob | 5a55e97c6e220059964fbb55439b0189abae1307 | [
"MIT"
] | 1 | 2018-06-14T12:11:59.000Z | 2018-06-14T12:11:59.000Z | from django import forms
from .models import UserAccount, JobPost, JobPostActivity, UserProfile
class FormUserCreation(forms.ModelForm):
UserTypes = ((1, 'Applicants'), (2, 'Organisations'))
user_type = forms.ChoiceField(choices=UserTypes,
widget=forms.Select(attrs={'class': ... | 56.642857 | 129 | 0.458558 | 8,606 | 0.986587 | 0 | 0 | 0 | 0 | 0 | 0 | 2,168 | 0.248538 |
4b95d82a263834a4e169c435b74dfded71be2e85 | 5,538 | py | Python | siemstress/trigger.py | dogoncouch/siemstress | be7f60bb0228a886d48deb4f46309be7fb8aa0af | [
"MIT"
] | 28 | 2017-08-14T12:41:56.000Z | 2022-02-18T01:18:11.000Z | siemstress/trigger.py | dogoncouch/siemstress | be7f60bb0228a886d48deb4f46309be7fb8aa0af | [
"MIT"
] | 1 | 2017-08-23T10:47:16.000Z | 2017-08-24T18:52:48.000Z | siemstress/trigger.py | dogoncouch/siemstress | be7f60bb0228a886d48deb4f46309be7fb8aa0af | [
"MIT"
] | 6 | 2018-01-07T11:42:18.000Z | 2020-06-08T00:04:57.000Z | #!/usr/bin/env python
#_MIT License
#_
#_Copyright (c) 2017 Dan Persons (dpersonsdev@gmail.com)
#_
#_Permission is hereby granted, free of charge, to any person obtaining a copy
#_of this software and associated documentation files (the "Software"), to deal
#_in the Software without restriction, including without limi... | 34.397516 | 81 | 0.548754 | 3,536 | 0.638498 | 0 | 0 | 0 | 0 | 0 | 0 | 2,094 | 0.378115 |
4b996a561c6739777af3fa1902cca7e146f0eeaf | 687 | py | Python | TianJiPlanBackend/authentication/migrations/0002_auto_20210912_0929.py | weridolin/tianji-plan | b98a49d92ee2a365095f9e15f4231f5178aca1c0 | [
"Apache-2.0"
] | null | null | null | TianJiPlanBackend/authentication/migrations/0002_auto_20210912_0929.py | weridolin/tianji-plan | b98a49d92ee2a365095f9e15f4231f5178aca1c0 | [
"Apache-2.0"
] | null | null | null | TianJiPlanBackend/authentication/migrations/0002_auto_20210912_0929.py | weridolin/tianji-plan | b98a49d92ee2a365095f9e15f4231f5178aca1c0 | [
"Apache-2.0"
] | 1 | 2021-12-07T11:45:13.000Z | 2021-12-07T11:45:13.000Z | # Generated by Django 3.2.7 on 2021-09-12 01:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authentication', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='userprofile',
name='mail',
... | 28.625 | 122 | 0.615721 | 602 | 0.866187 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.195683 |
4b9aca9719a2480581a602385b8fda1e00bcfadc | 3,040 | py | Python | ooobuild/lo/util/time_with_timezone.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/util/time_with_timezone.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/util/time_with_timezone.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 30.4 | 190 | 0.650329 | 2,174 | 0.715132 | 0 | 0 | 706 | 0.232237 | 0 | 0 | 1,738 | 0.571711 |
4b9af91c0efeb81facf6d27474553a4bb9a6505d | 2,025 | py | Python | tests/unit_tests/tasks/fortran/test_fortran_compiler.py | bblay/fab | bbdac7bae20c5b8695a2d56945c9593b4fda9c74 | [
"BSD-3-Clause"
] | null | null | null | tests/unit_tests/tasks/fortran/test_fortran_compiler.py | bblay/fab | bbdac7bae20c5b8695a2d56945c9593b4fda9c74 | [
"BSD-3-Clause"
] | null | null | null | tests/unit_tests/tasks/fortran/test_fortran_compiler.py | bblay/fab | bbdac7bae20c5b8695a2d56945c9593b4fda9c74 | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
from unittest import mock
import pytest
from fab.build_config import AddFlags
from fab.dep_tree import AnalysedFile
from fab.steps.compile_fortran import CompileFortran
# todo: we might have liked to reuse this from test_dep_tree
from fab.util import CompiledFile
@pytest.fixture
def src_tre... | 38.942308 | 112 | 0.651852 | 1,116 | 0.551111 | 0 | 0 | 612 | 0.302222 | 0 | 0 | 483 | 0.238519 |
4b9cdb57c833e7e628efc0c75d61d7090e29a276 | 393 | py | Python | exercicios/Lista6/Q5.py | AlexandrePeBrito/CursoUdemyPython | 3de58cb30c9f333b32078309847179ff3f9d7e22 | [
"MIT"
] | null | null | null | exercicios/Lista6/Q5.py | AlexandrePeBrito/CursoUdemyPython | 3de58cb30c9f333b32078309847179ff3f9d7e22 | [
"MIT"
] | null | null | null | exercicios/Lista6/Q5.py | AlexandrePeBrito/CursoUdemyPython | 3de58cb30c9f333b32078309847179ff3f9d7e22 | [
"MIT"
] | null | null | null | """ 5. Faça um programa que receba do usuário um arquivo texto e um caracter. Mostre na tela
quantas vezes aquele caractere ocorre dentro do arquivo.
"""
arquivo=open('CursoUdemyPython/exercicios/Lista6/arq.txt')
texto=arquivo.read()
carac=input('Informe um caractere: ')
ca=0
for c in texto:
if(c == carac):
... | 28.071429 | 92 | 0.725191 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 264 | 0.668354 |
4b9e62db340ea51b4cda5971027dcd23a1f17c3d | 3,704 | py | Python | superset_config.py | mikiec84/incubator-superset | 3a1c32ae2378902a26873113d98bd55d290233ca | [
"Apache-2.0"
] | 1 | 2020-08-07T16:30:54.000Z | 2020-08-07T16:30:54.000Z | superset_config.py | mikiec84/incubator-superset | 3a1c32ae2378902a26873113d98bd55d290233ca | [
"Apache-2.0"
] | null | null | null | superset_config.py | mikiec84/incubator-superset | 3a1c32ae2378902a26873113d98bd55d290233ca | [
"Apache-2.0"
] | 1 | 2020-08-07T16:30:58.000Z | 2020-08-07T16:30:58.000Z | #---------------------------------------------------------
# Superset specific config
#---------------------------------------------------------
ROW_LIMIT = 5000
SUPERSET_WEBSERVER_PORT = 8088
#---------------------------------------------------------
#---------------------------------------------------------
# Flask... | 35.615385 | 107 | 0.551836 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,529 | 0.952754 |
4b9ee2812f3c3d983291b0a7f5a83dcf6f853ee4 | 5,038 | py | Python | python_code/yolo/extract_car_num.py | mukulbhave/tensorflow | 848b16fa32cd0f180ab80a98254edd2147ea3948 | [
"CNRI-Python"
] | null | null | null | python_code/yolo/extract_car_num.py | mukulbhave/tensorflow | 848b16fa32cd0f180ab80a98254edd2147ea3948 | [
"CNRI-Python"
] | null | null | null | python_code/yolo/extract_car_num.py | mukulbhave/tensorflow | 848b16fa32cd0f180ab80a98254edd2147ea3948 | [
"CNRI-Python"
] | null | null | null | import argparse
import cv2
import re
import numpy as np
import string
import PIL
import os,glob
import ntpath
import time
import matplotlib.pyplot as plt
from PIL import Image
from yad2k.models.keras_yolo import (preprocess_true_boxes, yolo_body,
yolo_eval, yolo_head, yolo_loss)
fr... | 39.984127 | 133 | 0.639936 | 4,294 | 0.852322 | 0 | 0 | 0 | 0 | 0 | 0 | 581 | 0.115324 |
4ba04308181ebd07871e89cce3a567b034f969f9 | 2,881 | py | Python | examples/time_frequency/plot_tfr_topography.py | Anevar/mne-python | 15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb | [
"BSD-3-Clause"
] | 2 | 2015-09-27T20:33:49.000Z | 2020-04-22T19:10:56.000Z | examples/time_frequency/plot_tfr_topography.py | Anevar/mne-python | 15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb | [
"BSD-3-Clause"
] | null | null | null | examples/time_frequency/plot_tfr_topography.py | Anevar/mne-python | 15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb | [
"BSD-3-Clause"
] | 1 | 2018-09-15T09:45:38.000Z | 2018-09-15T09:45:38.000Z | """
===================================================================
Plot time-frequency representations on topographies for MEG sensors
===================================================================
Both induced power and phase locking values are displayed.
"""
print(__doc__)
# Authors: Alexandre Gramfort <g... | 35.567901 | 79 | 0.591461 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,377 | 0.477959 |
4ba39b6087c75616c2877cb61a2b0736b03e97e4 | 2,201 | py | Python | A1/greenHouseBluetooth.py | rmit-s3559384-andrew-alvaro/IoT | ec444d0b037ddbd2e3aab01c34ea57fd2bd51d5f | [
"MIT"
] | null | null | null | A1/greenHouseBluetooth.py | rmit-s3559384-andrew-alvaro/IoT | ec444d0b037ddbd2e3aab01c34ea57fd2bd51d5f | [
"MIT"
] | 1 | 2021-06-01T23:39:58.000Z | 2021-06-01T23:39:58.000Z | A1/greenHouseBluetooth.py | AndrewAlvaro/IoT | ec444d0b037ddbd2e3aab01c34ea57fd2bd51d5f | [
"MIT"
] | null | null | null | import bluetooth
import sys, os
import subprocess as sp
import datetime
from pushBulletForBluetooth import pushNotification
from makeReminderforBluetooth import Reminder
import csv
class blueDev:
def findmyDevice(self):
sendPushBullet = pushNotification()
timestamp = datetime.datetime.now()... | 31 | 103 | 0.52567 | 1,851 | 0.840981 | 0 | 0 | 0 | 0 | 0 | 0 | 236 | 0.107224 |
4ba3e0dab8146008256a0da74d6aec2d33aa11e9 | 127 | py | Python | appending_to_files.py | jaiminjerry/Python | eb7013c7560b09d37849d653516257d939e143aa | [
"bzip2-1.0.6"
] | null | null | null | appending_to_files.py | jaiminjerry/Python | eb7013c7560b09d37849d653516257d939e143aa | [
"bzip2-1.0.6"
] | null | null | null | appending_to_files.py | jaiminjerry/Python | eb7013c7560b09d37849d653516257d939e143aa | [
"bzip2-1.0.6"
] | 1 | 2021-08-17T03:46:56.000Z | 2021-08-17T03:46:56.000Z | appendMe = '\nNew bit of information'
appendFile = open('example.txt','a')
appendFile.write(appendMe)
appendFile.close()
| 21.166667 | 38 | 0.716535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.330709 |
4ba4c531fc5b73ca047fb0191f3bbb5ca13cf62d | 209 | py | Python | udacity/cloud-native-application-architecture/3-message-passing/lesson-3-implementing-message-passing/kafka-python-demo/producer.py | thomasrobertz/mooc | cb87365bfcbe8ccf972f36d70a251c73b3c15a7b | [
"MIT"
] | null | null | null | udacity/cloud-native-application-architecture/3-message-passing/lesson-3-implementing-message-passing/kafka-python-demo/producer.py | thomasrobertz/mooc | cb87365bfcbe8ccf972f36d70a251c73b3c15a7b | [
"MIT"
] | 13 | 2021-12-14T20:59:34.000Z | 2022-03-02T11:09:34.000Z | udacity/cloud-native-application-architecture/3-message-passing/lesson-3-implementing-message-passing/kafka-python-demo/producer.py | thomasrobertz/mooc | cb87365bfcbe8ccf972f36d70a251c73b3c15a7b | [
"MIT"
] | 1 | 2020-08-20T12:53:43.000Z | 2020-08-20T12:53:43.000Z | from kafka import KafkaProducer
TOPIC_NAME = 'items'
KAFKA_SERVER = 'localhost:9092'
producer = KafkaProducer(bootstrap_servers=KAFKA_SERVER)
producer.send(TOPIC_NAME, b'Test Message!!!')
producer.flush()
| 19 | 56 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.196172 |
4ba509cf1a05cf33bf195b861b6306f41e7b81ea | 954 | py | Python | myfitnesspal_to_sqlite/cli.py | seeM/myfitnesspal-to-sqlite | ce4c133009cbeacd5fa5410016f81f5eb45e7a64 | [
"Apache-2.0"
] | 4 | 2021-07-14T17:31:40.000Z | 2021-12-03T21:50:09.000Z | myfitnesspal_to_sqlite/cli.py | seeM/myfitnesspal-to-sqlite | ce4c133009cbeacd5fa5410016f81f5eb45e7a64 | [
"Apache-2.0"
] | null | null | null | myfitnesspal_to_sqlite/cli.py | seeM/myfitnesspal-to-sqlite | ce4c133009cbeacd5fa5410016f81f5eb45e7a64 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
import myfitnesspal
import sqlite_utils
import click
from . import utils
@click.group()
@click.version_option()
def cli():
"Save data from MyFitnessPal to a SQLite database"
@cli.command()
@click.argument(
"db_path",
type=click.Path(file_okay=True, dir_okay=False, allow_das... | 21.2 | 82 | 0.705451 | 0 | 0 | 0 | 0 | 845 | 0.885744 | 0 | 0 | 164 | 0.171908 |
4ba51c782d7e269031d5abf6080e2a03357844fd | 849 | py | Python | mcir/t1_hist.py | omritomer/mcir | 1554d352172464c6314339195d6ea9a5e00824af | [
"MIT"
] | null | null | null | mcir/t1_hist.py | omritomer/mcir | 1554d352172464c6314339195d6ea9a5e00824af | [
"MIT"
] | null | null | null | mcir/t1_hist.py | omritomer/mcir | 1554d352172464c6314339195d6ea9a5e00824af | [
"MIT"
] | null | null | null | import numpy as np
class T1Hist:
def __init__(
self, max_t1: float = 3000, min_t1: float = 200
):
self.max_t1 = max_t1
self.min_t1 = min_t1
def get_t1_histogram(self, t1_matrix: np.ndarray, norm_m0_matrix: np.ndarray):
t1_histogram = t1_matrix.astype(float).ravel()
... | 30.321429 | 82 | 0.61013 | 827 | 0.974087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4ba5d882b2fc5de31e1705b7b18a845f264237e7 | 209 | py | Python | main.py | Javert899/pm4py-tool-plugin-skeleton | cfc4aefd02499b323ae60e33f059a6b90e48a95f | [
"MIT"
] | null | null | null | main.py | Javert899/pm4py-tool-plugin-skeleton | cfc4aefd02499b323ae60e33f059a6b90e48a95f | [
"MIT"
] | null | null | null | main.py | Javert899/pm4py-tool-plugin-skeleton | cfc4aefd02499b323ae60e33f059a6b90e48a95f | [
"MIT"
] | null | null | null | import pluginpackageRENAME
import preload
import os
if __name__ == "__main__":
preload.preload()
app = pluginpackageRENAME.app
app.static_folder = os.path.join(os.getcwd(), "html")
app.run()
| 19 | 57 | 0.703349 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.076555 |
4ba61c47eb12a3d8f57c257b4b752059384399df | 6,948 | py | Python | plot_curve.py | wenhuchen/Hierarchical-DSA | 2dbdacde25ee82c9d42fe980694673d285b1f7f3 | [
"MIT"
] | 45 | 2019-02-27T02:04:08.000Z | 2022-03-21T04:49:22.000Z | plot_curve.py | wenhuchen/Hierarchical-DSA | 2dbdacde25ee82c9d42fe980694673d285b1f7f3 | [
"MIT"
] | 2 | 2019-08-18T03:05:11.000Z | 2020-07-26T13:45:05.000Z | plot_curve.py | wenhuchen/Hierarchical-DSA | 2dbdacde25ee82c9d42fe980694673d285b1f7f3 | [
"MIT"
] | 4 | 2019-03-12T17:40:12.000Z | 2021-06-10T07:59:39.000Z | import matplotlib.pyplot as plt
import numpy as np
import math
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
import json
from scipy.interpolate import interp1d
from data_utils import *
def integral(y, x):
area = 0
for xi, xj, yi, yj in zip(x[:-1], x[1:], y[:-1], y[1:]):
ar... | 29.692308 | 105 | 0.598877 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,954 | 0.281232 |
4ba90d216dd9521bb1b314598a55d371117b4821 | 8,392 | py | Python | alipay/aop/api/domain/CircleRecommendItemDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/CircleRecommendItemDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/CircleRecommendItemDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AoiInfoDTO import AoiInfoDTO
from alipay.aop.api.domain.ItemStoreDTO import ItemStoreDTO
class CircleRecommendItemDTO(object):
def __init__(self):
self._aoi_info = No... | 32.401544 | 83 | 0.596282 | 8,159 | 0.972235 | 0 | 0 | 3,824 | 0.455672 | 0 | 0 | 1,040 | 0.123928 |
4bab64e23dd52a8b7e2e5474ebad268f962e7d94 | 3,599 | py | Python | vmcasterpub/uploader_dcap.py | hepix-virtualisation/vmcaster | f4ef1c65bbb81b82aa72a0cd1afc1aa6cf13eb51 | [
"Apache-2.0"
] | null | null | null | vmcasterpub/uploader_dcap.py | hepix-virtualisation/vmcaster | f4ef1c65bbb81b82aa72a0cd1afc1aa6cf13eb51 | [
"Apache-2.0"
] | null | null | null | vmcasterpub/uploader_dcap.py | hepix-virtualisation/vmcaster | f4ef1c65bbb81b82aa72a0cd1afc1aa6cf13eb51 | [
"Apache-2.0"
] | null | null | null | import subprocess
import time
import logging
import os
import signal
log = logging.getLogger(__name__)
def runpreloadcommand(cmd,timeout,preload):
newenv = dict(os.environ)
newenv["LD_PRELOAD"] = preload
process = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE,env=new... | 31.025862 | 108 | 0.594054 | 1,746 | 0.485135 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.06474 |
4babaa82bca32126bf21a61b9966b1e6ecb0d62c | 3,923 | py | Python | drones/serializers.py | maprezdev/restfuldrones | 9448a63b148cdf7da8f46d65067ddbb8773e2fd2 | [
"MIT"
] | null | null | null | drones/serializers.py | maprezdev/restfuldrones | 9448a63b148cdf7da8f46d65067ddbb8773e2fd2 | [
"MIT"
] | null | null | null | drones/serializers.py | maprezdev/restfuldrones | 9448a63b148cdf7da8f46d65067ddbb8773e2fd2 | [
"MIT"
] | null | null | null | # drones/serializers.py file
from rest_framework import serializers
from drones.models import DroneCategory, Drone, Pilot, Competition
from django.contrib.auth.models import User
import drones.views
class UserDroneSerializer(serializers.HyperlinkedModelSerializer):
"""serialize the drones related to a User"""
... | 29.946565 | 100 | 0.617894 | 3,704 | 0.944175 | 0 | 0 | 0 | 0 | 0 | 0 | 1,470 | 0.374713 |
4baef5968ecd4571dc42ca2e3a144059ebfa9562 | 1,471 | py | Python | Calamous.py | Studio-Pasteque/Pokemon | 6b9f457eef8a2dc28cb8b9b69527404b47c9825a | [
"MIT"
] | 2 | 2020-05-27T08:27:58.000Z | 2020-05-27T09:31:45.000Z | Calamous.py | Studio-Pasteque/Pokemon | 6b9f457eef8a2dc28cb8b9b69527404b47c9825a | [
"MIT"
] | null | null | null | Calamous.py | Studio-Pasteque/Pokemon | 6b9f457eef8a2dc28cb8b9b69527404b47c9825a | [
"MIT"
] | null | null | null |
import learnables.py
# création d'un objet Calamous
class Calamous:
#définition de son type et de si c'est un pokémon
pokemon = True
type_ = "Water"
# définition de ses talents et de son genre (qui seront random)
abilities = "Multicule" or "Glissade" or "Protéen"
gender = "M" or "F"
... | 27.754717 | 114 | 0.56968 | 1,434 | 0.960482 | 0 | 0 | 0 | 0 | 0 | 0 | 647 | 0.433356 |
4bb0265f943903e9ce05ffd83240a67916be1de6 | 5,186 | py | Python | scripts/utils.py | alterapars/drought_classification | 585aaed3f00d5835059be1c80ad998189d9726f7 | [
"MIT"
] | 1 | 2022-02-19T11:42:24.000Z | 2022-02-19T11:42:24.000Z | scripts/utils.py | alterapars/drought_classification | 585aaed3f00d5835059be1c80ad998189d9726f7 | [
"MIT"
] | null | null | null | scripts/utils.py | alterapars/drought_classification | 585aaed3f00d5835059be1c80ad998189d9726f7 | [
"MIT"
] | 2 | 2022-02-02T08:24:37.000Z | 2022-02-03T12:27:05.000Z | import random
import matplotlib.pyplot as plt
import numpy as np
from scipy import stats
############################ STATS input data ################################################
def return_nan_percentage(input_data):
"""
prints percentage of nan values in max. 3D sized array
Parameters
-----... | 26.459184 | 94 | 0.633822 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,724 | 0.52526 |
4bb0f0499ca35cb26e70156806115a77ce9290c6 | 1,382 | py | Python | 2021/day8/2.py | tomhel/AoC_2019 | c76c34235821864bc763f85d43cbcbfb9ed43469 | [
"MIT"
] | 1 | 2021-12-07T13:18:52.000Z | 2021-12-07T13:18:52.000Z | 2021/day8/2.py | tomhel/AoC | c76c34235821864bc763f85d43cbcbfb9ed43469 | [
"MIT"
] | null | null | null | 2021/day8/2.py | tomhel/AoC | c76c34235821864bc763f85d43cbcbfb9ed43469 | [
"MIT"
] | null | null | null | def load():
with open("input") as f:
for x in f:
a, b, = x.strip().split("|")
yield {frozenset(x) for x in a.strip().split()}, [frozenset(x) for x in b.strip().split()]
def decode_signal(signal):
num = {}
while len(num) < 10:
for x in signal.difference(num.values()... | 28.791667 | 102 | 0.447902 | 0 | 0 | 204 | 0.147612 | 0 | 0 | 0 | 0 | 12 | 0.008683 |
4bb35fc82ab5a2d2bc09de6a0496b0c17ea21b52 | 2,469 | py | Python | Grove_Base_Hat_for_RPI/grove.py-master/grove/button/button.py | tcmoore/RPI-Environmental-Controller | 7f28dcdf08c51db8400ccc0369eb049fdce5e901 | [
"Unlicense",
"MIT"
] | 5 | 2019-11-18T02:26:18.000Z | 2021-02-06T20:31:37.000Z | Grove_Base_Hat_for_RPI/grove.py-master/grove/button/button.py | tcmoore/RPI-Environmental-Controller | 7f28dcdf08c51db8400ccc0369eb049fdce5e901 | [
"Unlicense",
"MIT"
] | null | null | null | Grove_Base_Hat_for_RPI/grove.py-master/grove/button/button.py | tcmoore/RPI-Environmental-Controller | 7f28dcdf08c51db8400ccc0369eb049fdce5e901 | [
"Unlicense",
"MIT"
] | 1 | 2020-08-26T10:22:37.000Z | 2020-08-26T10:22:37.000Z | #!/usr/bin/env python
#
# This is the library for Grove Base Hat.
#
# Button Base Class
#
'''
## License
The MIT License (MIT)
Grove Base Hat for the Raspberry Pi, used to connect grove sensors.
Copyright (C) 2018 Seeed Technology Co.,Ltd.
Permission is hereby granted, free of charge, to any person... | 31.253165 | 78 | 0.64439 | 1,159 | 0.469421 | 0 | 0 | 0 | 0 | 0 | 0 | 1,418 | 0.574322 |
4bb3c9f13001ae9f4765556a61ae26a55cabde2c | 1,402 | py | Python | Data Structures/Linked Lists/reverse-a-linked-list.py | Owngithub10101/Hackerrank-Problem-Solving | 4e35b609c9f5b94c5bda292b9991baa054a944b6 | [
"MIT"
] | 23 | 2020-02-28T16:18:48.000Z | 2021-12-21T11:51:07.000Z | Data Structures/Linked Lists/reverse-a-linked-list.py | ramanagali/Hackerrank-Problem-Solving | 98f654f984013140d52b9a344146e9e38e46fb81 | [
"MIT"
] | null | null | null | Data Structures/Linked Lists/reverse-a-linked-list.py | ramanagali/Hackerrank-Problem-Solving | 98f654f984013140d52b9a344146e9e38e46fb81 | [
"MIT"
] | 16 | 2020-04-08T10:46:39.000Z | 2021-11-15T03:46:56.000Z | # Reverse a linked list
# Developer: Murillo Grubler
# https://www.hackerrank.com/challenges/reverse-a-linked-list/problem
# Time complexity of reverse function: O(n)
class SinglyLinkedListNode:
def __init__(self, node_data):
self.data = node_data
self.next = None
class SinglyLinkedList:
def _... | 24.596491 | 69 | 0.622682 | 430 | 0.306705 | 0 | 0 | 0 | 0 | 0 | 0 | 306 | 0.21826 |
4bb64f1dd8e15adacfcfa40dd94e5cebe3d88bea | 1,737 | py | Python | web/api/user/utilities.py | cclrobotics/ARTBot | a0bffabebbc09361bf7748741fe3d30c78af8fbd | [
"MIT"
] | 5 | 2020-12-04T19:28:42.000Z | 2021-12-07T16:14:28.000Z | web/api/user/utilities.py | cclrobotics/ARTBot | a0bffabebbc09361bf7748741fe3d30c78af8fbd | [
"MIT"
] | 50 | 2019-10-08T19:47:24.000Z | 2021-07-26T05:43:37.000Z | web/api/user/utilities.py | cclrobotics/ARTBot | a0bffabebbc09361bf7748741fe3d30c78af8fbd | [
"MIT"
] | 4 | 2019-10-23T04:14:49.000Z | 2021-08-01T01:22:37.000Z | import os
from PIL import Image
import random
from functools import wraps
from flask import jsonify
from flask_jwt_extended import get_current_user
from .artpiece import Artpiece
from .exceptions import InvalidUsage
from web.extensions import cache
#decorator to require admin_acccess for a route
def access_level_requ... | 31.017857 | 89 | 0.716753 | 0 | 0 | 0 | 0 | 390 | 0.224525 | 0 | 0 | 382 | 0.219919 |
4bb717792f0ab03afa44f642bc10364fd9b57993 | 2,528 | py | Python | network/utils.py | Goochaozheng/ChunkFusion | 7458a8e08886cc76cfeb87881c51e23b1d0674c3 | [
"MIT"
] | 3 | 2022-03-15T08:34:15.000Z | 2022-03-15T08:40:06.000Z | network/utils.py | Goochaozheng/ChunkFusion | 7458a8e08886cc76cfeb87881c51e23b1d0674c3 | [
"MIT"
] | null | null | null | network/utils.py | Goochaozheng/ChunkFusion | 7458a8e08886cc76cfeb87881c51e23b1d0674c3 | [
"MIT"
] | null | null | null | import spconv
import torch
from torch import nn
def residualBlock(channels, kernel_size=3):
return spconv.SparseSequential(
spconv.ConcatTable()
.add(spconv.Identity())
.add(spconv.SparseSequential(
nn.BatchNorm1d(channels),
spconv.SubMConv3d(channels... | 36.114286 | 168 | 0.71163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 286 | 0.113133 |
4bba68abed889d99f735d0534602287dd744310e | 3,794 | py | Python | hemlock/load_scripts/doc_to_mongo.py | Lab41/Hemlock | 2c53cfc11bfbe1e4f901b519db578090fe7a17dd | [
"Apache-2.0"
] | 4 | 2015-05-14T18:59:44.000Z | 2017-03-09T12:49:36.000Z | hemlock/load_scripts/doc_to_mongo.py | Lab41/Hemlock | 2c53cfc11bfbe1e4f901b519db578090fe7a17dd | [
"Apache-2.0"
] | null | null | null | hemlock/load_scripts/doc_to_mongo.py | Lab41/Hemlock | 2c53cfc11bfbe1e4f901b519db578090fe7a17dd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2013 In-Q-Tel, Inc/Lab41, 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... | 29.640625 | 89 | 0.552978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,131 | 0.298102 |
4bbaecaa33cf5b0c99d08e0e5f803ac656d6dabe | 2,659 | py | Python | unn/models/initializer.py | zongdaoming/TinyTransformer | 8e64f8816117048c388b4b20e3a56760ce149fe3 | [
"Apache-2.0"
] | 2 | 2021-08-08T11:23:14.000Z | 2021-09-16T04:05:23.000Z | unn/models/initializer.py | zongdaoming/TinyTransformer | 8e64f8816117048c388b4b20e3a56760ce149fe3 | [
"Apache-2.0"
] | 1 | 2021-08-08T11:25:47.000Z | 2021-08-08T11:26:15.000Z | unn/models/initializer.py | zongdaoming/TinyTransformer | 8e64f8816117048c388b4b20e3a56760ce149fe3 | [
"Apache-2.0"
] | null | null | null | import copy
import logging
import math
import torch
from torch import nn
logger = logging.getLogger('global')
def init_weights_normal(module, std=0.01):
for m in module.modules():
if isinstance(m, nn.Conv2d) or isinstance(m, nn.Linear) or isinstance(
m, nn.ConvTranspose2d):
n... | 32.036145 | 83 | 0.588943 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 193 | 0.072584 |
4bbcb3d3943aa14ce46dab08f6f7c37762566694 | 3,000 | py | Python | AudioFile.py | ZZZlax/.Pyrate | 42a85213e0557b2988bf62bb8eac540263e0ce30 | [
"Unlicense"
] | null | null | null | AudioFile.py | ZZZlax/.Pyrate | 42a85213e0557b2988bf62bb8eac540263e0ce30 | [
"Unlicense"
] | null | null | null | AudioFile.py | ZZZlax/.Pyrate | 42a85213e0557b2988bf62bb8eac540263e0ce30 | [
"Unlicense"
] | null | null | null | # This Python file uses the following encoding: utf-8
import os; import sys; import urllib.request; from bs4 import BeautifulSoup; import wikipedia
from PyQt5.QtWebEngineWidgets import *; from PyQt5.QtGui import QIcon; from PyQt5.QtWidgets import *; from PyQt5.QtNetwork import QNetworkProxy
class AudioFile(QMainWindo... | 69.767442 | 620 | 0.676667 | 2,600 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 572 | 0.190667 |
4bbd0476d4a8b8dde9a872c84a83e121621a1703 | 16,649 | py | Python | GeneratorTest.py | Autio/swb_datascraping | ef31fd89c68d86849342495b79985572d0f2fc61 | [
"MIT"
] | null | null | null | GeneratorTest.py | Autio/swb_datascraping | ef31fd89c68d86849342495b79985572d0f2fc61 | [
"MIT"
] | null | null | null | GeneratorTest.py | Autio/swb_datascraping | ef31fd89c68d86849342495b79985572d0f2fc61 | [
"MIT"
] | null | null | null | __author__ = 'petriau'
import requests # for HTTP requests
from bs4 import BeautifulSoup # for HTML parsing
url_SBM_FinanceProgress = 'http://sbm.gov.in/sbmreport/Report/Financial/SBM_StateReleaseAllocationincludingUnapproved.aspx'
# Function to return HTML parsed with BeautifulSoup from a POST request URL and param... | 228.068493 | 5,731 | 0.910145 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15,104 | 0.907202 |
4bbd48777ac0547cad592918b3cc57a1efffc54a | 677 | py | Python | project euler/q50.py | milkmeat/thomas | fbc72af34267488d931a4885d4e19fce22fea582 | [
"MIT"
] | null | null | null | project euler/q50.py | milkmeat/thomas | fbc72af34267488d931a4885d4e19fce22fea582 | [
"MIT"
] | null | null | null | project euler/q50.py | milkmeat/thomas | fbc72af34267488d931a4885d4e19fce22fea582 | [
"MIT"
] | null | null | null | def listprime(max):
prime=[True]*max
prime[0]=False
prime[1]=False
for x in range(max/2):
if prime[x]:
bei=x+x
while bei<max:
prime[bei]=False
bei+=x
return prime
def listprimenumber(lpn):
listprimelpn=listprime(lpn)
... | 22.566667 | 39 | 0.499261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.088626 |
4bbd5d337a02e7405c19f8ae7746f2dbce197b3b | 4,189 | py | Python | s09_files_and_random/solutions/random_walking_simple.py | silverfield/pythonsessions | bf5d82dded7616a5d6998da4eb445708c728794f | [
"MIT"
] | null | null | null | s09_files_and_random/solutions/random_walking_simple.py | silverfield/pythonsessions | bf5d82dded7616a5d6998da4eb445708c728794f | [
"MIT"
] | null | null | null | s09_files_and_random/solutions/random_walking_simple.py | silverfield/pythonsessions | bf5d82dded7616a5d6998da4eb445708c728794f | [
"MIT"
] | null | null | null | __author__ = 'ferrard'
# ---------------------------------------------------------------
# Imports
# ---------------------------------------------------------------
import scipy as sp
import random
import time
# ---------------------------------------------------------------
# Class - Graph
# -----------------------... | 34.336066 | 116 | 0.467176 | 3,436 | 0.820243 | 0 | 0 | 0 | 0 | 0 | 0 | 1,792 | 0.427787 |
4bbef0cf8a34a2518357110d8f321604ae40180d | 337 | py | Python | 51_60/day-60/forms/main.py | srakhe/100-days-py | 4d99ab35eb1376d2f8722c42e0bf98acc18fba20 | [
"MIT"
] | null | null | null | 51_60/day-60/forms/main.py | srakhe/100-days-py | 4d99ab35eb1376d2f8722c42e0bf98acc18fba20 | [
"MIT"
] | null | null | null | 51_60/day-60/forms/main.py | srakhe/100-days-py | 4d99ab35eb1376d2f8722c42e0bf98acc18fba20 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
@app.route('/login', methods=['POST'])
def login():
return f'<h2>Name: {request.form["name"]}</h2><br><h2>Password: {request.form["password"]}'
if __name__ == '__main__... | 18.722222 | 95 | 0.652819 | 0 | 0 | 0 | 0 | 215 | 0.637982 | 0 | 0 | 123 | 0.364985 |
4bbf1d6eb8af61adb06a84718e97dce8dddb1ac0 | 6,094 | py | Python | spartify/settings.py | cl1ckname/Spartify | 3c45236e3f8803af9d01ac638e3d10a834ab7b7d | [
"Apache-2.0"
] | 3 | 2021-07-26T15:43:20.000Z | 2022-02-11T17:22:31.000Z | spartify/settings.py | cl1ckname/Spartify | 3c45236e3f8803af9d01ac638e3d10a834ab7b7d | [
"Apache-2.0"
] | 2 | 2021-07-08T14:25:22.000Z | 2021-08-19T18:17:14.000Z | spartify/settings.py | cl1ckname/Spartify | 3c45236e3f8803af9d01ac638e3d10a834ab7b7d | [
"Apache-2.0"
] | 1 | 2021-08-19T18:17:48.000Z | 2021-08-19T18:17:48.000Z | """
Django settings for spartify project.
Generated by 'django-admin startproject' using Django 2.2.12.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
... | 29.019048 | 125 | 0.675583 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,888 | 0.638005 |
4bc09df45d93aefe38be329327bcf363df1f3d3e | 7,018 | py | Python | bin/tdgwgeo2csv.py | Bauble/bauble.api | 183c97fda076ea870e21e70ecf89a2a94a7f5722 | [
"BSD-3-Clause"
] | null | null | null | bin/tdgwgeo2csv.py | Bauble/bauble.api | 183c97fda076ea870e21e70ecf89a2a94a7f5722 | [
"BSD-3-Clause"
] | 1 | 2015-02-05T13:15:00.000Z | 2015-02-05T13:15:00.000Z | bin/tdgwgeo2csv.py | Bauble/bauble.api | 183c97fda076ea870e21e70ecf89a2a94a7f5722 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# tdwggeo2csv.py
#
# Description: convert TDWG plant distribution files out of the box to a single
# CSV file
#
# TODO: should create new id's for each entry and have a tdwg_code for
# each so we can maintain as much data as possbible
# TODO: we should probably include the original text files ... | 31.470852 | 98 | 0.578655 | 1,840 | 0.262183 | 0 | 0 | 0 | 0 | 0 | 0 | 2,269 | 0.323311 |
4bc28189f37d50450206554fd6ab1753bd171778 | 7,386 | py | Python | getters/haproxy_haproxylogs.py | gunny26/datalogger | 7bd29ab88f2e2749284d80a6a834c94c0955a7e0 | [
"Apache-2.0"
] | null | null | null | getters/haproxy_haproxylogs.py | gunny26/datalogger | 7bd29ab88f2e2749284d80a6a834c94c0955a7e0 | [
"Apache-2.0"
] | null | null | null | getters/haproxy_haproxylogs.py | gunny26/datalogger | 7bd29ab88f2e2749284d80a6a834c94c0955a7e0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
"""
Program to read and parse haproxylogs to put them in shape to upload to DataLogger
The input date schould be sorted by date, and finished
the uploaded data will immediately split into TimeseriesArray, so no further data
of this day could be appended
"""
import os
import sys
import gzip
import logg... | 40.80663 | 217 | 0.627268 | 0 | 0 | 2,766 | 0.374492 | 0 | 0 | 0 | 0 | 2,084 | 0.282155 |