hexsha
string | size
int64 | ext
string | lang
string | max_stars_repo_path
string | max_stars_repo_name
string | max_stars_repo_head_hexsha
string | max_stars_repo_licenses
list | max_stars_count
int64 | max_stars_repo_stars_event_min_datetime
string | max_stars_repo_stars_event_max_datetime
string | max_issues_repo_path
string | max_issues_repo_name
string | max_issues_repo_head_hexsha
string | max_issues_repo_licenses
list | max_issues_count
int64 | max_issues_repo_issues_event_min_datetime
string | max_issues_repo_issues_event_max_datetime
string | max_forks_repo_path
string | max_forks_repo_name
string | max_forks_repo_head_hexsha
string | max_forks_repo_licenses
list | max_forks_count
int64 | max_forks_repo_forks_event_min_datetime
string | max_forks_repo_forks_event_max_datetime
string | content
string | avg_line_length
float64 | max_line_length
int64 | alphanum_fraction
float64 | qsc_code_num_words_quality_signal
int64 | qsc_code_num_chars_quality_signal
float64 | qsc_code_mean_word_length_quality_signal
float64 | qsc_code_frac_words_unique_quality_signal
float64 | qsc_code_frac_chars_top_2grams_quality_signal
float64 | qsc_code_frac_chars_top_3grams_quality_signal
float64 | qsc_code_frac_chars_top_4grams_quality_signal
float64 | qsc_code_frac_chars_dupe_5grams_quality_signal
float64 | qsc_code_frac_chars_dupe_6grams_quality_signal
float64 | qsc_code_frac_chars_dupe_7grams_quality_signal
float64 | qsc_code_frac_chars_dupe_8grams_quality_signal
float64 | qsc_code_frac_chars_dupe_9grams_quality_signal
float64 | qsc_code_frac_chars_dupe_10grams_quality_signal
float64 | qsc_code_frac_chars_replacement_symbols_quality_signal
float64 | qsc_code_frac_chars_digital_quality_signal
float64 | qsc_code_frac_chars_whitespace_quality_signal
float64 | qsc_code_size_file_byte_quality_signal
float64 | qsc_code_num_lines_quality_signal
float64 | qsc_code_num_chars_line_max_quality_signal
float64 | qsc_code_num_chars_line_mean_quality_signal
float64 | qsc_code_frac_chars_alphabet_quality_signal
float64 | qsc_code_frac_chars_comments_quality_signal
float64 | qsc_code_cate_xml_start_quality_signal
float64 | qsc_code_frac_lines_dupe_lines_quality_signal
float64 | qsc_code_cate_autogen_quality_signal
float64 | qsc_code_frac_lines_long_string_quality_signal
float64 | qsc_code_frac_chars_string_length_quality_signal
float64 | qsc_code_frac_chars_long_word_length_quality_signal
float64 | qsc_code_frac_lines_string_concat_quality_signal
float64 | qsc_code_cate_encoded_data_quality_signal
float64 | qsc_code_frac_chars_hex_words_quality_signal
float64 | qsc_code_frac_lines_prompt_comments_quality_signal
float64 | qsc_code_frac_lines_assert_quality_signal
float64 | qsc_codepython_cate_ast_quality_signal
float64 | qsc_codepython_frac_lines_func_ratio_quality_signal
float64 | qsc_codepython_cate_var_zero_quality_signal
bool | qsc_codepython_frac_lines_pass_quality_signal
float64 | qsc_codepython_frac_lines_import_quality_signal
float64 | qsc_codepython_frac_lines_simplefunc_quality_signal
float64 | qsc_codepython_score_lines_no_logic_quality_signal
float64 | qsc_codepython_frac_lines_print_quality_signal
float64 | qsc_code_num_words
int64 | qsc_code_num_chars
int64 | qsc_code_mean_word_length
int64 | qsc_code_frac_words_unique
null | qsc_code_frac_chars_top_2grams
int64 | qsc_code_frac_chars_top_3grams
int64 | qsc_code_frac_chars_top_4grams
int64 | qsc_code_frac_chars_dupe_5grams
int64 | qsc_code_frac_chars_dupe_6grams
int64 | qsc_code_frac_chars_dupe_7grams
int64 | qsc_code_frac_chars_dupe_8grams
int64 | qsc_code_frac_chars_dupe_9grams
int64 | qsc_code_frac_chars_dupe_10grams
int64 | qsc_code_frac_chars_replacement_symbols
int64 | qsc_code_frac_chars_digital
int64 | qsc_code_frac_chars_whitespace
int64 | qsc_code_size_file_byte
int64 | qsc_code_num_lines
int64 | qsc_code_num_chars_line_max
int64 | qsc_code_num_chars_line_mean
int64 | qsc_code_frac_chars_alphabet
int64 | qsc_code_frac_chars_comments
int64 | qsc_code_cate_xml_start
int64 | qsc_code_frac_lines_dupe_lines
int64 | qsc_code_cate_autogen
int64 | qsc_code_frac_lines_long_string
int64 | qsc_code_frac_chars_string_length
int64 | qsc_code_frac_chars_long_word_length
int64 | qsc_code_frac_lines_string_concat
null | qsc_code_cate_encoded_data
int64 | qsc_code_frac_chars_hex_words
int64 | qsc_code_frac_lines_prompt_comments
int64 | qsc_code_frac_lines_assert
int64 | qsc_codepython_cate_ast
int64 | qsc_codepython_frac_lines_func_ratio
int64 | qsc_codepython_cate_var_zero
int64 | qsc_codepython_frac_lines_pass
int64 | qsc_codepython_frac_lines_import
int64 | qsc_codepython_frac_lines_simplefunc
int64 | qsc_codepython_score_lines_no_logic
int64 | qsc_codepython_frac_lines_print
int64 | effective
string | hits
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f49b63d2586fa2982b53bbc28b9b53931179d91a
| 63
|
py
|
Python
|
src/server.py
|
jstamps91/CryptoChatter
|
612ed7249b7664f3bc4617336c623c381909f06d
|
[
"MIT"
] | null | null | null |
src/server.py
|
jstamps91/CryptoChatter
|
612ed7249b7664f3bc4617336c623c381909f06d
|
[
"MIT"
] | null | null | null |
src/server.py
|
jstamps91/CryptoChatter
|
612ed7249b7664f3bc4617336c623c381909f06d
|
[
"MIT"
] | null | null | null |
''' Chat server '''
import sys
import socket
import select
| 12.6
| 20
| 0.68254
| 8
| 63
| 5.375
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 63
| 5
| 21
| 12.6
| 0.877551
| 0.174603
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f4a2060f5ede45a25c1ba1ebd373220fd267c8cf
| 47
|
py
|
Python
|
Problem149.py
|
Cleancode404/ProjectEuler
|
2f93b256b107bfb6a395b8aa197cfeacc599b00b
|
[
"MIT"
] | null | null | null |
Problem149.py
|
Cleancode404/ProjectEuler
|
2f93b256b107bfb6a395b8aa197cfeacc599b00b
|
[
"MIT"
] | null | null | null |
Problem149.py
|
Cleancode404/ProjectEuler
|
2f93b256b107bfb6a395b8aa197cfeacc599b00b
|
[
"MIT"
] | null | null | null |
"""
Searching for a maximum-sum subsequence
"""
| 15.666667
| 39
| 0.723404
| 6
| 47
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12766
| 47
| 3
| 40
| 15.666667
| 0.829268
| 0.829787
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f4b733bf0a06844f4deedea94f5c172a1814ddbd
| 23,599
|
py
|
Python
|
cogs/mod.py
|
technicalwritingEditor/DogeBot
|
9615231c49554bb1c7396c5e8318d7755ef157bc
|
[
"MIT"
] | null | null | null |
cogs/mod.py
|
technicalwritingEditor/DogeBot
|
9615231c49554bb1c7396c5e8318d7755ef157bc
|
[
"MIT"
] | null | null | null |
cogs/mod.py
|
technicalwritingEditor/DogeBot
|
9615231c49554bb1c7396c5e8318d7755ef157bc
|
[
"MIT"
] | null | null | null |
import discord
from discord.ext import commands
import random, asyncio, aiohttp, datetime
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
class mod():
def __init__(self, bot):
self.bot = bot
async def on_message(self, message):
y = await self.bot.db.antiinvites.find_one({"id": str(message.guild.id)})
if not y:
return
on_or_off = y['on_or_off']
if on_or_off == "on":
if "https://discord.gg/".lower() in message.content.lower() or "discord.gg/".lower() in message.content.lower():
x = await message.channel.send(f"{message.author.mention}| **No invites!** :rage: ")
await message.delete()
await asyncio.sleep(3)
await x.delete()
x = await self.bot.db.logging.find_one({"id": str(message.guild.id)})
mod_channel = int(x['channel'])
xD = self.bot.get_channel(mod_channel)
embed = discord.Embed(description=f"📧 Invite deleted at {message.channel.mention}. Sent by {message.author.mention}!", color=0x9b9dff)
await xD.send(embed=embed)
if on_or_off == "off":
pass
async def on_member_join(self, user):
x = await self.bot.db.welcome.find_one({"id": str(user.guild.id)})
if not x:
return
channel = int(x['channel'])
send_channel = self.bot.get_channel(channel)
if not send_channel:
return
await send_channel.send(x['message'].replace('$name$', user.name).replace('$mention$', user.mention).replace('$server$', user.guild.name))
on_or_off = x['on_or_off']
if on_or_off == "on":
img = Image.open("lol.jpg")
img.thumbnail( ( 600, 600, 600, 600 ) )
draw = ImageDraw.Draw(img)
font = ImageFont.truetype("American Captain.otf", 60)
draw.text((50, 0), "Welcome", (255, 255, 255), font=font)
draw.text((0, 100), "{}".format(user.name), (255, 255, 255), font=font)
img.save(f'{user.id}.jpg')
await send_channel.send(file=discord.File(f'{user.id}.jpg'))
y = await self.bot.db.autorole.find_one({"id": str(user.guild.id)})
if y is None:
return
role = y['role']
r = discord.utils.get(user.guild.roles, name=role)
await user.add_roles(r)
async def on_member_remove(self, user):
em = discord.Embed(description=f"Goodbye **{user.name}**", color=0x1aff00, timestamp = datetime.datetime.utcnow())
em.set_author(name=user, icon_url=user.avatar_url)
x = await self.bot.db.leave.find_one({"id": str(user.guild.id)})
if not x:
return
channel = int(x['channel'])
send_channel = self.bot.get_channel(channel)
if not send_channel:
return
await send_channel.send(x['message'].replace('$name$', user.name).replace('$mention$', user.mention).replace('$server$', user.guild.name))
#async def on_message_delete(self, message):
#em = discord.Embed(color=0x1aff00, timestamp = datetime.datetime.utcnow())
#em.add_field(name="Message deleted", value=message.content)
#em.set_author(name=message.author, icon_url=message.author.avatar_url)
#x = await self.bot.db.modlog.find_one({"id": str(message.guild.id)})
#if not x:
#return
#channel = int(x['channel'])
#send_channel = self.bot.get_channel(channel)
#if not send_channel:
#return
#await send_channel.send(embed=em)
#async def on_message_edit(self, before, after):
#em = discord.Embed(color=0x1aff00, timestamp = datetime.datetime.utcnow())
#em.add_field(name="Before", value=before.content)
#em.add_field(name="After", value=after.content)
#em.set_author(name=before.author, icon_url=before.author.avatar_url)
# x = await self.bot.db.modlog.find_one({"id": str(before.guild.id)})
#if not x:
#return
#channel = int(x['channel'])
#send_channel = self.bot.get_channel(channel)
#if not send_channel:
#return
#await send_channel.send(embed=em)
async def on_message_delete(self, message):
x = await self.bot.db.logging.find_one({"id": str(message.guild.id)})
if not x:
return
channel = int(x['channel'])
send_channel = self.bot.get_channel(channel)
if not send_channel:
return
embed=discord.Embed(title="Message removed", color=0xf90000, timestamp = datetime.datetime.utcnow())
embed.add_field(name="User", value=message.author)
embed.add_field(name="Channel", value=message.channel.mention)
embed.add_field(name="Message", value=message.content, inline=False)
await send_channel.send(embed=embed)
async def on_message_edit(self, before, after):
embed=discord.Embed(title="Message edited", color=0xff8040, timestamp = datetime.datetime.utcnow())
embed.add_field(name="User", value=before.author)
embed.add_field(name="Channel", value=before.channel.mention)
embed.add_field(name="Before", value=before.content, inline=False)
embed.add_field(name="After", value=after.content)
x = await self.bot.db.logging.find_one({"id": str(before.guild.id)})
if not x:
return
channel = int(x['channel'])
send_channel = self.bot.get_channel(channel)
if not send_channel:
return
await send_channel.send(embed=embed)
async def on_member_update(self,before, after):
x = await self.bot.db.logging.find_one({"id": str(before.guild.id)})
if not x:
return
channel = int(x['channel'])
send_channel = self.bot.get_channel(channel)
if not send_channel:
return
embed=discord.Embed(title="Changing nickname", color=0xd000e1, timestamp = datetime.datetime.utcnow())
embed.add_field(name="User", value=before.mention, inline=False)
embed.add_field(name="before", value=before.nickname)
embed.add_field(name="after", value=after.nickname, inline=False)
await send_channel.send(embed=embed)
@commands.command()
@commands.has_permissions(manage_guild=True)
async def welcome(self, ctx, sort=None):
"""Turn on or off welcome messages"""
if sort == None:
x = await self.bot.db.welcome.find_one({"id": str(ctx.guild.id)})
channel = int(x['channel'])
message = x['message']
embed=discord.Embed(description="Your welcoming information",color=0x00f200)
embed.add_field(name="Channel", value=channel, inline=False)
embed.add_field(name="Message", value=message)
await ctx.send(embed=embed)
if sort == "on":
await ctx.send("**Please mention the channel to set the welcome messages in.**")
try:
x = await self.bot.wait_for("message", check=lambda x: x.channel == ctx.channel and x.author == ctx.author, timeout=60.0)
except asyncio.TimeoutError:
return await ctx.send("**The time is up**")
if not x.content.startswith("<#") and not x.content.endswith(">"):
return await ctx.send("**Please mention the channel**")
channel = x.content.strip("<#").strip(">")
try:
channel = int(channel)
except ValueError:
return await ctx.send("**Please mention the channel right**")
await self.bot.db.welcome.update_one({"id": str(ctx.guild.id)}, {"$set": {"channel": channel} }, upsert=True )
await ctx.send("**I have set the welcome channel!**")
embed=discord.Embed(description="**Write a message!**\n\nVaribales:\n**$name$** Name of user\n**$mention$** Mentions user\n**$server$** Server name", color=0x00ff00)
await ctx.send(embed=embed)
try:
x = await self.bot.wait_for("message", check=lambda x: x.channel == ctx.channel and x.author == ctx.author, timeout=60.0)
except asyncio.TimeoutError:
return await ctx.send("Request timed out. Please try again.")
await self.bot.db.welcome.update_one({"id": str(ctx.guild.id)}, {"$set": {"channel": channel, "message": x.content}}, upsert=True)
await ctx.send("Successfully turned on message")
if sort == "off":
await self.bot.db.welcome.update_one({"id": str(ctx.guild.id)}, {"$set": {"channel": False, "message": None}}, upsert=True)
await ctx.send("**I have turned off welcome messages**")
@commands.command()
@commands.has_permissions(manage_guild=True)
async def welcomeimage(self, ctx, sort=None):
"""Turn on or off welcome images"""
if sort == None:
await ctx.send("**Choose `on` or `off`**")
if sort == "on":
await ctx.send("**You have turned on welcome images!**")
await self.bot.db.welcome.update_one({"id": str(ctx.guild.id)}, {"$set": {"on_or_off": "on"} }, upsert=True )
if sort == "off":
await ctx.send("**You have turned off welcome images**")
await self.bot.db.welcome.update_one({"id": str(ctx.guild.id)}, {"$set": {"on_or_off": "off"} }, upsert=True )
@commands.command(aliases=['goodbye'])
@commands.has_permissions(manage_guild=True)
async def leave(self, ctx, sort=None):
"""Turn on or off leave messages"""
if sort == None:
x = await self.bot.db.leave.find_one({"id": str(ctx.guild.id)})
channel = int(x['channel'])
message = x['message']
embed=discord.Embed(description="Your leave information",color=0x00f200)
embed.add_field(name="Channel", value=channel, inline=False)
embed.add_field(name="Message", value=message)
await ctx.send(embed=embed)
if sort == "on":
await ctx.send("**Please mention the channel to set the leave messages in.**")
try:
x = await self.bot.wait_for("message", check=lambda x: x.channel == ctx.channel and x.author == ctx.author, timeout=60.0)
except asyncio.TimeoutError:
return await ctx.send("**The time is up**")
if not x.content.startswith("<#") and not x.content.endswith(">"):
return await ctx.send("**Please mention the channel**")
channel = x.content.strip("<#").strip(">")
try:
channel = int(channel)
except ValueError:
return await ctx.send("**Please mention the channel right**")
await self.bot.db.leave.update_one({"id": str(ctx.guild.id)}, {"$set": {"channel": channel} }, upsert=True )
await ctx.send("**I have set the leave channel!**")
embed=discord.Embed(description="**Write a message!**\n\nVaribales:\n**$name$** Name of user\n**$mention$** Mentions user\n**$server$** Server name", color=0x00ff00)
await ctx.send(embed=embed)
try:
x = await self.bot.wait_for("message", check=lambda x: x.channel == ctx.channel and x.author == ctx.author, timeout=60.0)
except asyncio.TimeoutError:
return await ctx.send("Request timed out. Please try again.")
await self.bot.db.leave.update_one({"id": str(ctx.guild.id)}, {"$set": {"channel": channel, "message": x.content}}, upsert=True)
await ctx.send("Successfully turned on leave messages for this guild.")
if sort == "off":
await self.bot.db.leave.update_one({"id": str(ctx.guild.id)}, {"$set": {"channel": False, "message": None}}, upsert=True)
await ctx.send("**I have turned off leave messages**")
@commands.command()
@commands.has_permissions(manage_guild=True)
async def modlog(self, ctx, sort=None):
"""Turn on or off the modlog"""
if sort == None:
await ctx.send("**`on` or `off`**")
if sort == "on":
await ctx.send("**Please mention the channel to set the log messages in.**")
try:
x = await self.bot.wait_for("message", check=lambda x: x.channel == ctx.channel and x.author == ctx.author, timeout=60.0)
except asyncio.TimeoutError:
return await ctx.send("**The time is up**")
if not x.content.startswith("<#") and not x.content.endswith(">"):
return await ctx.send("**Please mention the channel**")
channel = x.content.strip("<#").strip(">")
try:
channel = int(channel)
except ValueError:
return await ctx.send("**Please mention the channel right**")
await self.bot.db.modlog.update_one({"id": str(ctx.guild.id)}, {"$set": {"channel": channel} }, upsert=True )
await ctx.send("**I have set the mod-log channel!**")
if sort == "off":
await self.bot.db.modlog.update_one({"id": str(ctx.guild.id)}, {"$set": {"channel": False} }, upsert=True )
await ctx.send("**I have turned off modlog messages**")
@commands.command()
@commands.has_permissions(manage_guild=True)
async def logs(self, ctx, sort=None):
"""Turn on or off the logs"""
if sort == None:
await ctx.send("**`on` or `off`**")
if sort == "on":
await ctx.send("**Please mention the channel to set the log messages in.**")
try:
x = await self.bot.wait_for("message", check=lambda x: x.channel == ctx.channel and x.author == ctx.author, timeout=60.0)
except asyncio.TimeoutError:
return await ctx.send("**The time is up**")
if not x.content.startswith("<#") and not x.content.endswith(">"):
return await ctx.send("**Please mention the channel**")
channel = x.content.strip("<#").strip(">")
try:
channel = int(channel)
except ValueError:
return await ctx.send("**Please mention the channel right**")
await self.bot.db.logging.update_one({"id": str(ctx.guild.id)}, {"$set": {"channel": channel} }, upsert=True )
await ctx.send("**I have set the logs channel!**")
if sort == "off":
await self.bot.db.logging.update_one({"id": str(ctx.guild.id)}, {"$set": {"channel": False} }, upsert=True )
await ctx.send("**I have turned off logs**")
@commands.command()
@commands.has_permissions(manage_guild=True)
async def antiinvites(self, ctx, sort=None):
"""Turn on or off anti invites"""
if sort == None:
await ctx.send("choose `on` or `off`")
if sort == "on":
await ctx.send("**You have turned on anti invites!**")
await self.bot.db.antiinvites.update_one({"id": str(ctx.guild.id)}, {"$set": {"on_or_off": "on"} }, upsert=True )
if sort == "off":
await ctx.send("**You have turned off anti invites!**")
await self.bot.db.antiinvites.update_one({"id": str(ctx.guild.id)}, {"$set": {"on_or_off": "off"} }, upsert=True )
@commands.command()
@commands.has_permissions(kick_members=True)
async def kick(self, ctx, user:discord.Member,*, reason=None):
"""Kicks a member from your server!"""
await user.kick()
x = await self.bot.db.modlog.find_one({"id": str(ctx.guild.id)})
embed=discord.Embed(title="Case: kick", color=0xff7c3e, timestamp = datetime.datetime.utcnow())
embed.add_field(name="User", value=f"{user} ({user.mention})", inline=False)
embed.add_field(name="Moderator", value=ctx.author, inline=False)
embed.add_field(name="Reason", value=reason, inline=False)
await ctx.send(f"Kicked **{user}**")
channel = int(x['channel'])
send_channel= self.bot.get_channel(channel)
await send_channel.send(embed=embed)
@commands.command()
@commands.has_permissions(ban_members=True)
async def ban(self, ctx, user:discord.Member,*, reason):
"""Bans a member from your server!"""
await user.ban()
x = await self.bot.db.modlog.find_one({"id": str(ctx.guild.id)})
embed=discord.Embed(title="Case: Ban", color=0xff0f0f, timestamp = datetime.datetime.utcnow())
embed.add_field(name="User", value=f"{user} ({user.mention})", inline=False)
embed.add_field(name="Moderator", value=ctx.author, inline=False)
embed.add_field(name="Reason", value=reason, inline=False)
await ctx.send(f"Banned **{user}**")
channel = int(x['channel'])
send_channel= self.bot.get_channel(channel)
await send_channel.send(embed=embed)
em = discord.Embed(title=f"You have been banned from **{ctx.guild.name}**", color=0xff0f0f, timestamp = datetime.datetime.utcnow())
em.add_field(name="Moderator", value=ctx.author.mention, inline=False)
em.add_field(name="Reason", value=reason)
await user.send(embed=em)
@commands.command()
@commands.has_permissions(kick_members=True)
async def warn(self, ctx, user:discord.Member,*, reason):
"""Warn a user to make them a good pep again!"""
x = await self.bot.db.modlog.find_one({"id": str(ctx.guild.id)})
embed=discord.Embed(title="Case: Warn", color=0xff7c3e, timestamp = datetime.datetime.utcnow())
embed.add_field(name="User", value=f"{user} ({user.mention})", inline=False)
embed.add_field(name="Moderator", value=ctx.author, inline=False)
embed.add_field(name="Reason", value=reason, inline=False)
await ctx.send(f"Warned **{user}**")
channel = int(x['channel'])
send_channel= self.bot.get_channel(channel)
await send_channel.send(embed=embed)
em = discord.Embed(description=f"Warned in {ctx.guild.name}", color=0xff7c3e)
em.add_field(name="Moderator", value=ctx.author.mention, inline=False)
em.add_feild(name="Reason", value=reason)
await user.send(embed=em)
@commands.command()
@commands.has_permissions(manage_channels=True)
async def mute(self, ctx, user:discord.Member,*, reason):
"""Mute a user so they cant chat"""
x = await self.bot.db.modlog.find_one({"id": str(ctx.guild.id)})
embed=discord.Embed(title="Case: Mute", color=0xffff37, timestamp = datetime.datetime.utcnow())
embed.add_field(name="User", value=f"{user} ({user.mention})", inline=False)
embed.add_field(name="Moderator", value=ctx.author, inline=False)
embed.add_field(name="Reason", value=reason, inline=False)
await ctx.send(f"Muted **{user}**")
await ctx.channel.set_permissions(user, send_messages=False)
channel = int(x['channel'])
send_channel= self.bot.get_channel(channel)
await send_channel.send(embed=embed)
@commands.command()
@commands.has_permissions(manage_channels=True)
async def unmute(self, ctx, user:discord.Member,*, reason):
"""Unmute a user"""
x = await self.bot.db.modlog.find_one({"id": str(ctx.guild.id)})
embed=discord.Embed(title="Case: Unmute", color=0x00f200, timestamp = datetime.datetime.utcnow())
embed.add_field(name="User", value=f"{user} ({user.mention})", inline=False)
embed.add_field(name="Moderator", value=ctx.author, inline=False)
embed.add_field(name="Reason", value=reason, inline=False)
await ctx.send(f"Unmuted **{user}**")
await ctx.channel.set_permissions(user, send_messages=True)
channel = int(x['channel'])
send_channel= self.bot.get_channel(channel)
await send_channel.send(embed=embed)
@commands.command()
@commands.has_permissions(manage_messages=True)
async def purge(self, ctx, number: int):
"""Purge messages from a channel"""
try:
float(number)
except ValueError:
return await ctx.send("**The number is invalid.**")
await ctx.channel.purge(limit=number+1)
@commands.command()
@commands.has_permissions(manage_roles = True)
async def autorole(self, ctx, *, role):
"""Role when someone joins"""
if role == 'off':
await self.bot.db.autorole.update_one({"id": str(ctx.guild.id)}, {"$set": {"role": False}}, upsert=True)
await ctx.send("Turned off autorole")
else:
r = discord.utils.get(ctx.guild.roles, name=str(role))
if r is None:
return await ctx.send("Role not found.")
await self.bot.db.autorole.update_one({"id": str(ctx.guild.id)}, {"$set": {"role": str(r)}}, upsert=True)
await ctx.send(f"Enabled autorole for **{str(r)}**.")
@commands.command(aliases=['arole'])
@commands.has_permissions(manage_roles = True)
async def addrole(self, ctx, user:discord.Member,*, role:discord.Role):
"""Add a role to a user"""
x = discord.utils.get(ctx.guild.roles, name=str(role))
await user.add_roles(x)
await ctx.send(f"Added **{str(role)}** to **{user}**")
@commands.command(aliases=['rrole'])
@commands.has_permissions(manage_roles = True)
async def removerole(self, ctx, user:discord.Member,*, role:discord.Role):
"""Remove a role from a user"""
x = discord.utils.get(ctx.guild.roles, name=role)
await user.remove_roles(x)
await ctx.send(f"Removed **{role}** from **{user}**")
@commands.command()
@commands.has_permissions(manage_guild=True)
async def poll(self, ctx,*, question):
embed=discord.Embed(description=question, color=ctx.author.color, timestamp = datetime.datetime.utcnow())
embed.set_author(name=ctx.author, icon_url=ctx.author.avatar_url)
x = await ctx.send(embed=embed)
await x.add_reaction("👍")
await x.add_reaction("👎")
@commands.command()
@commands.has_permissions(manage_guild=True)
async def prefix(self, ctx, prefix:str=None):
"""Set my prefix for the server"""
if prefix == None:
y = await self.bot.db.prefixes.find_one({ "id": ctx.guild.id })
if not y:
return await ctx.send("My prefix in this guild is: `-`")
await ctx.send(f"My prefix in this guild is: `{y['prefix']}`")
else:
if len(prefix) > 5:
return await ctx.send("It needs to be lower than 5 characters!")
await self.bot.db.prefixes.update_one({"id": ctx.guild.id}, { "$set": { "prefix": prefix } }, upsert=True)
await ctx.send(f"New prefix `{prefix}`")
def setup(bot):
bot.add_cog(mod(bot))
| 53.031461
| 178
| 0.587186
| 3,010
| 23,599
| 4.531229
| 0.084385
| 0.034607
| 0.04927
| 0.035926
| 0.831586
| 0.802478
| 0.766112
| 0.72344
| 0.686707
| 0.658113
| 0
| 0.007931
| 0.262638
| 23,599
| 444
| 179
| 53.150901
| 0.775703
| 0.041019
| 0
| 0.551075
| 0
| 0.005376
| 0.149179
| 0.006844
| 0
| 0
| 0.005919
| 0
| 0
| 1
| 0.005376
| false
| 0.002688
| 0.016129
| 0
| 0.104839
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f4be8fbad8ec9074379c5fbc383c6234f5eef1a7
| 215
|
py
|
Python
|
fastface/__init__.py
|
ethanwharris/light-face-detection
|
bd6a4c5a87c80937e51adc3999eacc14c80185e8
|
[
"MIT"
] | null | null | null |
fastface/__init__.py
|
ethanwharris/light-face-detection
|
bd6a4c5a87c80937e51adc3999eacc14c80185e8
|
[
"MIT"
] | null | null | null |
fastface/__init__.py
|
ethanwharris/light-face-detection
|
bd6a4c5a87c80937e51adc3999eacc14c80185e8
|
[
"MIT"
] | null | null | null |
from .api import *
from .version import __version__
from .module import FaceDetector
from . import adapter
from . import dataset
from . import metric
from . import transforms
from . import utils
from . import loss
| 19.545455
| 32
| 0.781395
| 29
| 215
| 5.655172
| 0.413793
| 0.365854
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172093
| 215
| 10
| 33
| 21.5
| 0.921348
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f4cf07e3a370c857af3eaa680297b46064355266
| 389
|
py
|
Python
|
mikasa/hello.py
|
JotKuj/mikasa2
|
b8684305a388bd2532499f21d140da3ac5ac1d18
|
[
"MIT"
] | null | null | null |
mikasa/hello.py
|
JotKuj/mikasa2
|
b8684305a388bd2532499f21d140da3ac5ac1d18
|
[
"MIT"
] | null | null | null |
mikasa/hello.py
|
JotKuj/mikasa2
|
b8684305a388bd2532499f21d140da3ac5ac1d18
|
[
"MIT"
] | null | null | null |
from flask import Flask
from flask import render_template
app = Flask(__name__)
@app.route('/')
def hello(name=None):
return render_template('base.html', name=name)
@app.route('/ropa')
def ropa(name=None):
return render_template('posesiones/ropa.html', name=name)
@app.route('/ropa/registra')
def ropa(name=None):
return render_template('posesiones/ropa.html', name=name)
| 25.933333
| 62
| 0.727506
| 56
| 389
| 4.910714
| 0.303571
| 0.203636
| 0.130909
| 0.218182
| 0.676364
| 0.574545
| 0.443636
| 0.443636
| 0.443636
| 0.443636
| 0
| 0
| 0.118252
| 389
| 15
| 63
| 25.933333
| 0.801749
| 0
| 0
| 0.333333
| 0
| 0
| 0.176923
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.166667
| 0.25
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
f4ed1cb79d4efbbd49b5a09a8c6387275b25d84d
| 2,822
|
py
|
Python
|
tests/unit/unit_test.py
|
fukasawat78/python-data-science-notebook
|
e35ca9b996aad7d0cb04733eaf45507d09ead6a5
|
[
"MIT"
] | null | null | null |
tests/unit/unit_test.py
|
fukasawat78/python-data-science-notebook
|
e35ca9b996aad7d0cb04733eaf45507d09ead6a5
|
[
"MIT"
] | null | null | null |
tests/unit/unit_test.py
|
fukasawat78/python-data-science-notebook
|
e35ca9b996aad7d0cb04733eaf45507d09ead6a5
|
[
"MIT"
] | null | null | null |
import pytest
import pandas as pd
from src.categorical_encoders import *
@pytest.fixture(scope="function", autouse=True)
def pre_function():
scope = "Function"
print(f"\n=== SETUP {scope} ===")
yield
print(f"\n=== TEARDOWN {scope} ===\n")
@pytest.fixture(scope="class", autouse=True)
def pre_class():
scope = "Class"
print(f"\n*** SETUP {scope} ***")
yield
print(f"\n*** TEARDOWN {scope} ***\n")
@pytest.fixture(scope="module", autouse=True)
def pre_module():
scope = "Module"
print(f"\n--- SETUP {scope} ---")
yield
print(f"\n--- TEARDOWN {scope} ---\n")
@pytest.fixture(scope="package", autouse=True)
def pre_package():
scope = "Package"
print(f"\n<<< SETUP {scope} >>>")
yield
print(f"\n<<< TEARDOWN {scope} >>>\n")
@pytest.fixture(scope="session", autouse=True)
def pre_session():
scope = "Session"
print(f"\n@@@ SETUP {scope} @@@")
yield
print(f"\n@@@ TEARDOWN {scope} @@@\n")
@pytest.fixture()
def category_data_examples():
return pd.DataFrame({
"num_1": [15.2, 29.2, 8.5],
"cat_1": ["male", "female", "others"],
"cat_2": ["car", "bike", "bycycle"],
"num_2": [0, 2, 1],
"cat_3": ["10-20", "20-30", "30-40"],
})
class TestCategoricalEncoders:
def test_ordinal_encoder(self):
category_data_examples = pd.DataFrame({
"num_1": [15.2, 29.2, 8.5],
"cat_1": ["male", "female", "others"],
"cat_2": ["car", "bike", "bycycle"],
"num_2": [0, 2, 1],
"cat_3": ["10-20", "20-30", "30-40"],
})
cat_names_list_examples = ["cat_1", "cat_2", "cat_3"]
assert isinstance(ordinal_encoder(category_data_examples, cat_names_list_examples), pd.DataFrame)
def test_onehot_encoder(self):
category_data_examples = pd.DataFrame({
"num_1": [15.2, 29.2, 8.5],
"cat_1": ["male", "female", "others"],
"cat_2": ["car", "bike", "bycycle"],
"num_2": [0, 2, 1],
"cat_3": ["10-20", "20-30", "30-40"],
})
cat_names_list_examples = ["cat_1", "cat_2", "cat_3"]
assert isinstance(onehot_encoder(category_data_examples, cat_names_list_examples), pd.DataFrame)
def test_rarelabel_encoder(self):
category_data_examples = pd.DataFrame({
"num_1": [15.2, 29.2, 8.5],
"cat_1": ["male", "female", "others"],
"cat_2": ["car", "bike", "bycycle"],
"num_2": [0, 2, 1],
"cat_3": ["10-20", "20-30", "30-40"],
})
cat_names_list_examples = ["cat_1", "cat_2", "cat_3"]
assert isinstance(rarelabel_encoder(category_data_examples, cat_names_list_examples), pd.DataFrame)
| 27.398058
| 107
| 0.542877
| 360
| 2,822
| 4.044444
| 0.172222
| 0.041209
| 0.048077
| 0.082418
| 0.728709
| 0.728709
| 0.728709
| 0.728709
| 0.728709
| 0.728709
| 0
| 0.057784
| 0.257973
| 2,822
| 102
| 108
| 27.666667
| 0.637536
| 0
| 0
| 0.479452
| 0
| 0
| 0.228916
| 0
| 0
| 0
| 0
| 0
| 0.041096
| 1
| 0.123288
| false
| 0
| 0.041096
| 0.013699
| 0.191781
| 0.136986
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7600417aa827bb0a358645cb9efaf56afd279b35
| 22,803
|
bzl
|
Python
|
distfiles.bzl
|
StarryVae/envoy-proxy
|
17f7cd6a8556dcc633f0050454ab64a02057ca93
|
[
"Apache-2.0"
] | 1
|
2021-09-07T07:37:41.000Z
|
2021-09-07T07:37:41.000Z
|
distfiles.bzl
|
StarryVae/envoy-proxy
|
17f7cd6a8556dcc633f0050454ab64a02057ca93
|
[
"Apache-2.0"
] | 3
|
2021-09-14T03:47:32.000Z
|
2021-12-27T08:53:35.000Z
|
distfiles.bzl
|
StarryVae/envoy-proxy
|
17f7cd6a8556dcc633f0050454ab64a02057ca93
|
[
"Apache-2.0"
] | 5
|
2021-08-21T06:57:21.000Z
|
2022-02-11T09:09:51.000Z
|
load("//:distdir.bzl", "distdir_tar")
def additional_distfiles_imports():
distdir_tar(
name = "additional_distfiles",
# Keep in sync with the archives fetched as part of building bazel.
archives = [
"0.2.2.tar.gz",
"0.3.9.4.tar.gz",
"0.4.1.tar.gz",
"015fc86d90f4045a56f831bcdfa560bc455450e2.tar.gz",
"0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip",
"0d7d85c2083f7a4c9efe01c061486f332b576d28.tar.gz",
"1.1.1.tar.gz",
"14550beb3b7b97195e483fb74b5efb906395c31e.tar.gz",
"2.10.3.tar.gz",
"2.2.0-rc2.zip",
"2019-09-01.tar.gz",
"2feabd5d64436e670084091a937855972ee35161.tar.gz",
"4abb566fbbc63df8fe7c1ac30b21632b9eb18d0c.tar.gz",
"5565939d4203234ddc742c02241ce4523e7b3beb.tar.gz",
"5cec5ea58c3efa81fa808f2bd38ce182da9ee731.tar.gz",
"5f50c68bdf5f107692bb027d1c568f67597f4d7f.tar.gz",
"63a16dd6f2fc7bc841bb17ff92be8318df60e2e1.tar.gz",
"74ad4281edd4ceca658888602af74bf2050107f0.tar.gz",
"79baebe50e4d6b73ae1f8b603f0ef41300110aa3.tar.gz",
"7bc4be735b0560289f6b86ab6136ee25d20b65b7.tar.gz",
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
"97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
"98970f78091ae65b4a029bcf512696ba6d665cf4.tar.gz",
"99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c.tar.gz",
"9f10e2d60d42edeb6662e185707a7d6a4ebc5604.tar.gz",
"a6b28555badcb18d6be924c8fc1bea49971656b8.tar.gz",
"b4d7f8e1aa1ebbe75aaf959d93caf5826599c9ab.tar.gz",
"bazel-gazelle-v0.19.0.tar.gz",
"bazel-skylib.0.8.0.tar.gz",
"bazel-toolchains-1.1.0.tar.gz",
"be480e391cc88a75cf2a81960ef79c80d5012068.tar.gz",
"boringssl-66005f41fbc3529ffe8d007708756720529da20d.tar.xz",
"compiler-rt-9.0.0.src.tar.xz",
"curl-7.66.0.tar.gz",
"d1fe8a7d8ae18f3d454f055eba5213c291986f21.tar.gz",
"d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe.tar.gz",
"d35267580568517f09bdf70cb582e5284c25401a.tar.gz",
"d5b4c69b7113213c1da3a0ccbfd1ee1b40443c7a.tar.gz",
"d7003576dd133856432e2e07340f45926242cc3a.tar.gz",
"d7e070e7283f822b1d2787903cce3615536c5610.tar.gz",
"d85f82972c2def6db9c90f3d9a23f56a0ac3caff.tar.gz",
"fc00474ddc21fff618fc3f009b46590e241e425e.tar.gz",
"fd7de029969b7c0ef8b754660b997399b6fd812a.tar.gz",
"fmt-5.3.0.zip",
"msgpack-3.2.0.tar.gz",
"nghttp2-1.39.1.tar.gz",
"protobuf-all-3.9.2.tar.gz",
"rules_go-v0.20.1.tar.gz",
"six-1.10.0.tar.gz",
"tclap-1-2-1-release-final.tar.gz",
"thrift-0.11.0.tar.gz",
"twitter.common.finagle-thrift-0.3.9.tar.gz",
"twitter.common.lang-0.3.9.tar.gz",
"twitter.common.rpc-0.3.9.tar.gz",
"v0.7.2.tar.gz",
"v0.8.0.tar.gz",
"v1.1.0.tar.gz",
"v1.1.1.tar.gz",
"v1.22.1.tar.gz",
"v1.3.1.tar.gz",
"v1.5.0.tar.gz",
"v1.5.1.tar.gz",
"v2.1.0-beta3.tar.gz",
"v2.9.0.tar.gz",
"v8.1.0.tar.gz",
"yaml-cpp-0.6.3.tar.gz",
],
dirname = "derived/distdir",
sha256 = {
"0.2.2.tar.gz": "688c4fe170821dd589f36ec45aaadc03a618a40283bc1f97da8fa11686fc816b",
"0.3.9.4.tar.gz": "cbc8fba028635d959033c9ba8d8186a713165e94a9de02a030a20b3e64866a04",
"0.4.1.tar.gz": "801b35d996a097d223e028815fdba8667bf62bc5efb353486603d31fc2ba6ff9",
"015fc86d90f4045a56f831bcdfa560bc455450e2.tar.gz": "2f2b4bdb718250531f3ed9c2010272f04bbca92af70348714fd3687e86acc1f7",
"0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip": "36fa66d4d49debd71d05fba55c1353b522e8caef4a20f8080a3d17cdda001d89",
"0d7d85c2083f7a4c9efe01c061486f332b576d28.tar.gz": "549d34065eb2485dfad6c8de638caaa6616ed130eec36dd978f73b6bdd5af113",
"1.1.1.tar.gz": "222a10e3237d92a9cd45ed5ea882626bc72bc5e0264d3ed0f2c9129fa69fc167",
"14550beb3b7b97195e483fb74b5efb906395c31e.tar.gz": "3df5970908ed9a09ba51388d04661803a6af18c373866f442cede7f381e0b94a",
"2.10.3.tar.gz": "db49236731373e4f3118af880eb91bb0aa6978bc0cf8b35760f6a026f1a9ffc4",
"2.2.0-rc2.zip": "ae7a1696c0a0302b43c5b21e515c37e6ecd365941f68a510a7e442eebddf39a1",
"2019-09-01.tar.gz": "b0382aa7369f373a0148218f2df5a6afd6bfa884ce4da2dfb576b979989e615e",
"2feabd5d64436e670084091a937855972ee35161.tar.gz": "a447458b47ea4dc1d31499f555769af437c5d129d988ec1e13d5fdd0a6a36b4e",
"4abb566fbbc63df8fe7c1ac30b21632b9eb18d0c.tar.gz": "c60bca3cf7f58b91394a89da96080657ff0fbe4d5675be9b21e90da8f68bc06f",
"5565939d4203234ddc742c02241ce4523e7b3beb.tar.gz": "891352824e0f7977bc0c291b8c65076e3ed23630334841b93f346f12d4484b06",
"5cec5ea58c3efa81fa808f2bd38ce182da9ee731.tar.gz": "faeb93f293ff715b0cb530d273901c0e2e99277b9ed1c0a0326bca9ec5774ad2",
"5f50c68bdf5f107692bb027d1c568f67597f4d7f.tar.gz": "425dfee0c4fe9aff8acf2365cde3dd2ba7fb878d2ba37562d33920e34c40c05e",
"63a16dd6f2fc7bc841bb17ff92be8318df60e2e1.tar.gz": "8165aa25e529d7d4b9ae849d3bf30371255a99d6db0421516abcff23214cdc2c",
"74ad4281edd4ceca658888602af74bf2050107f0.tar.gz": "881e12d01c1703060343cd761164c98c731ef8dd52be4ee71e5501a87a2c0c1f",
"79baebe50e4d6b73ae1f8b603f0ef41300110aa3.tar.gz": "155a8f8c1a753fb05b16a1b0cc0a0a9f61a78e245f9e0da483d13043b3bcbf2e",
"7bc4be735b0560289f6b86ab6136ee25d20b65b7.tar.gz": "3184c244b32e65637a74213fc448964b687390eeeca42a36286f874c046bba15",
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
"97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz": "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208",
"98970f78091ae65b4a029bcf512696ba6d665cf4.tar.gz": "c95ab57835182b8b4b17cf5bbfc2406805bc78c5022c17399f3e5c643f22826a",
"99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c.tar.gz": "783bdaf8ee0464b35ec0c8704871e1e72afa0005c3f3587f65d9d6694bf3911b",
"9f10e2d60d42edeb6662e185707a7d6a4ebc5604.tar.gz": "480ff74bcdea9e177a803feb8f797c76abd38a80ec27d93b64f4d56e7cfd28a1",
"a6b28555badcb18d6be924c8fc1bea49971656b8.tar.gz": "d0f88bef8bd7f76c3684407977f5673f3d06a6c50d4ddaffb8f0e7df6b0ef69e",
"b4d7f8e1aa1ebbe75aaf959d93caf5826599c9ab.tar.gz": "9aab6a1f907e05b18c4a4578f79fd93b028a9c944555db9e7d732222a46dafa8",
"bazel-gazelle-v0.19.0.tar.gz": "41bff2a0b32b02f20c227d234aa25ef3783998e5453f7eade929704dcff7cd4b",
"bazel-skylib.0.8.0.tar.gz": "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e",
"bazel-toolchains-1.1.0.tar.gz": "1e16833a9f0e32b292568c0dfee7bd48133c2038605757d3a430551394310006",
"be480e391cc88a75cf2a81960ef79c80d5012068.tar.gz": "c1969e5b72eab6d9b6cfcff748e45ba57294aeea1d96fd04cd081995de0605c2",
"boringssl-66005f41fbc3529ffe8d007708756720529da20d.tar.xz": "b12ad676ee533824f698741bd127f6fbc82c46344398a6d78d25e62c6c418c73",
"compiler-rt-9.0.0.src.tar.xz": "56e4cd96dd1d8c346b07b4d6b255f976570c6f2389697347a6c3dcb9e820d10e",
"curl-7.66.0.tar.gz": "d0393da38ac74ffac67313072d7fe75b1fa1010eb5987f63f349b024a36b7ffb",
"d1fe8a7d8ae18f3d454f055eba5213c291986f21.tar.gz": "f45c3ad82376d891cd0bcaa7165e83efd90e0014b00aebf0cbaf07eb05a1d3f9",
"d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe.tar.gz": "ca81b8e467543383b04a33d125425f2a584a3df978761329eaa3a9aef947e594",
"d35267580568517f09bdf70cb582e5284c25401a.tar.gz": "0644a5744765eb2fcb23b730f5643dd4c7391c9a093b731c3002fb5a6617ef40",
"d5b4c69b7113213c1da3a0ccbfd1ee1b40443c7a.tar.gz": "335a761fac2dbae219c68c23e674bf5ddff43f99521b35bb63a1ab342e50931e",
"d7003576dd133856432e2e07340f45926242cc3a.tar.gz": "cbd251a40485fddd44cdf641af6df2953d45695853af6d68aeb11c7efcde6771",
"d7e070e7283f822b1d2787903cce3615536c5610.tar.gz": "bbaab13d6ad399a278d476f533e4d88a7ec7d729507348bb9c2e3b207ba4c606",
"d85f82972c2def6db9c90f3d9a23f56a0ac3caff.tar.gz": "e21d11be5eca677fe79839d310ceffb2f950d9d03f7682af8c0d311e573a1302",
"fc00474ddc21fff618fc3f009b46590e241e425e.tar.gz": "18574813a062eee487bc1b761e8024a346075a7cb93da19607af362dc09565ef",
"fd7de029969b7c0ef8b754660b997399b6fd812a.tar.gz": "55c6ad4a1b405938524ab55b18349c824d3fc6eaef580e1ef2a9dfe39f737b9e",
"fmt-5.3.0.zip": "4c0741e10183f75d7d6f730b8708a99b329b2f942dad5a9da3385ab92bb4a15c",
"msgpack-3.2.0.tar.gz": "fbaa28c363a316fd7523f31d1745cf03eab0d1e1ea5a1c60aa0dffd4ce551afe",
"nghttp2-1.39.1.tar.gz": "25b623cd04dc6a863ca3b34ed6247844effe1aa5458229590b3f56a6d53cd692",
"protobuf-all-3.9.2.tar.gz": "7c99ddfe0227cbf6a75d1e75b194e0db2f672d2d2ea88fb06bdc83fe0af4c06d",
"rules_go-v0.20.1.tar.gz": "842ec0e6b4fbfdd3de6150b61af92901eeb73681fd4d185746644c338f51d4c0",
"six-1.10.0.tar.gz": "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
"tclap-1-2-1-release-final.tar.gz": "f0ede0721dddbb5eba3a47385a6e8681b14f155e1129dd39d1a959411935098f",
"thrift-0.11.0.tar.gz": "7d59ac4fdcb2c58037ebd4a9da5f9a49e3e034bf75b3f26d9fe48ba3d8806e6b",
"twitter.common.finagle-thrift-0.3.9.tar.gz": "1e3a57d11f94f58745e6b83348ecd4fa74194618704f45444a15bc391fde497a",
"twitter.common.lang-0.3.9.tar.gz": "56d1d266fd4767941d11c27061a57bc1266a3342e551bde3780f9e9eb5ad0ed1",
"twitter.common.rpc-0.3.9.tar.gz": "0792b63fb2fb32d970c2e9a409d3d00633190a22eb185145fe3d9067fdaa4514",
"v0.7.2.tar.gz": "7e93d28e81c3e95ff07674a400001d0cdf23b7842d49b211e5582d00d8e3ac3e",
"v0.8.0.tar.gz": "defbf471facfebde6523ca1177529b63784893662d4ef2c60db074be8aef0634",
"v1.1.0.tar.gz": "bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e",
"v1.1.1.tar.gz": "052fd37cd698e24ab73ee18fc3fa55acd1d43153c12a0e65b0fba0447de1117e",
"v1.22.1.tar.gz": "cce1d4585dd017980d4a407d8c5e9f8fc8c1dbb03f249b99e88a387ebb45a035",
"v1.3.1.tar.gz": "160845266e94db1d4922ef755637f6901266731c4cb3b30b45bf41efa0e6ab70",
"v1.5.0.tar.gz": "3c6a165b6ecc948967a1ead710d4a181d7b0fbcaa183ef7ea84604994966221a",
"v1.5.1.tar.gz": "015c4187f7a6426a2b5196f0ccd982aa87f010cf61f507ae3ce5c90523f92301",
"v2.1.0-beta3.tar.gz": "409f7fe570d3c16558e594421c47bdd130238323c9d6fd6c83dedd2aaeb082a8",
"v2.9.0.tar.gz": "ef26268c54c8084d17654ba2ed5140bffeffd2a040a895ffb22a6cca3f6c613f",
"v8.1.0.tar.gz": "ebea8a6968722524d1bcc4426fb6a29907ddc2902aac7de1559012d3eee90cf9",
"yaml-cpp-0.6.3.tar.gz": "77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed",
},
urls = {
"0.2.2.tar.gz": [
"https://github.com/openzipkin/zipkin-api/archive/0.2.2.tar.gz",
],
"0.3.9.4.tar.gz": [
"https://github.com/nanopb/nanopb/archive/0.3.9.4.tar.gz",
],
"0.4.1.tar.gz": [
"https://github.com/grailbio/bazel-compilation-database/archive/0.4.1.tar.gz",
],
"015fc86d90f4045a56f831bcdfa560bc455450e2.tar.gz": [
"https://github.com/cncf/udpa/archive/015fc86d90f4045a56f831bcdfa560bc455450e2.tar.gz",
],
"0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip": [
"https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip",
],
"0d7d85c2083f7a4c9efe01c061486f332b576d28.tar.gz": [
"https://github.com/libevent/libevent/archive/0d7d85c2083f7a4c9efe01c061486f332b576d28.tar.gz",
],
"1.1.1.tar.gz": [
"https://github.com/pallets/markupsafe/archive/1.1.1.tar.gz",
],
"14550beb3b7b97195e483fb74b5efb906395c31e.tar.gz": [
"https://github.com/abseil/abseil-cpp/archive/14550beb3b7b97195e483fb74b5efb906395c31e.tar.gz",
],
"2.10.3.tar.gz": [
"https://github.com/pallets/jinja/archive/2.10.3.tar.gz",
],
"2.2.0-rc2.zip": [
"https://github.com/apache/kafka/archive/2.2.0-rc2.zip",
],
"2019-09-01.tar.gz": [
"https://github.com/google/re2/archive/2019-09-01.tar.gz",
],
"2feabd5d64436e670084091a937855972ee35161.tar.gz": [
"https://github.com/grpc-ecosystem/grpc-httpjson-transcoding/archive/2feabd5d64436e670084091a937855972ee35161.tar.gz",
],
"4abb566fbbc63df8fe7c1ac30b21632b9eb18d0c.tar.gz": [
"https://storage.googleapis.com/quiche-envoy-integration/4abb566fbbc63df8fe7c1ac30b21632b9eb18d0c.tar.gz",
],
"5565939d4203234ddc742c02241ce4523e7b3beb.tar.gz": [
"https://github.com/google/boringssl/archive/5565939d4203234ddc742c02241ce4523e7b3beb.tar.gz",
],
"5cec5ea58c3efa81fa808f2bd38ce182da9ee731.tar.gz": [
"https://github.com/census-instrumentation/opencensus-proto/archive/5cec5ea58c3efa81fa808f2bd38ce182da9ee731.tar.gz",
],
"5f50c68bdf5f107692bb027d1c568f67597f4d7f.tar.gz": [
"https://github.com/envoyproxy/sql-parser/archive/5f50c68bdf5f107692bb027d1c568f67597f4d7f.tar.gz",
],
"63a16dd6f2fc7bc841bb17ff92be8318df60e2e1.tar.gz": [
"https://github.com/circonus-labs/libcircllhist/archive/63a16dd6f2fc7bc841bb17ff92be8318df60e2e1.tar.gz",
],
"74ad4281edd4ceca658888602af74bf2050107f0.tar.gz": [
"https://github.com/pantor/inja/archive/74ad4281edd4ceca658888602af74bf2050107f0.tar.gz",
],
"79baebe50e4d6b73ae1f8b603f0ef41300110aa3.tar.gz": [
"https://github.com/madler/zlib/archive/79baebe50e4d6b73ae1f8b603f0ef41300110aa3.tar.gz",
],
"7bc4be735b0560289f6b86ab6136ee25d20b65b7.tar.gz": [
"https://github.com/bazelbuild/rules_foreign_cc/archive/7bc4be735b0560289f6b86ab6136ee25d20b65b7.tar.gz",
],
"7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": [
"https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
],
"97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz": [
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
"https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
],
"98970f78091ae65b4a029bcf512696ba6d665cf4.tar.gz": [
"https://github.com/census-instrumentation/opencensus-cpp/archive/98970f78091ae65b4a029bcf512696ba6d665cf4.tar.gz",
],
"99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c.tar.gz": [
"https://github.com/prometheus/client_model/archive/99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c.tar.gz",
],
"9f10e2d60d42edeb6662e185707a7d6a4ebc5604.tar.gz": [
"https://github.com/google/jwt_verify_lib/archive/9f10e2d60d42edeb6662e185707a7d6a4ebc5604.tar.gz",
],
"a6b28555badcb18d6be924c8fc1bea49971656b8.tar.gz": [
"https://github.com/envoyproxy/envoy-build-tools/archive/a6b28555badcb18d6be924c8fc1bea49971656b8.tar.gz",
],
"b4d7f8e1aa1ebbe75aaf959d93caf5826599c9ab.tar.gz": [
"https://github.com/edenhill/librdkafka/archive/b4d7f8e1aa1ebbe75aaf959d93caf5826599c9ab.tar.gz",
],
"bazel-gazelle-v0.19.0.tar.gz": [
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.19.0/bazel-gazelle-v0.19.0.tar.gz",
],
"bazel-skylib.0.8.0.tar.gz": [
"https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz",
],
"bazel-toolchains-1.1.0.tar.gz": [
"https://github.com/bazelbuild/bazel-toolchains/releases/download/1.1.0/bazel-toolchains-1.1.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/1.1.0.tar.gz",
],
"be480e391cc88a75cf2a81960ef79c80d5012068.tar.gz": [
"https://github.com/googleapis/googleapis/archive/be480e391cc88a75cf2a81960ef79c80d5012068.tar.gz",
],
"boringssl-66005f41fbc3529ffe8d007708756720529da20d.tar.xz": [
"https://commondatastorage.googleapis.com/chromium-boringssl-docs/fips/boringssl-66005f41fbc3529ffe8d007708756720529da20d.tar.xz",
],
"compiler-rt-9.0.0.src.tar.xz": [
"http://releases.llvm.org/9.0.0/compiler-rt-9.0.0.src.tar.xz",
],
"curl-7.66.0.tar.gz": [
"https://github.com/curl/curl/releases/download/curl-7_66_0/curl-7.66.0.tar.gz",
],
"d1fe8a7d8ae18f3d454f055eba5213c291986f21.tar.gz": [
"https://github.com/google/libprotobuf-mutator/archive/d1fe8a7d8ae18f3d454f055eba5213c291986f21.tar.gz",
],
"d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe.tar.gz": [
"https://envoy.nos-eastchina1.126.net/build/external_deps/d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe.tar.gz",
"https://github.com/nlohmann/json/archive/d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe.tar.gz",
],
"d35267580568517f09bdf70cb582e5284c25401a.tar.gz": [
"https://github.com/sewenew/redis-plus-plus/archive/d35267580568517f09bdf70cb582e5284c25401a.tar.gz",
],
"d5b4c69b7113213c1da3a0ccbfd1ee1b40443c7a.tar.gz": [
"https://github.com/redis/hiredis/archive/d5b4c69b7113213c1da3a0ccbfd1ee1b40443c7a.tar.gz",
],
"d7003576dd133856432e2e07340f45926242cc3a.tar.gz": [
"https://github.com/google/googletest/archive/d7003576dd133856432e2e07340f45926242cc3a.tar.gz",
],
"d7e070e7283f822b1d2787903cce3615536c5610.tar.gz": [
"https://github.com/c-ares/c-ares/archive/d7e070e7283f822b1d2787903cce3615536c5610.tar.gz",
],
"d85f82972c2def6db9c90f3d9a23f56a0ac3caff.tar.gz": [
"https://github.com/google/cel-cpp/archive/d85f82972c2def6db9c90f3d9a23f56a0ac3caff.tar.gz",
],
"fc00474ddc21fff618fc3f009b46590e241e425e.tar.gz": [
"https://github.com/gperftools/gperftools/archive/fc00474ddc21fff618fc3f009b46590e241e425e.tar.gz",
],
"fd7de029969b7c0ef8b754660b997399b6fd812a.tar.gz": [
"https://github.com/envoyproxy/protoc-gen-validate/archive/fd7de029969b7c0ef8b754660b997399b6fd812a.tar.gz",
],
"fmt-5.3.0.zip": [
"https://github.com/fmtlib/fmt/releases/download/5.3.0/fmt-5.3.0.zip",
],
"msgpack-3.2.0.tar.gz": [
"https://github.com/msgpack/msgpack-c/releases/download/cpp-3.2.0/msgpack-3.2.0.tar.gz",
],
"nghttp2-1.39.1.tar.gz": [
"https://github.com/nghttp2/nghttp2/releases/download/v1.39.1/nghttp2-1.39.1.tar.gz",
],
"protobuf-all-3.9.2.tar.gz": [
"https://github.com/protocolbuffers/protobuf/releases/download/v3.9.2/protobuf-all-3.9.2.tar.gz",
],
"rules_go-v0.20.1.tar.gz": [
"https://github.com/bazelbuild/rules_go/releases/download/v0.20.1/rules_go-v0.20.1.tar.gz",
],
"six-1.10.0.tar.gz": [
"https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz",
],
"tclap-1-2-1-release-final.tar.gz": [
"https://github.com/mirror/tclap/archive/tclap-1-2-1-release-final.tar.gz",
],
"thrift-0.11.0.tar.gz": [
"https://files.pythonhosted.org/packages/c6/b4/510617906f8e0c5660e7d96fbc5585113f83ad547a3989b80297ac72a74c/thrift-0.11.0.tar.gz",
],
"twitter.common.finagle-thrift-0.3.9.tar.gz": [
"https://files.pythonhosted.org/packages/f9/e7/4f80d582578f8489226370762d2cf6bc9381175d1929eba1754e03f70708/twitter.common.finagle-thrift-0.3.9.tar.gz",
],
"twitter.common.lang-0.3.9.tar.gz": [
"https://files.pythonhosted.org/packages/08/bc/d6409a813a9dccd4920a6262eb6e5889e90381453a5f58938ba4cf1d9420/twitter.common.lang-0.3.9.tar.gz",
],
"twitter.common.rpc-0.3.9.tar.gz": [
"https://files.pythonhosted.org/packages/be/97/f5f701b703d0f25fbf148992cd58d55b4d08d3db785aad209255ee67e2d0/twitter.common.rpc-0.3.9.tar.gz",
],
"v0.7.2.tar.gz": [
"https://github.com/Cyan4973/xxHash/archive/v0.7.2.tar.gz",
],
"v0.8.0.tar.gz": [
"https://github.com/lightstep/lightstep-tracer-cpp/archive/v0.8.0.tar.gz",
],
"v1.1.0.tar.gz": [
"https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz",
],
"v1.1.1.tar.gz": [
"https://github.com/DataDog/dd-opentracing-cpp/archive/v1.1.1.tar.gz",
],
"v1.22.1.tar.gz": [
"https://github.com/grpc/grpc/archive/v1.22.1.tar.gz",
],
"v1.3.1.tar.gz": [
"https://github.com/gabime/spdlog/archive/v1.3.1.tar.gz",
],
"v1.5.0.tar.gz": [
"https://github.com/google/benchmark/archive/v1.5.0.tar.gz",
],
"v1.5.1.tar.gz": [
"https://github.com/opentracing/opentracing-cpp/archive/v1.5.1.tar.gz",
],
"v2.1.0-beta3.tar.gz": [
"https://github.com/LuaJIT/LuaJIT/archive/v2.1.0-beta3.tar.gz",
],
"v2.9.0.tar.gz": [
"https://github.com/nodejs/http-parser/archive/v2.9.0.tar.gz",
],
"v8.1.0.tar.gz": [
"https://github.com/apache/skywalking-data-collect-protocol/archive/v8.1.0.tar.gz",
],
"yaml-cpp-0.6.3.tar.gz": [
"https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.6.3.tar.gz",
],
},
)
| 65.338109
| 164
| 0.670877
| 1,846
| 22,803
| 8.27519
| 0.167389
| 0.079537
| 0.041241
| 0.056559
| 0.498887
| 0.443113
| 0.229707
| 0.205682
| 0.13878
| 0.108274
| 0
| 0.359671
| 0.204666
| 22,803
| 348
| 165
| 65.525862
| 0.482631
| 0.002851
| 0
| 0.194203
| 0
| 0.13913
| 0.737905
| 0.42303
| 0
| 0
| 0
| 0
| 0
| 1
| 0.002899
| true
| 0
| 0.002899
| 0
| 0.005797
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
760cd1e6d299c97d3889f21718bdfb6fbe4793fe
| 102
|
py
|
Python
|
skyjump/__main__.py
|
Akida31/skyjump
|
d51270ae9c67e213761a9bd294b2643912a205d5
|
[
"MIT"
] | null | null | null |
skyjump/__main__.py
|
Akida31/skyjump
|
d51270ae9c67e213761a9bd294b2643912a205d5
|
[
"MIT"
] | null | null | null |
skyjump/__main__.py
|
Akida31/skyjump
|
d51270ae9c67e213761a9bd294b2643912a205d5
|
[
"MIT"
] | null | null | null |
"""
entrypoint of the simple skyjump game
"""
from skyjump.game import Game
game = Game()
game.run()
| 12.75
| 37
| 0.705882
| 15
| 102
| 4.8
| 0.6
| 0.333333
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 102
| 7
| 38
| 14.571429
| 0.847059
| 0.362745
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7614983c8e7000ed2cd72bb72292e73900bf667d
| 71
|
py
|
Python
|
app/daemon/__init__.py
|
pommes/docker-ndp-proxy
|
44bf457672ae2b266ac4bda20ae0a397e93342b6
|
[
"Unlicense"
] | 2
|
2021-05-06T21:14:20.000Z
|
2021-08-03T20:54:37.000Z
|
app/daemon/__init__.py
|
pommes/docker-ndp-proxy
|
44bf457672ae2b266ac4bda20ae0a397e93342b6
|
[
"Unlicense"
] | 2
|
2020-10-29T17:38:27.000Z
|
2020-10-29T17:39:52.000Z
|
app/daemon/__init__.py
|
pommes/docker-ndp-proxy
|
44bf457672ae2b266ac4bda20ae0a397e93342b6
|
[
"Unlicense"
] | 3
|
2020-10-29T17:36:00.000Z
|
2022-03-27T15:58:27.000Z
|
from .events import DockerEventDaemon
from .ndp import DockerNdpDaemon
| 23.666667
| 37
| 0.859155
| 8
| 71
| 7.625
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112676
| 71
| 2
| 38
| 35.5
| 0.968254
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7615c2c7b714e562d893cabb1a37745ba5dd7e9d
| 63
|
py
|
Python
|
test_dir.py
|
sumforest/first_python
|
93d6349bc9741c84174ff4982b04099beab72971
|
[
"Apache-2.0"
] | null | null | null |
test_dir.py
|
sumforest/first_python
|
93d6349bc9741c84174ff4982b04099beab72971
|
[
"Apache-2.0"
] | null | null | null |
test_dir.py
|
sumforest/first_python
|
93d6349bc9741c84174ff4982b04099beab72971
|
[
"Apache-2.0"
] | null | null | null |
import support,sys
print(dir(support))
print()
print(dir(sys))
| 12.6
| 19
| 0.746032
| 10
| 63
| 4.7
| 0.5
| 0.340426
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079365
| 63
| 5
| 20
| 12.6
| 0.810345
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0.75
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
76191fa827e328e32da77c27590124f99f140e62
| 34,958
|
py
|
Python
|
showcase/migrations/0001_initial.py
|
aseufert/sporttechiq
|
90812142bedf63fed9d1e5f3b246b78299aa45f7
|
[
"MIT"
] | null | null | null |
showcase/migrations/0001_initial.py
|
aseufert/sporttechiq
|
90812142bedf63fed9d1e5f3b246b78299aa45f7
|
[
"MIT"
] | null | null | null |
showcase/migrations/0001_initial.py
|
aseufert/sporttechiq
|
90812142bedf63fed9d1e5f3b246b78299aa45f7
|
[
"MIT"
] | null | null | null |
# Generated by Django 2.0 on 2018-12-26 22:16
from django.db import migrations, models
import django.db.models.deletion
import showcase.file_size_validator
class Migration(migrations.Migration):
initial = True
dependencies = [
('wagtaildocs', '0008_document_file_size'),
('wagtailimages', '0021_image_file_hash'),
]
operations = [
migrations.CreateModel(
name='Club',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('club_name', models.CharField(help_text='Enter the club name here', max_length=100)),
('photo', models.ImageField(blank=True, null=True, upload_to='club_logos', validators=[showcase.file_size_validator.file_size])),
('registration_code', models.CharField(help_text='Club registration code used for player signup. Autogenerated upon save.', max_length=10, null=True, unique=True)),
('control_thigh_avg', models.FloatField(default=0.0)),
('control_foot_avg', models.FloatField(default=0.0)),
('foot_tap_avg', models.FloatField(default=0.0)),
('speed_dribble_avg', models.FloatField(default=0.0)),
('dribble_r_avg', models.FloatField(default=0.0)),
('dribble_l_avg', models.FloatField(default=0.0)),
('dribble_3_cone_avg', models.FloatField(default=0.0)),
('long_r_1_avg', models.FloatField(default=0.0)),
('long_r_2_avg', models.FloatField(default=0.0)),
('long_l_1_avg', models.FloatField(default=0.0)),
('long_l_2_avg', models.FloatField(default=0.0)),
('cross_r_1_avg', models.FloatField(default=0.0)),
('cross_r_2_avg', models.FloatField(default=0.0)),
('cross_l_1_avg', models.FloatField(default=0.0)),
('cross_l_2_avg', models.FloatField(default=0.0)),
('side_pass_r_1_avg', models.FloatField(default=0.0)),
('side_pass_r_2_avg', models.FloatField(default=0.0)),
('side_pass_r_3_avg', models.FloatField(default=0.0)),
('side_pass_l_1_avg', models.FloatField(default=0.0)),
('side_pass_l_2_avg', models.FloatField(default=0.0)),
('side_pass_l_3_avg', models.FloatField(default=0.0)),
('weigh_pass_r_1_avg', models.FloatField(default=0.0)),
('weigh_pass_r_2_avg', models.FloatField(default=0.0)),
('weigh_pass_r_3_avg', models.FloatField(default=0.0)),
('weigh_pass_l_1_avg', models.FloatField(default=0.0)),
('weigh_pass_l_2_avg', models.FloatField(default=0.0)),
('weigh_pass_l_3_avg', models.FloatField(default=0.0)),
('throw_inside_1_avg', models.FloatField(default=0.0)),
('throw_inside_2_avg', models.FloatField(default=0.0)),
('throw_between_1_avg', models.FloatField(default=0.0)),
('throw_between_2_avg', models.FloatField(default=0.0)),
('shoot_pk_avg', models.FloatField(default=0.0)),
('shoot_run_r_1_avg', models.FloatField(default=0.0)),
('shoot_run_r_2_avg', models.FloatField(default=0.0)),
('shoot_run_r_3_avg', models.FloatField(default=0.0)),
('shoot_run_l_1_avg', models.FloatField(default=0.0)),
('shoot_run_l_2_avg', models.FloatField(default=0.0)),
('shoot_run_l_3_avg', models.FloatField(default=0.0)),
('finisher_r_1_avg', models.FloatField(default=0.0)),
('finisher_r_2_avg', models.FloatField(default=0.0)),
('finisher_r_3_avg', models.FloatField(default=0.0)),
('finisher_l_1_avg', models.FloatField(default=0.0)),
('finisher_l_2_avg', models.FloatField(default=0.0)),
('finisher_l_3_avg', models.FloatField(default=0.0)),
('total_control_avg', models.FloatField(default=0.0)),
('total_dribbling_avg', models.FloatField(default=0.0)),
('total_passing_avg', models.FloatField(default=0.0)),
('total_shooting_avg', models.FloatField(default=0.0)),
('grand_total_avg', models.FloatField(default=0.0)),
],
),
migrations.CreateModel(
name='Coach',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('first_name', models.CharField(help_text='First Name', max_length=100)),
('last_name', models.CharField(help_text='Last Name', max_length=100)),
],
options={
'verbose_name_plural': 'Coaches',
},
),
migrations.CreateModel(
name='Director',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('first_name', models.CharField(help_text='First Name', max_length=100)),
('last_name', models.CharField(help_text='Last Name', max_length=100)),
],
),
migrations.CreateModel(
name='FieldLayout',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='Enter the field layout name here', max_length=100)),
],
),
migrations.CreateModel(
name='Player',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('first_name', models.CharField(help_text='First Name', max_length=100)),
('last_name', models.CharField(help_text='Last Name', max_length=100)),
('slug', models.SlugField(max_length=255, unique=True)),
('photo', models.ImageField(blank=True, null=True, upload_to='players', validators=[showcase.file_size_validator.file_size])),
('trading_card', models.ImageField(blank=True, help_text='Autogenerated. Do not load file unless necessary.', null=True, upload_to='cards')),
('birth_year', models.SmallIntegerField(blank=True, choices=[(1990, 1990), (1991, 1991), (1992, 1992), (1993, 1993), (1994, 1994), (1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018)], null=True)),
('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
('city', models.CharField(blank=True, max_length=100, null=True)),
('state', models.CharField(blank=True, choices=[('AK', 'Alaska'), ('AL', 'Alabama'), ('AR', 'Arkansas'), ('AS', 'American Samoa'), ('AZ', 'Arizona'), ('CA', 'California'), ('CO', 'Colorado'), ('CT', 'Connecticut'), ('DC', 'District of Columbia'), ('DE', 'Delaware'), ('FL', 'Florida'), ('GA', 'Georgia'), ('GU', 'Guam'), ('HI', 'Hawaii'), ('IA', 'Iowa'), ('ID', 'Idaho'), ('IL', 'Illinois'), ('IN', 'Indiana'), ('KS', 'Kansas'), ('KY', 'Kentucky'), ('LA', 'Louisiana'), ('MA', 'Massachusetts'), ('MD', 'Maryland'), ('ME', 'Maine'), ('MI', 'Michigan'), ('MN', 'Minnesota'), ('MO', 'Missouri'), ('MP', 'Northern Mariana Islands'), ('MS', 'Mississippi'), ('MT', 'Montana'), ('NA', 'National'), ('NC', 'North Carolina'), ('ND', 'North Dakota'), ('NE', 'Nebraska'), ('NH', 'New Hampshire'), ('NJ', 'New Jersey'), ('NM', 'New Mexico'), ('NV', 'Nevada'), ('NY', 'New York'), ('OH', 'Ohio'), ('OK', 'Oklahoma'), ('OR', 'Oregon'), ('PA', 'Pennsylvania'), ('PR', 'Puerto Rico'), ('RI', 'Rhode Island'), ('SC', 'South Carolina'), ('SD', 'South Dakota'), ('TN', 'Tennessee'), ('TX', 'Texas'), ('UT', 'Utah'), ('VA', 'Virginia'), ('VI', 'Virgin Islands'), ('VT', 'Vermont'), ('WA', 'Washington'), ('WI', 'Wisconsin'), ('WV', 'West Virginia'), ('WY', 'Wyoming'), ('N/A', 'N/A')], max_length=3, null=True)),
('region', models.CharField(blank=True, choices=[('South', 'South'), ('West', 'West'), ('East', 'East'), ('Midwest', 'Midwest')], max_length=10, null=True)),
('country', models.CharField(blank=True, choices=[('United States', 'United States'), ('Afghanistan', 'Afghanistan'), ('Albania', 'Albania'), ('Algeria', 'Algeria'), ('American Samoa', 'American Samoa'), ('Andorra', 'Andorra'), ('Angola', 'Angola'), ('Anguilla', 'Anguilla'), ('Antarctica', 'Antarctica'), ('Antigua And Barbuda', 'Antigua And Barbuda'), ('Argentina', 'Argentina'), ('Armenia', 'Armenia'), ('Aruba', 'Aruba'), ('Australia', 'Australia'), ('Austria', 'Austria'), ('Azerbaijan', 'Azerbaijan'), ('Bahamas', 'Bahamas'), ('Bahrain', 'Bahrain'), ('Bangladesh', 'Bangladesh'), ('Barbados', 'Barbados'), ('Belarus', 'Belarus'), ('Belgium', 'Belgium'), ('Belize', 'Belize'), ('Benin', 'Benin'), ('Bermuda', 'Bermuda'), ('Bhutan', 'Bhutan'), ('Bolivia', 'Bolivia'), ('Bosnia And Herzegowina', 'Bosnia And Herzegowina'), ('Botswana', 'Botswana'), ('Bouvet Island', 'Bouvet Island'), ('Brazil', 'Brazil'), ('Brunei Darussalam', 'Brunei Darussalam'), ('Bulgaria', 'Bulgaria'), ('Burkina Faso', 'Burkina Faso'), ('Burundi', 'Burundi'), ('Cambodia', 'Cambodia'), ('Cameroon', 'Cameroon'), ('Canada', 'Canada'), ('Cape Verde', 'Cape Verde'), ('Cayman Islands', 'Cayman Islands'), ('Central African Rep', 'Central African Rep'), ('Chad', 'Chad'), ('Chile', 'Chile'), ('China', 'China'), ('Christmas Island', 'Christmas Island'), ('Cocos Islands', 'Cocos Islands'), ('Colombia', 'Colombia'), ('Comoros', 'Comoros'), ('Congo', 'Congo'), ('Cook Islands', 'Cook Islands'), ('Costa Rica', 'Costa Rica'), ('Cote D`ivoire', 'Cote D`ivoire'), ('Croatia', 'Croatia'), ('Cuba', 'Cuba'), ('Cyprus', 'Cyprus'), ('Czech Republic', 'Czech Republic'), ('Denmark', 'Denmark'), ('Djibouti', 'Djibouti'), ('Dominica', 'Dominica'), ('Dominican Republic', 'Dominican Republic'), ('East Timor', 'East Timor'), ('Ecuador', 'Ecuador'), ('Egypt', 'Egypt'), ('El Salvador', 'El Salvador'), ('Equatorial Guinea', 'Equatorial Guinea'), ('Eritrea', 'Eritrea'), ('Estonia', 'Estonia'), ('Ethiopia', 'Ethiopia'), ('Falkland Islands (Malvinas)', 'Falkland Islands (Malvinas)'), ('Faroe Islands', 'Faroe Islands'), ('Fiji', 'Fiji'), ('Finland', 'Finland'), ('France', 'France'), ('French Guiana', 'French Guiana'), ('French Polynesia', 'French Polynesia'), ('French S. Territories', 'French S. Territories'), ('Gabon', 'Gabon'), ('Gambia', 'Gambia'), ('Georgia', 'Georgia'), ('Germany', 'Germany'), ('Ghana', 'Ghana'), ('Gibraltar', 'Gibraltar'), ('Greece', 'Greece'), ('Greenland', 'Greenland'), ('Grenada', 'Grenada'), ('Guadeloupe', 'Guadeloupe'), ('Guam', 'Guam'), ('Guatemala', 'Guatemala'), ('Guinea', 'Guinea'), ('Guinea-bissau', 'Guinea-bissau'), ('Guyana', 'Guyana'), ('Haiti', 'Haiti'), ('Honduras', 'Honduras'), ('Hong Kong', 'Hong Kong'), ('Hungary', 'Hungary'), ('Iceland', 'Iceland'), ('India', 'India'), ('Indonesia', 'Indonesia'), ('Iran', 'Iran'), ('Iraq', 'Iraq'), ('Ireland', 'Ireland'), ('Israel', 'Israel'), ('Italy', 'Italy'), ('Jamaica', 'Jamaica'), ('Japan', 'Japan'), ('Jordan', 'Jordan'), ('Kazakhstan', 'Kazakhstan'), ('Kenya', 'Kenya'), ('Kiribati', 'Kiribati'), ('Korea (North)', 'Korea (North)'), ('Korea (South)', 'Korea (South)'), ('Kuwait', 'Kuwait'), ('Kyrgyzstan', 'Kyrgyzstan'), ('Laos', 'Laos'), ('Latvia', 'Latvia'), ('Lebanon', 'Lebanon'), ('Lesotho', 'Lesotho'), ('Liberia', 'Liberia'), ('Libya', 'Libya'), ('Liechtenstein', 'Liechtenstein'), ('Lithuania', 'Lithuania'), ('Luxembourg', 'Luxembourg'), ('Macau', 'Macau'), ('Macedonia', 'Macedonia'), ('Madagascar', 'Madagascar'), ('Malawi', 'Malawi'), ('Malaysia', 'Malaysia'), ('Maldives', 'Maldives'), ('Mali', 'Mali'), ('Malta', 'Malta'), ('Marshall Islands', 'Marshall Islands'), ('Martinique', 'Martinique'), ('Mauritania', 'Mauritania'), ('Mauritius', 'Mauritius'), ('Mayotte', 'Mayotte'), ('Mexico', 'Mexico'), ('Micronesia', 'Micronesia'), ('Moldova', 'Moldova'), ('Monaco', 'Monaco'), ('Mongolia', 'Mongolia'), ('Montserrat', 'Montserrat'), ('Morocco', 'Morocco'), ('Mozambique', 'Mozambique'), ('Myanmar', 'Myanmar'), ('Namibia', 'Namibia'), ('Nauru', 'Nauru'), ('Nepal', 'Nepal'), ('Netherlands', 'Netherlands'), ('Netherlands Antilles', 'Netherlands Antilles'), ('New Caledonia', 'New Caledonia'), ('New Zealand', 'New Zealand'), ('Nicaragua', 'Nicaragua'), ('Niger', 'Niger'), ('Nigeria', 'Nigeria'), ('Niue', 'Niue'), ('Norfolk Island', 'Norfolk Island'), ('Northern Mariana Islands', 'Northern Mariana Islands'), ('Norway', 'Norway'), ('Oman', 'Oman'), ('Pakistan', 'Pakistan'), ('Palau', 'Palau'), ('Panama', 'Panama'), ('Papua New Guinea', 'Papua New Guinea'), ('Paraguay', 'Paraguay'), ('Peru', 'Peru'), ('Philippines', 'Philippines'), ('Pitcairn', 'Pitcairn'), ('Poland', 'Poland'), ('Portugal', 'Portugal'), ('Puerto Rico', 'Puerto Rico'), ('Qatar', 'Qatar'), ('Reunion', 'Reunion'), ('Romania', 'Romania'), ('Russian Federation', 'Russian Federation'), ('Rwanda', 'Rwanda'), ('Saint Kitts And Nevis', 'Saint Kitts And Nevis'), ('Saint Lucia', 'Saint Lucia'), ('St Vincent/Grenadines', 'St Vincent/Grenadines'), ('Samoa', 'Samoa'), ('San Marino', 'San Marino'), ('Sao Tome', 'Sao Tome'), ('Saudi Arabia', 'Saudi Arabia'), ('Senegal', 'Senegal'), ('Seychelles', 'Seychelles'), ('Sierra Leone', 'Sierra Leone'), ('Singapore', 'Singapore'), ('Slovakia', 'Slovakia'), ('Slovenia', 'Slovenia'), ('Solomon Islands', 'Solomon Islands'), ('Somalia', 'Somalia'), ('South Africa', 'South Africa'), ('Spain', 'Spain'), ('Sri Lanka', 'Sri Lanka'), ('St. Helena', 'St. Helena'), ('St.Pierre', 'St.Pierre'), ('Sudan', 'Sudan'), ('Suriname', 'Suriname'), ('Swaziland', 'Swaziland'), ('Sweden', 'Sweden'), ('Switzerland', 'Switzerland'), ('Syrian Arab Republic', 'Syrian Arab Republic'), ('Taiwan', 'Taiwan'), ('Tajikistan', 'Tajikistan'), ('Tanzania', 'Tanzania'), ('Thailand', 'Thailand'), ('Togo', 'Togo'), ('Tokelau', 'Tokelau'), ('Tonga', 'Tonga'), ('Trinidad And Tobago', 'Trinidad And Tobago'), ('Tunisia', 'Tunisia'), ('Turkey', 'Turkey'), ('Turkmenistan', 'Turkmenistan'), ('Tuvalu', 'Tuvalu'), ('Uganda', 'Uganda'), ('Ukraine', 'Ukraine'), ('United Arab Emirates', 'United Arab Emirates'), ('United Kingdom', 'United Kingdom'), ('Uruguay', 'Uruguay'), ('Uzbekistan', 'Uzbekistan'), ('Vanuatu', 'Vanuatu'), ('Vatican City State', 'Vatican City State'), ('Venezuela', 'Venezuela'), ('Viet Nam', 'Viet Nam'), ('Virgin Islands (British)', 'Virgin Islands (British)'), ('Virgin Islands (U.S.)', 'Virgin Islands (U.S.)'), ('Western Sahara', 'Western Sahara'), ('Yemen', 'Yemen'), ('Yugoslavia', 'Yugoslavia'), ('Zaire', 'Zaire'), ('Zambia', 'Zambia'), ('Zimbabwe', 'Zimbabwe')], max_length=100, null=True)),
],
),
migrations.CreateModel(
name='PlayerScorecard',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('height', models.SmallIntegerField(default=None, null=True, verbose_name='Height in inches')),
('muscle', models.SmallIntegerField(default=None, null=True, verbose_name='Muscle Percentage')),
('body_fat', models.SmallIntegerField(default=None, null=True, verbose_name='Body Fat Percentage')),
('pulse', models.SmallIntegerField(default=None, null=True)),
('oxygen', models.SmallIntegerField(default=None, null=True)),
('player_number', models.SmallIntegerField(default=None, null=True)),
('control_thigh', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 33.33', verbose_name='Thigh Control')),
('control_foot', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 33.33', verbose_name='Foot Control')),
('foot_tap', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 33.33', verbose_name='Taps')),
('speed_dribble', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 25', verbose_name='Speed Dribble')),
('dribble_r', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 25', verbose_name='Dribble Right Foot')),
('dribble_l', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 25', verbose_name='Dribble Left Foot')),
('dribble_3_cone', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 25', verbose_name='Dribble 3-Cone')),
('long_r_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Long Pass Right Foot 1')),
('long_r_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Long Pass Right Foot 2')),
('long_l_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Long Pass Left Foot 1')),
('long_l_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Long Pass Left Foot 2')),
('cross_r_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Cross Right 1')),
('cross_r_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Cross Right 2')),
('cross_l_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Cross Left 1')),
('cross_l_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Cross Left 2')),
('side_pass_r_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Side Pass Right 1')),
('side_pass_r_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Side Pass Right 2')),
('side_pass_r_3', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Side Pass Right 3')),
('side_pass_l_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Side Pass Left 1')),
('side_pass_l_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Side Pass Left 2')),
('side_pass_l_3', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Side Pass Left 3')),
('weigh_pass_r_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Weighted Pass Right 1')),
('weigh_pass_r_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Weighted Pass Right 2')),
('weigh_pass_r_3', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Weighted Pass Right 3')),
('weigh_pass_l_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Weighted Pass Left 1')),
('weigh_pass_l_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Weighted Pass Left 2')),
('weigh_pass_l_3', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 4.5', verbose_name='Weighted Pass Left 3')),
('throw_inside_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 2.5', verbose_name='Throw Inside Box 1')),
('throw_inside_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 2.5', verbose_name='Throw Inside Box 2')),
('throw_between_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 2.5', verbose_name='Throw-in between far cones 1')),
('throw_between_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 2.5', verbose_name='Throw-in between far cones 2')),
('shoot_pk', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 10.0', verbose_name='Penalty Kick')),
('shoot_run_r_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Shot Right Foot 1')),
('shoot_run_r_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Shot Right Foot 2')),
('shoot_run_r_3', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Shot Right Foot 3')),
('shoot_run_l_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Shot Left Foot 1')),
('shoot_run_l_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Shot Left Foot 2')),
('shoot_run_l_3', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Shot Left Foot 3')),
('finisher_r_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Finish Right Foot 1')),
('finisher_r_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Finish Right Foot 2')),
('finisher_r_3', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Finish Right Foot 3')),
('finisher_l_1', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Finish Left Foot 1')),
('finisher_l_2', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Finish Left Foot 2')),
('finisher_l_3', models.FloatField(choices=[(1.0, '5 Star'), (0.75, '4 Star'), (0.5, '3 Star'), (0.25, '2 Star'), (0, '1 Star')], default=0.0, help_text='Select an option. Weight: 7.5', verbose_name='Finish Left Foot 3')),
('total_control', models.FloatField(default=0.0)),
('total_dribbling', models.FloatField(default=0.0)),
('total_passing', models.FloatField(default=0.0)),
('total_shooting', models.FloatField(default=0.0)),
('grand_total', models.FloatField(default=0.0)),
('player', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='player', to='showcase.Player')),
],
options={
'verbose_name': 'Player Scorecard',
},
),
migrations.CreateModel(
name='Showcase',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('showcase_name', models.CharField(max_length=100)),
('showcase_date', models.DateField()),
('showcase_location', models.CharField(blank=True, max_length=100, null=True)),
('weather', models.CharField(blank=True, max_length=100, null=True)),
('field_condition', models.CharField(blank=True, max_length=100, null=True)),
],
),
migrations.CreateModel(
name='Station',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='Enter the station name here', max_length=100)),
('index', models.SmallIntegerField(choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 13), (14, 14), (15, 15), (16, 16), (17, 17), (18, 18), (19, 19)], help_text='Used to order stations in showcase', null=True)),
('description', models.TextField(blank=True, max_length=1500, null=True)),
('animation', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtaildocs.Document')),
('diagram', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtaildocs.Document')),
('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image')),
('scorecard_diagram', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtaildocs.Document')),
],
),
migrations.CreateModel(
name='Team',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('team_name', models.CharField(help_text='Enter the team name here', max_length=100)),
('city', models.CharField(max_length=100)),
('state', models.CharField(choices=[('AK', 'Alaska'), ('AL', 'Alabama'), ('AR', 'Arkansas'), ('AS', 'American Samoa'), ('AZ', 'Arizona'), ('CA', 'California'), ('CO', 'Colorado'), ('CT', 'Connecticut'), ('DC', 'District of Columbia'), ('DE', 'Delaware'), ('FL', 'Florida'), ('GA', 'Georgia'), ('GU', 'Guam'), ('HI', 'Hawaii'), ('IA', 'Iowa'), ('ID', 'Idaho'), ('IL', 'Illinois'), ('IN', 'Indiana'), ('KS', 'Kansas'), ('KY', 'Kentucky'), ('LA', 'Louisiana'), ('MA', 'Massachusetts'), ('MD', 'Maryland'), ('ME', 'Maine'), ('MI', 'Michigan'), ('MN', 'Minnesota'), ('MO', 'Missouri'), ('MP', 'Northern Mariana Islands'), ('MS', 'Mississippi'), ('MT', 'Montana'), ('NA', 'National'), ('NC', 'North Carolina'), ('ND', 'North Dakota'), ('NE', 'Nebraska'), ('NH', 'New Hampshire'), ('NJ', 'New Jersey'), ('NM', 'New Mexico'), ('NV', 'Nevada'), ('NY', 'New York'), ('OH', 'Ohio'), ('OK', 'Oklahoma'), ('OR', 'Oregon'), ('PA', 'Pennsylvania'), ('PR', 'Puerto Rico'), ('RI', 'Rhode Island'), ('SC', 'South Carolina'), ('SD', 'South Dakota'), ('TN', 'Tennessee'), ('TX', 'Texas'), ('UT', 'Utah'), ('VA', 'Virginia'), ('VI', 'Virgin Islands'), ('VT', 'Vermont'), ('WA', 'Washington'), ('WI', 'Wisconsin'), ('WV', 'West Virginia'), ('WY', 'Wyoming'), ('N/A', 'N/A')], default='N/A', max_length=3)),
('control_thigh_avg', models.FloatField(default=0.0)),
('control_foot_avg', models.FloatField(default=0.0)),
('foot_tap_avg', models.FloatField(default=0.0)),
('speed_dribble_avg', models.FloatField(default=0.0)),
('dribble_r_avg', models.FloatField(default=0.0)),
('dribble_l_avg', models.FloatField(default=0.0)),
('dribble_3_cone_avg', models.FloatField(default=0.0)),
('long_r_1_avg', models.FloatField(default=0.0)),
('long_r_2_avg', models.FloatField(default=0.0)),
('long_l_1_avg', models.FloatField(default=0.0)),
('long_l_2_avg', models.FloatField(default=0.0)),
('cross_r_1_avg', models.FloatField(default=0.0)),
('cross_r_2_avg', models.FloatField(default=0.0)),
('cross_l_1_avg', models.FloatField(default=0.0)),
('cross_l_2_avg', models.FloatField(default=0.0)),
('side_pass_r_1_avg', models.FloatField(default=0.0)),
('side_pass_r_2_avg', models.FloatField(default=0.0)),
('side_pass_r_3_avg', models.FloatField(default=0.0)),
('side_pass_l_1_avg', models.FloatField(default=0.0)),
('side_pass_l_2_avg', models.FloatField(default=0.0)),
('side_pass_l_3_avg', models.FloatField(default=0.0)),
('weigh_pass_r_1_avg', models.FloatField(default=0.0)),
('weigh_pass_r_2_avg', models.FloatField(default=0.0)),
('weigh_pass_r_3_avg', models.FloatField(default=0.0)),
('weigh_pass_l_1_avg', models.FloatField(default=0.0)),
('weigh_pass_l_2_avg', models.FloatField(default=0.0)),
('weigh_pass_l_3_avg', models.FloatField(default=0.0)),
('throw_inside_1_avg', models.FloatField(default=0.0)),
('throw_inside_2_avg', models.FloatField(default=0.0)),
('throw_between_1_avg', models.FloatField(default=0.0)),
('throw_between_2_avg', models.FloatField(default=0.0)),
('shoot_pk_avg', models.FloatField(default=0.0)),
('shoot_run_r_1_avg', models.FloatField(default=0.0)),
('shoot_run_r_2_avg', models.FloatField(default=0.0)),
('shoot_run_r_3_avg', models.FloatField(default=0.0)),
('shoot_run_l_1_avg', models.FloatField(default=0.0)),
('shoot_run_l_2_avg', models.FloatField(default=0.0)),
('shoot_run_l_3_avg', models.FloatField(default=0.0)),
('finisher_r_1_avg', models.FloatField(default=0.0)),
('finisher_r_2_avg', models.FloatField(default=0.0)),
('finisher_r_3_avg', models.FloatField(default=0.0)),
('finisher_l_1_avg', models.FloatField(default=0.0)),
('finisher_l_2_avg', models.FloatField(default=0.0)),
('finisher_l_3_avg', models.FloatField(default=0.0)),
('total_control_avg', models.FloatField(default=0.0)),
('total_dribbling_avg', models.FloatField(default=0.0)),
('total_passing_avg', models.FloatField(default=0.0)),
('total_shooting_avg', models.FloatField(default=0.0)),
('grand_total_avg', models.FloatField(default=0.0)),
('club', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='showcase.Club')),
('coach', models.ForeignKey(blank=True, help_text='Associate the team to a coaches account here', null=True, on_delete=django.db.models.deletion.SET_NULL, to='showcase.Coach')),
],
),
migrations.AddField(
model_name='playerscorecard',
name='showcase',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='showcase.Showcase'),
),
migrations.AddField(
model_name='player',
name='team',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='showcase.Team'),
),
]
| 125.297491
| 6,587
| 0.586504
| 4,594
| 34,958
| 4.326077
| 0.134306
| 0.044279
| 0.066569
| 0.124384
| 0.685217
| 0.665744
| 0.656285
| 0.640938
| 0.629415
| 0.61593
| 0
| 0.056978
| 0.187682
| 34,958
| 278
| 6,588
| 125.748201
| 0.642885
| 0.00123
| 0
| 0.571956
| 1
| 0
| 0.350614
| 0.000659
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.158672
| 0.01107
| 0
| 0.02583
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
762f15c43f48ea0184e38844998be66d774afbb4
| 303
|
py
|
Python
|
evaluate/__init__.py
|
newTypeGeek/Network-Reconstruction
|
135a07cc304dac0666a9d11d3548aee7a669eaad
|
[
"MIT"
] | 3
|
2020-10-15T09:33:59.000Z
|
2022-03-12T11:22:04.000Z
|
evaluate/__init__.py
|
newTypeGeek/Network-Reconstruction
|
135a07cc304dac0666a9d11d3548aee7a669eaad
|
[
"MIT"
] | null | null | null |
evaluate/__init__.py
|
newTypeGeek/Network-Reconstruction
|
135a07cc304dac0666a9d11d3548aee7a669eaad
|
[
"MIT"
] | 1
|
2020-10-15T09:38:20.000Z
|
2020-10-15T09:38:20.000Z
|
#!/usr/bin/env python3
'''
evaluate package contains functions to examine the network reconstruction performance
All functions take these two arguments:
1. A The actual adjacency matrix
2. A_reco The reconstructed adjacency matrix
'''
from evaluate.error_rates import error_rates
| 33.666667
| 85
| 0.755776
| 40
| 303
| 5.65
| 0.775
| 0.132743
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012295
| 0.194719
| 303
| 8
| 86
| 37.875
| 0.913934
| 0.818482
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
57ff844ffd8c641d9d676133cd6f88ecb456946d
| 145
|
py
|
Python
|
python3/ctypes/hex1.py
|
jtraver/dev
|
c7cd2181594510a8fa27e7325566ed2d79371624
|
[
"MIT"
] | null | null | null |
python3/ctypes/hex1.py
|
jtraver/dev
|
c7cd2181594510a8fa27e7325566ed2d79371624
|
[
"MIT"
] | null | null | null |
python3/ctypes/hex1.py
|
jtraver/dev
|
c7cd2181594510a8fa27e7325566ed2d79371624
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
#!/usr/bin/env python3
def main():
for i1 in range(256):
print(("%s 0x%x '%c'" % (str(i1), i1, i1)))
main()
| 16.111111
| 51
| 0.531034
| 25
| 145
| 3.08
| 0.68
| 0.155844
| 0.233766
| 0.415584
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088496
| 0.22069
| 145
| 8
| 52
| 18.125
| 0.59292
| 0.289655
| 0
| 0
| 0
| 0
| 0.118812
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.25
| 0.25
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
524ec6f4e8f3a34de0151cba9af7d0ee11018025
| 101
|
py
|
Python
|
src/hooks/hook-mulgyeol_oauth.InstalledAppFlow.py
|
MycroftKang/mulgyeol-mkbot
|
77bcfc5c93e02dbc983d2e6a137ddf835d450c29
|
[
"MIT"
] | null | null | null |
src/hooks/hook-mulgyeol_oauth.InstalledAppFlow.py
|
MycroftKang/mulgyeol-mkbot
|
77bcfc5c93e02dbc983d2e6a137ddf835d450c29
|
[
"MIT"
] | null | null | null |
src/hooks/hook-mulgyeol_oauth.InstalledAppFlow.py
|
MycroftKang/mulgyeol-mkbot
|
77bcfc5c93e02dbc983d2e6a137ddf835d450c29
|
[
"MIT"
] | null | null | null |
from PyInstaller.utils.hooks import collect_data_files
datas = collect_data_files("mulgyeol_oauth")
| 25.25
| 54
| 0.851485
| 14
| 101
| 5.785714
| 0.785714
| 0.271605
| 0.395062
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079208
| 101
| 3
| 55
| 33.666667
| 0.870968
| 0
| 0
| 0
| 0
| 0
| 0.138614
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
525aa87bc9f7d6c5a4d3fe861627f4325937eaea
| 126
|
py
|
Python
|
Desafio14.py
|
rsmelocunha/Python-projects
|
1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093
|
[
"MIT"
] | null | null | null |
Desafio14.py
|
rsmelocunha/Python-projects
|
1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093
|
[
"MIT"
] | null | null | null |
Desafio14.py
|
rsmelocunha/Python-projects
|
1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093
|
[
"MIT"
] | null | null | null |
n = float(input('Digite o valor em graus Celsius: '))
print('')
print('O valor em graus Farenheit é {} ºF'.format((n*1.8)+32))
| 42
| 62
| 0.65873
| 23
| 126
| 3.608696
| 0.73913
| 0.144578
| 0.192771
| 0.313253
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036697
| 0.134921
| 126
| 3
| 62
| 42
| 0.724771
| 0
| 0
| 0
| 0
| 0
| 0.527559
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
528428689c7829501289159f327b59596afe2729
| 80
|
py
|
Python
|
timefred/integration/jira/ticket.py
|
giladbarnea/timefred
|
36cc8b0f09d38c0ed7b3e659ce337a75cd8b0c60
|
[
"MIT"
] | null | null | null |
timefred/integration/jira/ticket.py
|
giladbarnea/timefred
|
36cc8b0f09d38c0ed7b3e659ce337a75cd8b0c60
|
[
"MIT"
] | null | null | null |
timefred/integration/jira/ticket.py
|
giladbarnea/timefred
|
36cc8b0f09d38c0ed7b3e659ce337a75cd8b0c60
|
[
"MIT"
] | null | null | null |
from timefred.space import StringSpace
class JiraTicket(StringSpace):
...
| 13.333333
| 38
| 0.75
| 8
| 80
| 7.5
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1625
| 80
| 5
| 39
| 16
| 0.895522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
bfffc5213f37edbc0b8d43405ab7f5be7661435c
| 97
|
py
|
Python
|
emulator/exceptions.py
|
gnudeb/fisk16
|
ce5451e51ae4fd6e1b877e34a958e4439b2b0dee
|
[
"MIT"
] | null | null | null |
emulator/exceptions.py
|
gnudeb/fisk16
|
ce5451e51ae4fd6e1b877e34a958e4439b2b0dee
|
[
"MIT"
] | null | null | null |
emulator/exceptions.py
|
gnudeb/fisk16
|
ce5451e51ae4fd6e1b877e34a958e4439b2b0dee
|
[
"MIT"
] | null | null | null |
class UnprivilegedAccess(Exception):
pass
class MalformedInstruction(Exception):
pass
| 12.125
| 38
| 0.762887
| 8
| 97
| 9.25
| 0.625
| 0.351351
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.175258
| 97
| 7
| 39
| 13.857143
| 0.925
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
8705b38823573660a0912bdfcbd5cebc7b8ca893
| 92
|
py
|
Python
|
src/radio/__init__.py
|
asattelmaier/deutschlandradio
|
ed25796805cdbe0a31296525c11275831c5af453
|
[
"MIT"
] | null | null | null |
src/radio/__init__.py
|
asattelmaier/deutschlandradio
|
ed25796805cdbe0a31296525c11275831c5af453
|
[
"MIT"
] | null | null | null |
src/radio/__init__.py
|
asattelmaier/deutschlandradio
|
ed25796805cdbe0a31296525c11275831c5af453
|
[
"MIT"
] | null | null | null |
from .audio_player import AudioPlayer
from .channel import Channel
from .radio import Radio
| 23
| 37
| 0.836957
| 13
| 92
| 5.846154
| 0.538462
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 92
| 3
| 38
| 30.666667
| 0.95
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
877b2412c329817e75547606448540c8ecdef0ae
| 232
|
py
|
Python
|
holobot/sdk/database/queries/constraints/empty_constraint_builder.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | 1
|
2021-05-24T00:17:46.000Z
|
2021-05-24T00:17:46.000Z
|
holobot/sdk/database/queries/constraints/empty_constraint_builder.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | 41
|
2021-03-24T22:50:09.000Z
|
2021-12-17T12:15:13.000Z
|
holobot/sdk/database/queries/constraints/empty_constraint_builder.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | null | null | null |
from .iconstraint_builder import IConstraintBuilder
from typing import Any, Tuple
class EmptyConstraintBuilder(IConstraintBuilder):
def build(self, base_param_index: int) -> Tuple[str, Tuple[Any, ...]]:
return ("", ())
| 33.142857
| 74
| 0.728448
| 25
| 232
| 6.64
| 0.76
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150862
| 232
| 6
| 75
| 38.666667
| 0.84264
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
5e4a6fcce014e5dc70f2f7e2f79e72c682671ebe
| 441
|
py
|
Python
|
blurr/examples/text/causal_lm_gpt2.py
|
warner-benjamin/blurr
|
c946c3c1b6ee92c6305f102b3d13181132ad083b
|
[
"Apache-2.0"
] | null | null | null |
blurr/examples/text/causal_lm_gpt2.py
|
warner-benjamin/blurr
|
c946c3c1b6ee92c6305f102b3d13181132ad083b
|
[
"Apache-2.0"
] | 3
|
2022-02-10T03:53:07.000Z
|
2022-02-10T04:18:53.000Z
|
blurr/examples/text/causal_lm_gpt2.py
|
warner-benjamin/blurr
|
c946c3c1b6ee92c6305f102b3d13181132ad083b
|
[
"Apache-2.0"
] | null | null | null |
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/99e_text-examples-causal-lm-gpt2.ipynb (unless otherwise specified).
__all__ = []
# Cell
from transformers import *
from fastai.text.all import *
from ...text.data.core import *
from ...text.data.language_modeling import *
from ...text.modeling.core import *
from ...text.modeling.language_modeling import *
from ...text.utils import *
from ...utils import *
logging.set_verbosity_error()
| 25.941176
| 116
| 0.748299
| 61
| 441
| 5.262295
| 0.52459
| 0.218069
| 0.218069
| 0.11215
| 0.186916
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007752
| 0.122449
| 441
| 17
| 117
| 25.941176
| 0.821705
| 0.269841
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5e4dd18a37a881eb6c484035afb503c19c64a624
| 3,078
|
py
|
Python
|
tests/containers/test_utils.py
|
babjarob/nata
|
8273f959ea025a9ab2e644988bf2e807be03ac85
|
[
"MIT"
] | 30
|
2020-04-30T13:09:55.000Z
|
2021-12-27T22:05:41.000Z
|
tests/containers/test_utils.py
|
babjarob/nata
|
8273f959ea025a9ab2e644988bf2e807be03ac85
|
[
"MIT"
] | 60
|
2020-04-30T09:25:22.000Z
|
2021-09-18T21:26:39.000Z
|
tests/containers/test_utils.py
|
babjarob/nata
|
8273f959ea025a9ab2e644988bf2e807be03ac85
|
[
"MIT"
] | 13
|
2020-04-30T09:30:19.000Z
|
2021-10-18T20:51:08.000Z
|
# -*- coding: utf-8 -*-
import numpy as np
# import pytest
_TestCases_seperation_newaxis = {}
_TestCases_seperation_newaxis[":"] = (
# key
np.index_exp[:],
# expected_deconstruction
np.index_exp[:],
# expected_temporal_key
(),
# expected_spatial_key
(),
# two_types
True,
)
_TestCases_seperation_newaxis[":, :, :"] = (
# key
np.index_exp[:, :, :],
# expected_deconstruction
np.index_exp[:, :, :],
# expected_temporal_key
(),
# expected_spatial_key
(),
# two_types
True,
)
_TestCases_seperation_newaxis["int, int, int"] = (
# key
np.index_exp[4, 2, 0],
# expected_deconstruction
np.index_exp[4, 2, 0],
# expected_temporal_key
(),
# expected_spatial_key
(),
# two_types
True,
)
_TestCases_seperation_newaxis["newaxis, :"] = (
# key
np.index_exp[None, :],
# expected_deconstruction
np.index_exp[:],
# expected_temporal_key
(None,),
# expected_spatial_key
(),
# two_types
True,
)
_TestCases_seperation_newaxis["newaxis, newaxis, newaxis, :"] = (
# key
np.index_exp[None, None, None, :],
# expected_deconstruction
np.index_exp[:],
# expected_temporal_key
(None, None, None),
# expected_spatial_key
(),
# two_types
True,
)
_TestCases_seperation_newaxis[":, newaxis, :, newaxis, :, :, newaxis"] = (
# key
np.index_exp[:, None, :, None, :, :, None],
# expected_deconstruction
np.index_exp[:, :, :, :],
# expected_temporal_key
(),
# expected_spatial_key
(1, 3, 6),
# two_types
True,
)
_TestCases_seperation_newaxis[
"newaxis, newaxis, :, newaxis, :, newaxis, :, :, newaxis"
] = (
# key
np.index_exp[None, None, :, None, :, None, :, :, None],
# expected_deconstruction
np.index_exp[:, :, :, :],
# expected_temporal_key
(None, None),
# expected_spatial_key
(1, 3, 6),
# two_types
True,
)
_TestCases_seperation_newaxis[
"newaxis, newaxis, :, newaxis, :, newaxis, :, :, newaxis | single_type"
] = (
# key
np.index_exp[None, None, :, None, :, None, :, :, None],
# expected_deconstruction
np.index_exp[:, :, :, :],
# expected_temporal_key
(),
# expected_spatial_key
(0, 1, 3, 5, 8),
# two_types
False,
)
# @pytest.mark.parametrize(
# [
# "key",
# "expected_deconstruction",
# "expected_temporal_key",
# "expected_spatial_key",
# "two_types",
# ],
# [args for args in _TestCases_seperation_newaxis.values()],
# ids=[names for names in _TestCases_seperation_newaxis.keys()],
# )
# def test_separation_newaxis(
# key,
# expected_deconstruction,
# expected_temporal_key,
# expected_spatial_key,
# two_types,
# ):
# deconstructed_key, temporal_key, spatial_key = _separation_newaxis(
# key, two_types=two_types
# )
# assert deconstructed_key == expected_deconstruction
# assert temporal_key == expected_temporal_key
# assert spatial_key == expected_spatial_key
| 22.970149
| 75
| 0.605263
| 318
| 3,078
| 5.45912
| 0.147799
| 0.137097
| 0.092166
| 0.093318
| 0.753456
| 0.745392
| 0.745392
| 0.718318
| 0.718318
| 0.718318
| 0
| 0.007782
| 0.248538
| 3,078
| 133
| 76
| 23.142857
| 0.742758
| 0.451917
| 0
| 0.580645
| 0
| 0
| 0.135802
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.016129
| 0
| 0.016129
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5e6e16b3ea8d3c3f93707ae358df462a4c44447e
| 6,493
|
py
|
Python
|
tests/test_program.py
|
peterg79/regenmaschine
|
3b76fb42c34d6d655d8e793bca4cfcf21c858123
|
[
"MIT"
] | null | null | null |
tests/test_program.py
|
peterg79/regenmaschine
|
3b76fb42c34d6d655d8e793bca4cfcf21c858123
|
[
"MIT"
] | null | null | null |
tests/test_program.py
|
peterg79/regenmaschine
|
3b76fb42c34d6d655d8e793bca4cfcf21c858123
|
[
"MIT"
] | null | null | null |
"""Define tests for program endpoints."""
# pylint: disable=redefined-outer-name,too-many-arguments
import json
import aiohttp
import pytest
from regenmaschine import login
from tests.const import TEST_HOST, TEST_PORT, TEST_PASSWORD
from tests.fixtures import authenticated_local_client, auth_login_json
from tests.fixtures.api import apiver_json
from tests.fixtures.program import *
from tests.fixtures.provision import provision_name_json, provision_wifi_json
@pytest.mark.asyncio
async def test_program_enable_disable(
aresponses, authenticated_local_client, event_loop, program_post_json
):
"""Test enabling a program."""
async with authenticated_local_client:
authenticated_local_client.add(
f"{TEST_HOST}:{TEST_PORT}",
"/api/4/program/1",
"post",
aresponses.Response(text=json.dumps(program_post_json), status=200),
)
authenticated_local_client.add(
f"{TEST_HOST}:{TEST_PORT}",
"/api/4/program/1",
"post",
aresponses.Response(text=json.dumps(program_post_json), status=200),
)
async with aiohttp.ClientSession(loop=event_loop) as websession:
client = await login(
TEST_HOST, TEST_PASSWORD, websession, port=TEST_PORT, ssl=False
)
resp = await client.programs.enable(1)
assert resp["message"] == "OK"
resp = await client.programs.disable(1)
assert resp["message"] == "OK"
@pytest.mark.asyncio
async def test_program_get(
aresponses, authenticated_local_client, event_loop, program_json
):
"""Test getting all programs."""
async with authenticated_local_client:
authenticated_local_client.add(
f"{TEST_HOST}:{TEST_PORT}",
"/api/4/program",
"get",
aresponses.Response(text=json.dumps(program_json), status=200),
)
async with aiohttp.ClientSession(loop=event_loop) as websession:
client = await login(
TEST_HOST, TEST_PASSWORD, websession, port=TEST_PORT, ssl=False
)
data = await client.programs.all(include_inactive=True)
assert len(data) == 2
assert data[0]["name"] == "Morning"
@pytest.mark.asyncio
async def test_program_get_active(
aresponses, authenticated_local_client, event_loop, program_json
):
"""Test getting only active programs."""
async with authenticated_local_client:
authenticated_local_client.add(
f"{TEST_HOST}:{TEST_PORT}",
"/api/4/program",
"get",
aresponses.Response(text=json.dumps(program_json), status=200),
)
async with aiohttp.ClientSession(loop=event_loop) as websession:
client = await login(
TEST_HOST, TEST_PASSWORD, websession, port=TEST_PORT, ssl=False
)
data = await client.programs.all()
assert len(data) == 1
assert data[0]["name"] == "Morning"
@pytest.mark.asyncio
async def test_program_get_by_id(
aresponses, authenticated_local_client, event_loop, program_id_json
):
"""Test getting a program by its ID."""
async with authenticated_local_client:
authenticated_local_client.add(
f"{TEST_HOST}:{TEST_PORT}",
"/api/4/program/1",
"get",
aresponses.Response(text=json.dumps(program_id_json), status=200),
)
async with aiohttp.ClientSession(loop=event_loop) as websession:
client = await login(
TEST_HOST, TEST_PASSWORD, websession, port=TEST_PORT, ssl=False
)
data = await client.programs.get(1)
assert data["name"] == "Morning"
@pytest.mark.asyncio
async def test_program_next_run(
aresponses,
authenticated_local_client,
event_loop,
program_nextrun_json,
program_start_stop_json,
watering_program_json,
):
"""Test getting the next run of a program."""
async with authenticated_local_client:
authenticated_local_client.add(
f"{TEST_HOST}:{TEST_PORT}",
"/api/4/program/nextrun",
"get",
aresponses.Response(text=json.dumps(program_nextrun_json), status=200),
)
async with aiohttp.ClientSession(loop=event_loop) as websession:
client = await login(
TEST_HOST, TEST_PASSWORD, websession, port=TEST_PORT, ssl=False
)
data = await client.programs.next()
assert len(data) == 2
@pytest.mark.asyncio
async def test_program_running(
aresponses, authenticated_local_client, event_loop, watering_program_json
):
"""Test getting all running programs."""
async with authenticated_local_client:
authenticated_local_client.add(
f"{TEST_HOST}:{TEST_PORT}",
"/api/4/watering/program",
"get",
aresponses.Response(text=json.dumps(watering_program_json), status=200),
)
async with aiohttp.ClientSession(loop=event_loop) as websession:
client = await login(
TEST_HOST, TEST_PASSWORD, websession, port=TEST_PORT, ssl=False
)
data = await client.programs.running()
assert len(data) == 1
assert data[0]["name"] == "Evening"
@pytest.mark.asyncio
async def test_program_start_and_stop(
aresponses, authenticated_local_client, event_loop, program_start_stop_json
):
"""Test starting and stopping a program."""
async with authenticated_local_client:
authenticated_local_client.add(
f"{TEST_HOST}:{TEST_PORT}",
"/api/4/program/1/start",
"post",
aresponses.Response(text=json.dumps(program_start_stop_json), status=200),
)
authenticated_local_client.add(
f"{TEST_HOST}:{TEST_PORT}",
"/api/4/program/1/stop",
"post",
aresponses.Response(text=json.dumps(program_start_stop_json), status=200),
)
async with aiohttp.ClientSession(loop=event_loop) as websession:
client = await login(
TEST_HOST, TEST_PASSWORD, websession, port=TEST_PORT, ssl=False
)
data = await client.programs.start(1)
assert data["message"] == "OK"
data = await client.programs.stop(1)
assert data["message"] == "OK"
| 33.297436
| 86
| 0.633605
| 746
| 6,493
| 5.288204
| 0.127346
| 0.109506
| 0.146008
| 0.040558
| 0.800253
| 0.763245
| 0.752345
| 0.643093
| 0.622307
| 0.610393
| 0
| 0.011104
| 0.264901
| 6,493
| 194
| 87
| 33.469072
| 0.81542
| 0.014169
| 0
| 0.605263
| 0
| 0
| 0.078681
| 0.048155
| 0
| 0
| 0
| 0
| 0.078947
| 1
| 0
| false
| 0.052632
| 0.059211
| 0
| 0.059211
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
5e7b7657e8f2a9bd4b206f083969aedf4c70f616
| 1,057
|
py
|
Python
|
labs/lab12/tests/smallest-int.py
|
abalone88/cs61a_2018sp
|
59d408d0961cf71faf10b77779bfc71c0c508f0c
|
[
"MIT"
] | 2
|
2021-06-05T20:36:20.000Z
|
2021-06-05T20:44:26.000Z
|
labs/lab12/tests/smallest-int.py
|
abalone88/cs61a_2018sp
|
59d408d0961cf71faf10b77779bfc71c0c508f0c
|
[
"MIT"
] | null | null | null |
labs/lab12/tests/smallest-int.py
|
abalone88/cs61a_2018sp
|
59d408d0961cf71faf10b77779bfc71c0c508f0c
|
[
"MIT"
] | null | null | null |
test = {
'name': 'smallest-int',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
sqlite> SELECT * FROM smallest_int;
4/13/2018 15:16:12|16
4/13/2018 15:22:11|16
4/13/2018 15:15:08|17
4/13/2018 15:18:10|17
4/13/2018 15:21:43|17
4/13/2018 15:22:13|17
4/13/2018 16:07:06|17
4/13/2018 18:09:26|17
4/13/2018 18:21:40|17
4/13/2018 18:35:06|17
4/13/2018 21:59:38|17
4/13/2018 23:00:33|17
4/14/2018 18:40:35|17
4/13/2018 20:17:16|18
4/13/2018 15:16:24|19
4/13/2018 15:23:28|19
4/13/2018 16:51:30|19
4/13/2018 18:27:34|20
4/13/2018 15:21:12|21
4/13/2018 15:48:22|21
""",
'hidden': False,
'locked': False
}
],
'ordered': False,
'scored': True,
'setup': r"""
sqlite> .read lab12.sql
""",
'teardown': '',
'type': 'sqlite'
}
]
}
| 23.488889
| 45
| 0.43141
| 172
| 1,057
| 2.645349
| 0.348837
| 0.125275
| 0.292308
| 0.197802
| 0.307692
| 0
| 0
| 0
| 0
| 0
| 0
| 0.475667
| 0.397351
| 1,057
| 44
| 46
| 24.022727
| 0.238619
| 0
| 0
| 0.045455
| 0
| 0
| 0.774834
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5e8943856cedff0a69c35ac1f5e4014440450f5a
| 85
|
py
|
Python
|
TestingLibrarySelectorsPlugin/__init__.py
|
kangasta/rf-se-dtl-selectors-plugin
|
157a133623170abffd9f1513f45ac7318f6eb88b
|
[
"MIT"
] | null | null | null |
TestingLibrarySelectorsPlugin/__init__.py
|
kangasta/rf-se-dtl-selectors-plugin
|
157a133623170abffd9f1513f45ac7318f6eb88b
|
[
"MIT"
] | 5
|
2020-11-11T14:18:56.000Z
|
2020-12-01T15:16:40.000Z
|
TestingLibrarySelectorsPlugin/__init__.py
|
kangasta/rf-se-dtl-selectors-plugin
|
157a133623170abffd9f1513f45ac7318f6eb88b
|
[
"MIT"
] | null | null | null |
from ._plugin import TestingLibrarySelectorsPlugin
from ._version import __version__
| 28.333333
| 50
| 0.882353
| 8
| 85
| 8.625
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094118
| 85
| 2
| 51
| 42.5
| 0.896104
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5e95103d91f7ca5e876ec1b856a9d51b62f73469
| 92
|
pyw
|
Python
|
ROBOT/test.pyw
|
rjkoepp/jeff4ele
|
d3201b01bf084c6d86d87359c5d449fdc58d72cf
|
[
"MIT"
] | 1
|
2017-09-30T06:47:20.000Z
|
2017-09-30T06:47:20.000Z
|
ROBOT/test.pyw
|
rjkoepp/jeff4ele
|
d3201b01bf084c6d86d87359c5d449fdc58d72cf
|
[
"MIT"
] | null | null | null |
ROBOT/test.pyw
|
rjkoepp/jeff4ele
|
d3201b01bf084c6d86d87359c5d449fdc58d72cf
|
[
"MIT"
] | null | null | null |
from getTranscription import get_transcription, latin_to_mathematical
get_transcription(9)
| 23
| 69
| 0.891304
| 11
| 92
| 7.090909
| 0.818182
| 0.410256
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011765
| 0.076087
| 92
| 3
| 70
| 30.666667
| 0.905882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
0d7a9d60c2cfcd6e7b748567d2fd4210a9180738
| 113
|
py
|
Python
|
pylink/game/resource.py
|
ProjectPytron/FreeThePytrons
|
7859499b5069a451984c8f47c98163fa107eba78
|
[
"MIT"
] | 1
|
2015-04-01T20:30:34.000Z
|
2015-04-01T20:30:34.000Z
|
pylink/game/resource.py
|
ProjectPyLink/PyLink
|
7859499b5069a451984c8f47c98163fa107eba78
|
[
"MIT"
] | 9
|
2015-04-20T15:30:22.000Z
|
2016-07-23T18:17:41.000Z
|
pylink/game/resource.py
|
ProjectPytron/FreeThePytrons
|
7859499b5069a451984c8f47c98163fa107eba78
|
[
"MIT"
] | null | null | null |
import pyglet.resource
loader = pyglet.resource.Loader(['game/res/image', 'game/res/sprite', 'game/res/sound'])
| 28.25
| 88
| 0.734513
| 16
| 113
| 5.1875
| 0.5625
| 0.253012
| 0.481928
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.070796
| 113
| 3
| 89
| 37.666667
| 0.790476
| 0
| 0
| 0
| 0
| 0
| 0.380531
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
0d932be2db099dbc7e5485355a89e2dfb664e28f
| 43
|
py
|
Python
|
code/abc161_a_01.py
|
KoyanagiHitoshi/AtCoder
|
731892543769b5df15254e1f32b756190378d292
|
[
"MIT"
] | 3
|
2019-08-16T16:55:48.000Z
|
2021-04-11T10:21:40.000Z
|
code/abc161_a_01.py
|
KoyanagiHitoshi/AtCoder
|
731892543769b5df15254e1f32b756190378d292
|
[
"MIT"
] | null | null | null |
code/abc161_a_01.py
|
KoyanagiHitoshi/AtCoder
|
731892543769b5df15254e1f32b756190378d292
|
[
"MIT"
] | null | null | null |
X,Y,Z=map(int,input().split())
print(Z,X,Y)
| 21.5
| 30
| 0.627907
| 11
| 43
| 2.454545
| 0.727273
| 0.148148
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023256
| 43
| 2
| 31
| 21.5
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
0d994f575eb49247eefd56302f975621237a3098
| 46
|
py
|
Python
|
grid_captcha/__init__.py
|
mrgyber/grid_captcha
|
919a2571e81811ad0cd6b0a03f13dae6ae56c0a2
|
[
"MIT"
] | null | null | null |
grid_captcha/__init__.py
|
mrgyber/grid_captcha
|
919a2571e81811ad0cd6b0a03f13dae6ae56c0a2
|
[
"MIT"
] | null | null | null |
grid_captcha/__init__.py
|
mrgyber/grid_captcha
|
919a2571e81811ad0cd6b0a03f13dae6ae56c0a2
|
[
"MIT"
] | null | null | null |
from grid_captcha.main import CaptchaBuilder
| 23
| 45
| 0.869565
| 6
| 46
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108696
| 46
| 1
| 46
| 46
| 0.95122
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
0dc8835b9a0fabe6277ec2b9ea2b4c06fe9cae6d
| 47
|
py
|
Python
|
snekcord/emojis/__init__.py
|
asleep-cult/snekcord-emojis
|
37651b32e465dd4d3a34d8d0188721ebaf92e901
|
[
"Apache-2.0"
] | null | null | null |
snekcord/emojis/__init__.py
|
asleep-cult/snekcord-emojis
|
37651b32e465dd4d3a34d8d0188721ebaf92e901
|
[
"Apache-2.0"
] | null | null | null |
snekcord/emojis/__init__.py
|
asleep-cult/snekcord-emojis
|
37651b32e465dd4d3a34d8d0188721ebaf92e901
|
[
"Apache-2.0"
] | null | null | null |
from .data import ALL_CATEGORIES # noqa: F401
| 23.5
| 46
| 0.765957
| 7
| 47
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 0.170213
| 47
| 1
| 47
| 47
| 0.820513
| 0.212766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
0dcc7f8c33143051fee405b37c240cec996170d9
| 509
|
py
|
Python
|
code_scanner/tests/test_enums.py
|
stargrep/rmm-utils
|
55725cb117015bbe35653120779c53ff39a999bc
|
[
"MIT"
] | null | null | null |
code_scanner/tests/test_enums.py
|
stargrep/rmm-utils
|
55725cb117015bbe35653120779c53ff39a999bc
|
[
"MIT"
] | null | null | null |
code_scanner/tests/test_enums.py
|
stargrep/rmm-utils
|
55725cb117015bbe35653120779c53ff39a999bc
|
[
"MIT"
] | null | null | null |
import pytest
from code_scanner.enums import FileType
def test_enums_funcs():
assert FileType.UNKNOWN is FileType.UNKNOWN
assert FileType.SOURCE_CODE is FileType.SOURCE_CODE
assert FileType.DIR_SOURCE is not FileType.SOURCE_CODE
assert FileType.SOURCE_CODE is not "SOURCE_CODE"
assert FileType.SOURCE_CODE.name == "SOURCE_CODE"
assert FileType["SOURCE_CODE"].name == "SOURCE_CODE"
with pytest.raises(AssertionError):
assert id(FileType.UNKNOWN) != id(FileType.UNKNOWN)
| 31.8125
| 59
| 0.764244
| 68
| 509
| 5.529412
| 0.308824
| 0.239362
| 0.287234
| 0.255319
| 0.5
| 0.319149
| 0.228723
| 0.228723
| 0.228723
| 0
| 0
| 0
| 0.157171
| 509
| 15
| 60
| 33.933333
| 0.876457
| 0
| 0
| 0
| 0
| 0
| 0.086444
| 0
| 0
| 0
| 0
| 0
| 0.727273
| 1
| 0.090909
| true
| 0
| 0.181818
| 0
| 0.272727
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2170ca50a91181cfcb49b103d34129331868ec3f
| 263
|
py
|
Python
|
utils/__init__.py
|
wufanyou/growth-ring-detection
|
27989870e12ab149413363a99080f7684db6cf1a
|
[
"MIT"
] | null | null | null |
utils/__init__.py
|
wufanyou/growth-ring-detection
|
27989870e12ab149413363a99080f7684db6cf1a
|
[
"MIT"
] | null | null | null |
utils/__init__.py
|
wufanyou/growth-ring-detection
|
27989870e12ab149413363a99080f7684db6cf1a
|
[
"MIT"
] | null | null | null |
# fw
from utils.transform import *
from utils.config import *
from utils.dataset import *
from utils.dataloader import *
from utils.optimizer import *
from utils.lighting import *
from utils.trainer import *
from utils.losses import *
from utils.metrics import *
| 23.909091
| 30
| 0.78327
| 37
| 263
| 5.567568
| 0.351351
| 0.393204
| 0.582524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144487
| 263
| 10
| 31
| 26.3
| 0.915556
| 0.007605
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2175ccc267a6d18bbbcb54f626f457aff8344d8f
| 96
|
py
|
Python
|
venv/lib/python3.8/site-packages/poetry/mixology/partial_solution.py
|
Retraces/UkraineBot
|
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
|
[
"MIT"
] | 2
|
2022-03-13T01:58:52.000Z
|
2022-03-31T06:07:54.000Z
|
venv/lib/python3.8/site-packages/poetry/mixology/partial_solution.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | 19
|
2021-11-20T04:09:18.000Z
|
2022-03-23T15:05:55.000Z
|
venv/lib/python3.8/site-packages/poetry/mixology/partial_solution.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | null | null | null |
/home/runner/.cache/pip/pool/7b/8e/dd/633904f7811222b23fbc1b99c9073b5eece40dee520ff6b260b22ee12d
| 96
| 96
| 0.895833
| 9
| 96
| 9.555556
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.395833
| 0
| 96
| 1
| 96
| 96
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
217d300782438e5aac2934929b52d7ed1c683b51
| 168
|
py
|
Python
|
flask/app/database/dbSetup.py
|
Oluwasegun-AA/pipit
|
1ea770b0833f086066ad8e3cdf256804e56a266e
|
[
"MIT"
] | null | null | null |
flask/app/database/dbSetup.py
|
Oluwasegun-AA/pipit
|
1ea770b0833f086066ad8e3cdf256804e56a266e
|
[
"MIT"
] | 8
|
2020-04-15T04:19:31.000Z
|
2021-03-19T07:21:20.000Z
|
flask/app/database/dbSetup.py
|
Oluwasegun-AA/pipit
|
1ea770b0833f086066ad8e3cdf256804e56a266e
|
[
"MIT"
] | null | null | null |
import psycopg2
import os
from app.helpers.env import getEnvironmentConfig
def SetupDb():
return psycopg2.connect(dbname='flask', user='postgres', host='localhost')
| 24
| 76
| 0.785714
| 21
| 168
| 6.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013245
| 0.10119
| 168
| 6
| 77
| 28
| 0.860927
| 0
| 0
| 0
| 0
| 0
| 0.130952
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.6
| 0.2
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
2180ba23f49863f7395dde05e1a72302c6ab0f41
| 2,522
|
py
|
Python
|
assopy/stripe/tests/test_templatetags.py
|
C8E/assopy
|
94357bfb6dfd8f5e44f3b632e42f8789f0a8fcee
|
[
"BSD-2-Clause"
] | 2
|
2019-05-04T08:55:52.000Z
|
2019-05-10T07:27:27.000Z
|
assopy/stripe/tests/test_templatetags.py
|
C8E/assopy
|
94357bfb6dfd8f5e44f3b632e42f8789f0a8fcee
|
[
"BSD-2-Clause"
] | 2
|
2021-03-18T20:40:21.000Z
|
2021-09-07T23:55:54.000Z
|
assopy/stripe/tests/test_templatetags.py
|
C8E/assopy
|
94357bfb6dfd8f5e44f3b632e42f8789f0a8fcee
|
[
"BSD-2-Clause"
] | 4
|
2015-02-16T19:34:06.000Z
|
2017-12-10T17:22:09.000Z
|
from __future__ import absolute_import
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.template import Template, Context
from . import factories as f
class TestStripeTemplateTags(TestCase):
def setUp(self):
# clean fares
from conference.models import Fare
Fare.objects.all().delete()
def test_stripe_checkout_script_template_tag(self):
"""
Tests that the 'stripe_checkout_script' template tag works properly
"""
fare = f.FareFactory()
order = f.OrderFactory(items=[(fare, {"qty": 1})])
t = Template("{% load stripe_tags %}{% stripe_checkout_script order %}")
data = t.render(Context({"order": order}))
self.assertIn('"https://checkout.stripe.com/checkout.js" class="stripe-button"', data)
self.assertIn('data-key="pk_test_qRUg4tJTFJgUiLz0FxKnuOXO"', data)
self.assertIn('data-amount="1000"', data)
self.assertIn('data-name="Foo Bar"', data)
self.assertIn('data-description="%s"' % order.orderitem_set.all()[0].description, data)
self.assertIn('data-image="foo-bar-logo-url"', data)
self.assertIn('data-currency="EUR"', data)
self.assertIn('data-allow-remember-me="false"', data)
self.assertIn('data-email="%s"' % order.user.user.email, data)
def test_stripe_checkout_form_template_tag(self):
"""
Tests that the 'stripe_checkout_form' template tag works properly
"""
fare = f.FareFactory()
order = f.OrderFactory(items=[(fare, {"qty": 1})])
t = Template("{% load stripe_tags %}{% stripe_checkout_form order %}")
data = t.render(Context({"order": order}))
url = reverse("assopy-stripe-checkout", args=(order.pk,))
self.assertIn('<form action="%s" method="POST">' % url, data)
self.assertIn('"https://checkout.stripe.com/checkout.js" class="stripe-button"', data)
self.assertIn('data-key="pk_test_qRUg4tJTFJgUiLz0FxKnuOXO"', data)
self.assertIn('data-amount="1000"', data)
self.assertIn('data-name="Foo Bar"', data)
self.assertIn('data-description="%s"' % order.orderitem_set.all()[0].description, data)
self.assertIn('data-image="foo-bar-logo-url"', data)
self.assertIn('data-currency="EUR"', data)
self.assertIn('data-allow-remember-me="false"', data)
self.assertIn('data-email="%s"' % order.user.user.email, data)
| 43.482759
| 95
| 0.649881
| 308
| 2,522
| 5.204545
| 0.275974
| 0.142233
| 0.169682
| 0.199626
| 0.749844
| 0.7199
| 0.7199
| 0.678727
| 0.627573
| 0.627573
| 0
| 0.00787
| 0.193894
| 2,522
| 57
| 96
| 44.245614
| 0.78062
| 0.057891
| 0
| 0.6
| 0
| 0
| 0.297982
| 0.14255
| 0
| 0
| 0
| 0
| 0.475
| 1
| 0.075
| false
| 0
| 0.175
| 0
| 0.275
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2180fb54a28520a85d5cd2c157d980caeff8d186
| 46
|
py
|
Python
|
python/ql/test/query-tests/Imports/cyclic-module/module3.py
|
vadi2/codeql
|
a806a4f08696d241ab295a286999251b56a6860c
|
[
"MIT"
] | 4,036
|
2020-04-29T00:09:57.000Z
|
2022-03-31T14:16:38.000Z
|
python/ql/test/query-tests/Imports/cyclic-module/module3.py
|
vadi2/codeql
|
a806a4f08696d241ab295a286999251b56a6860c
|
[
"MIT"
] | 2,970
|
2020-04-28T17:24:18.000Z
|
2022-03-31T22:40:46.000Z
|
python/ql/test/query-tests/Imports/cyclic-module/module3.py
|
ScriptBox99/github-codeql
|
2ecf0d3264db8fb4904b2056964da469372a235c
|
[
"MIT"
] | 794
|
2020-04-29T00:28:25.000Z
|
2022-03-30T08:21:46.000Z
|
# use via import member
from module1 import a1
| 23
| 23
| 0.804348
| 8
| 46
| 4.625
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0.173913
| 46
| 2
| 24
| 23
| 0.921053
| 0.456522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
21aabb32afe53895e70f5ea58b040324ebbb37d2
| 113
|
py
|
Python
|
OpenGLCffi/GL/EXT/INTEL/framebuffer_CMAA.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
OpenGLCffi/GL/EXT/INTEL/framebuffer_CMAA.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
OpenGLCffi/GL/EXT/INTEL/framebuffer_CMAA.py
|
cydenix/OpenGLCffi
|
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
|
[
"MIT"
] | null | null | null |
from OpenGLCffi.GL import params
@params(api='gl', prms=[])
def glApplyFramebufferAttachmentCMAAINTEL():
pass
| 16.142857
| 44
| 0.769912
| 12
| 113
| 7.25
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106195
| 113
| 6
| 45
| 18.833333
| 0.861386
| 0
| 0
| 0
| 0
| 0
| 0.018018
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0.25
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
21d1c50bf78322ad95dce839d037fbb664168403
| 159
|
py
|
Python
|
older/rc-query-runner/tests/test_query_runner.py
|
nickpartner-goahead/resilient-community-apps
|
097c0dbefddbd221b31149d82af9809420498134
|
[
"MIT"
] | 65
|
2017-12-04T13:58:32.000Z
|
2022-03-24T18:33:17.000Z
|
older/rc-query-runner/tests/test_query_runner.py
|
nickpartner-goahead/resilient-community-apps
|
097c0dbefddbd221b31149d82af9809420498134
|
[
"MIT"
] | 48
|
2018-03-02T19:17:14.000Z
|
2022-03-09T22:00:38.000Z
|
older/rc-query-runner/tests/test_query_runner.py
|
nickpartner-goahead/resilient-community-apps
|
097c0dbefddbd221b31149d82af9809420498134
|
[
"MIT"
] | 95
|
2018-01-11T16:23:39.000Z
|
2022-03-21T11:34:29.000Z
|
"""System Integration Tests for Query Runner"""
from __future__ import print_function
import pytest
def test_fake():
""" placeholder """
assert True
| 17.666667
| 47
| 0.72327
| 19
| 159
| 5.736842
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.18239
| 159
| 8
| 48
| 19.875
| 0.838462
| 0.339623
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0.25
| true
| 0
| 0.5
| 0
| 0.75
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
21ef9bc7c46813b2583ad6b79159678c383efc82
| 124
|
py
|
Python
|
librarypaste/__main__.py
|
yougov/librarypaste
|
740fafcb260f493ca5bbd24afd59d49444c2b2ae
|
[
"MIT"
] | null | null | null |
librarypaste/__main__.py
|
yougov/librarypaste
|
740fafcb260f493ca5bbd24afd59d49444c2b2ae
|
[
"MIT"
] | null | null | null |
librarypaste/__main__.py
|
yougov/librarypaste
|
740fafcb260f493ca5bbd24afd59d49444c2b2ae
|
[
"MIT"
] | 1
|
2022-03-26T09:24:56.000Z
|
2022-03-26T09:24:56.000Z
|
from __future__ import absolute_import
import librarypaste.launch
if __name__ == '__main__':
librarypaste.launch.main()
| 15.5
| 38
| 0.798387
| 14
| 124
| 6.142857
| 0.642857
| 0.418605
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120968
| 124
| 7
| 39
| 17.714286
| 0.788991
| 0
| 0
| 0
| 0
| 0
| 0.064516
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
21f1f2d682218d4f0ea4c9c4202c0f41fa8a397f
| 125
|
py
|
Python
|
venv/Lib/site-packages/stateutil/__init__.py
|
avim2809/CameraSiteBlocker
|
bfc0434e75e8f3f95c459a4adc86b7673200816e
|
[
"Apache-2.0"
] | null | null | null |
venv/Lib/site-packages/stateutil/__init__.py
|
avim2809/CameraSiteBlocker
|
bfc0434e75e8f3f95c459a4adc86b7673200816e
|
[
"Apache-2.0"
] | null | null | null |
venv/Lib/site-packages/stateutil/__init__.py
|
avim2809/CameraSiteBlocker
|
bfc0434e75e8f3f95c459a4adc86b7673200816e
|
[
"Apache-2.0"
] | null | null | null |
# encoding: utf-8
from .incrementer import Incrementer
from .persist import Persist, PersistJSON
from .switch import Switch
| 20.833333
| 41
| 0.808
| 16
| 125
| 6.3125
| 0.5625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009259
| 0.136
| 125
| 5
| 42
| 25
| 0.925926
| 0.12
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
df5ca415fe916c4daa60dcd5b4acd159c88ce124
| 99
|
py
|
Python
|
yalul/parsers/abstract_syntax_tree.py
|
OtavioHenrique/yalul
|
ce99e32365ed5607527b9f2f39705ad5d9e20ba2
|
[
"MIT"
] | 1
|
2021-04-01T20:22:36.000Z
|
2021-04-01T20:22:36.000Z
|
yalul/parsers/abstract_syntax_tree.py
|
OtavioHenrique/yalul
|
ce99e32365ed5607527b9f2f39705ad5d9e20ba2
|
[
"MIT"
] | 1
|
2020-11-20T22:24:38.000Z
|
2020-11-20T22:24:38.000Z
|
yalul/parsers/abstract_syntax_tree.py
|
OtavioHenrique/yalul
|
ce99e32365ed5607527b9f2f39705ad5d9e20ba2
|
[
"MIT"
] | null | null | null |
class AbstractSyntaxTree:
def __init__(self, statements):
self.statements = statements
| 24.75
| 36
| 0.727273
| 9
| 99
| 7.555556
| 0.666667
| 0.411765
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.20202
| 99
| 3
| 37
| 33
| 0.860759
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
df5fc80ed5fa841b63f1815a959976e104e03adc
| 851
|
py
|
Python
|
college_project/exam/home/models.py
|
a4aakash/OnlineExamSystem
|
d319e575fdfede4a9d49f6f366f18f1256d17c07
|
[
"MIT"
] | null | null | null |
college_project/exam/home/models.py
|
a4aakash/OnlineExamSystem
|
d319e575fdfede4a9d49f6f366f18f1256d17c07
|
[
"MIT"
] | null | null | null |
college_project/exam/home/models.py
|
a4aakash/OnlineExamSystem
|
d319e575fdfede4a9d49f6f366f18f1256d17c07
|
[
"MIT"
] | null | null | null |
from django.db import models
# Create your models here.
# makemigrations - create changes and store in a file
# migrate - apply the pending changes created by migrations
class Contact(models.Model):
name = models.CharField(max_length=100)
registration = models.CharField(max_length=100)
branch = models.CharField(max_length=10)
roll = models.CharField(max_length=10)
email = models.CharField(max_length=100)
phone = models.CharField(max_length=12)
date = models.DateField()
def __str__(self):
return self.name
class AnswerPage(models.Model):
name = models.CharField(max_length=100)
roll = models.CharField(max_length=10)
phone = models.CharField(max_length=12)
desc = models.TextField()
date = models.DateField()
def __str__(self):
return self.name
| 31.518519
| 60
| 0.695652
| 108
| 851
| 5.324074
| 0.425926
| 0.234783
| 0.281739
| 0.375652
| 0.646957
| 0.507826
| 0.295652
| 0.295652
| 0.149565
| 0
| 0
| 0.032738
| 0.210341
| 851
| 27
| 61
| 31.518519
| 0.822917
| 0.157462
| 0
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.105263
| false
| 0
| 0.052632
| 0.105263
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
df6a21acef6ae6bc1a47f78552a92bd279472ca8
| 50
|
py
|
Python
|
EAMetatrader/Enums/__init__.py
|
EAScript/EAMT
|
b7c0576f99206886edaa932421853d822498dcbd
|
[
"MIT"
] | 18
|
2021-03-20T18:23:28.000Z
|
2022-01-22T06:00:54.000Z
|
EAMetatrader/Enums/__init__.py
|
EAScript/EAMT
|
b7c0576f99206886edaa932421853d822498dcbd
|
[
"MIT"
] | 1
|
2021-05-24T07:14:19.000Z
|
2021-08-08T19:42:42.000Z
|
EAMetatrader/Enums/__init__.py
|
EAScript/EAMT
|
b7c0576f99206886edaa932421853d822498dcbd
|
[
"MIT"
] | 6
|
2021-04-02T16:58:25.000Z
|
2022-01-03T14:29:20.000Z
|
# Inside of __init__.py
from .EnumObjects import *
| 25
| 26
| 0.78
| 7
| 50
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14
| 50
| 2
| 26
| 25
| 0.813953
| 0.42
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
10cd9a401cf3dfaef697d7ff4a6c4ab0c1e10b2f
| 36
|
py
|
Python
|
app/__main__.py
|
uleague/universityleague-match-stats
|
003ba58a8c2256a002192229eae1b0ae13a6df80
|
[
"MIT"
] | null | null | null |
app/__main__.py
|
uleague/universityleague-match-stats
|
003ba58a8c2256a002192229eae1b0ae13a6df80
|
[
"MIT"
] | 4
|
2020-08-24T15:23:40.000Z
|
2020-12-24T16:07:54.000Z
|
app/__main__.py
|
uleague/universityleague-match-stats
|
003ba58a8c2256a002192229eae1b0ae13a6df80
|
[
"MIT"
] | null | null | null |
from app.server import init
init()
| 9
| 27
| 0.75
| 6
| 36
| 4.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 36
| 3
| 28
| 12
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
10e1e6623160ee5ecb76e656a8ad5f84e683e354
| 491
|
py
|
Python
|
terrascript/amixr/r.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 507
|
2017-07-26T02:58:38.000Z
|
2022-01-21T12:35:13.000Z
|
terrascript/amixr/r.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 135
|
2017-07-20T12:01:59.000Z
|
2021-10-04T22:25:40.000Z
|
terrascript/amixr/r.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 81
|
2018-02-20T17:55:28.000Z
|
2022-01-31T07:08:40.000Z
|
# terrascript/amixr/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class amixr_escalation(terrascript.Resource):
pass
class amixr_integration(terrascript.Resource):
pass
class amixr_on_call_shift(terrascript.Resource):
pass
class amixr_route(terrascript.Resource):
pass
class amixr_schedule(terrascript.Resource):
pass
| 16.366667
| 79
| 0.771894
| 57
| 491
| 6.526316
| 0.54386
| 0.134409
| 0.30914
| 0.301075
| 0.354839
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002392
| 0.148676
| 491
| 29
| 80
| 16.931034
| 0.88756
| 0.142566
| 0
| 0.333333
| 1
| 0
| 0.093301
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.133333
| 0
| 0.466667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
10ecb9952c76f28e445f8044e0f961efbc861eb1
| 186
|
py
|
Python
|
products/admin.py
|
AlenKrga1/FreelanceSolution
|
0a0d656bd90a20c6250bcc889b35cea2fb945427
|
[
"BSD-Source-Code"
] | null | null | null |
products/admin.py
|
AlenKrga1/FreelanceSolution
|
0a0d656bd90a20c6250bcc889b35cea2fb945427
|
[
"BSD-Source-Code"
] | 7
|
2021-03-30T14:04:17.000Z
|
2022-03-12T00:44:39.000Z
|
products/admin.py
|
AlenKrga1/FreelanceSolution
|
0a0d656bd90a20c6250bcc889b35cea2fb945427
|
[
"BSD-Source-Code"
] | 2
|
2020-07-30T21:55:06.000Z
|
2020-10-27T20:53:56.000Z
|
from .models import Product, UserProduct, ProductReview
from django.contrib import admin
admin.site.register(Product)
admin.site.register(UserProduct)
admin.site.register(ProductReview)
| 31
| 55
| 0.844086
| 23
| 186
| 6.826087
| 0.478261
| 0.171975
| 0.324841
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069892
| 186
| 6
| 56
| 31
| 0.907514
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
800099cc7ab7bb9243c33f454836fdadb7553010
| 54
|
py
|
Python
|
couchbase/asynchronous/__init__.py
|
djeebus/couchbase-python-client
|
fee7a4ea368d4d606601821973e5675b90ff0f7c
|
[
"Apache-2.0"
] | null | null | null |
couchbase/asynchronous/__init__.py
|
djeebus/couchbase-python-client
|
fee7a4ea368d4d606601821973e5675b90ff0f7c
|
[
"Apache-2.0"
] | null | null | null |
couchbase/asynchronous/__init__.py
|
djeebus/couchbase-python-client
|
fee7a4ea368d4d606601821973e5675b90ff0f7c
|
[
"Apache-2.0"
] | null | null | null |
from couchbase.asynchronous.bucket import AsyncBucket
| 27
| 53
| 0.888889
| 6
| 54
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 54
| 1
| 54
| 54
| 0.96
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
803586e1ea966e3ca0a32d6f9e43561f57eef35c
| 430
|
py
|
Python
|
epi_judge_python/search_unknown_length_array.py
|
shobhitmishra/CodingProblems
|
0fc8c5037eef95b3ec9826b3a6e48885fc86659e
|
[
"MIT"
] | null | null | null |
epi_judge_python/search_unknown_length_array.py
|
shobhitmishra/CodingProblems
|
0fc8c5037eef95b3ec9826b3a6e48885fc86659e
|
[
"MIT"
] | null | null | null |
epi_judge_python/search_unknown_length_array.py
|
shobhitmishra/CodingProblems
|
0fc8c5037eef95b3ec9826b3a6e48885fc86659e
|
[
"MIT"
] | null | null | null |
from typing import List
from test_framework import generic_test
def binary_search_unknown_length(A: List[int], k: int) -> int:
# TODO - you fill in here.
return 0
if __name__ == '__main__':
exit(
generic_test.generic_test_main('search_unknown_length_array.py',
'search_unknown_length_array.tsv',
binary_search_unknown_length))
| 26.875
| 73
| 0.613953
| 51
| 430
| 4.686275
| 0.568627
| 0.217573
| 0.317992
| 0.209205
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00339
| 0.313953
| 430
| 15
| 74
| 28.666667
| 0.80678
| 0.055814
| 0
| 0
| 0
| 0
| 0.170792
| 0.15099
| 0
| 0
| 0
| 0.066667
| 0
| 1
| 0.111111
| false
| 0
| 0.222222
| 0.111111
| 0.444444
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
8047ce8dfdfea3cf8f6f08280a9c22cb2aff7f78
| 154
|
py
|
Python
|
test_project_python34/urlactive/test_views.py
|
nalourie/django-urlactive-lite
|
3c7160c09f68ab426e851629171cb090a70014d5
|
[
"MIT"
] | 3
|
2015-03-23T02:26:43.000Z
|
2015-06-01T00:33:37.000Z
|
urlactive/test_views.py
|
nalourie/django-urlactive-lite
|
3c7160c09f68ab426e851629171cb090a70014d5
|
[
"MIT"
] | null | null | null |
urlactive/test_views.py
|
nalourie/django-urlactive-lite
|
3c7160c09f68ab426e851629171cb090a70014d5
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
def a_view(request):
"""first test view function."""
return render(request, "urlactive/test-template.html")
| 22
| 58
| 0.727273
| 20
| 154
| 5.55
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149351
| 154
| 6
| 59
| 25.666667
| 0.847328
| 0.162338
| 0
| 0
| 0
| 0
| 0.227642
| 0.227642
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8055012249fd8060174b82b1918b080fbb77fbb9
| 4,551
|
py
|
Python
|
test/repos/test_utils.py
|
aexvir/the-zoo
|
7816afb9a0a26c6058b030b4a987c73e952d92bd
|
[
"MIT"
] | 90
|
2018-11-20T10:58:24.000Z
|
2022-02-19T16:12:46.000Z
|
test/repos/test_utils.py
|
kiwicom/the-zoo
|
fee0108ea7b65112e5b572a146cff4b1c54033fd
|
[
"MIT"
] | 348
|
2018-11-21T09:22:31.000Z
|
2021-11-03T13:45:08.000Z
|
test/repos/test_utils.py
|
aexvir/the-zoo
|
7816afb9a0a26c6058b030b4a987c73e952d92bd
|
[
"MIT"
] | 11
|
2018-12-08T18:42:07.000Z
|
2021-02-21T06:27:58.000Z
|
import tempfile
from pathlib import Path
import fakeredis
import pytest
import zoo.repos.utils as uut
from zoo.repos.exceptions import MissingFilesError, RepositoryNotFoundError
from zoo.repos.models import Provider
from zoo.repos.utils import get_scm_module
pytestmark = pytest.mark.django_db
@pytest.mark.parametrize("repository__provider", [item.value for item in Provider])
def test_download_repository__project_does_not_exist(fake_dir, repository, mocker):
scm_module = get_scm_module(repository.provider)
m_get_project = mocker.patch.object(
scm_module, "get_project", side_effect=RepositoryNotFoundError
)
with pytest.raises(uut.RepositoryNotFoundError):
uut.download_repository(repository, fake_dir)
m_get_project.assert_called_once_with(repository.remote_id)
@pytest.mark.parametrize("repository__provider", [item.value for item in Provider])
def test_download_repository__missing_files(fake_dir, repository, mocker):
scm_module = get_scm_module(repository.provider)
m_get_project = mocker.patch.object(
scm_module, "get_project", return_value=mocker.sentinel.project
)
m_download_archive = mocker.patch.object(
scm_module, "download_archive", side_effect=MissingFilesError
)
with pytest.raises(uut.MissingFilesError):
uut.download_repository(repository, fake_dir)
m_get_project.assert_called_once_with(repository.remote_id)
m_download_archive.assert_called_once_with(
mocker.sentinel.project, mocker.ANY, None
)
@pytest.mark.parametrize("repository__provider", [item.value for item in Provider])
def test_download_repository(fake_dir, repo_archive, repository, mocker):
scm_module = get_scm_module(repository.provider)
m_get_project = mocker.patch.object(
scm_module, "get_project", return_value=mocker.sentinel.project
)
m_download_archive = mocker.patch.object(
scm_module, "download_archive", return_value=repo_archive
)
repo_path = uut.download_repository(repository, fake_dir)
assert {f.name for f in repo_path.iterdir()} == {
"readme.md",
"requirements.txt",
"package.json",
"openapi.json",
}
assert (repo_path / "readme.md").read_text() == "Hello world!"
m_get_project.assert_called_once_with(repository.remote_id)
m_download_archive.assert_called_once_with(
mocker.sentinel.project, mocker.ANY, None
)
@pytest.mark.parametrize("repository__provider", [item.value for item in Provider])
def test_download_repository__custom_sha(fake_dir, repo_archive, repository, mocker):
scm_module = get_scm_module(repository.provider)
m_get_project = mocker.patch.object(
scm_module, "get_project", return_value=mocker.sentinel.project
)
m_download_archive = mocker.patch.object(
scm_module, "download_archive", return_value=repo_archive
)
sha = "idspispopd"
repo_path = uut.download_repository(repository, fake_dir, sha)
assert {f.name for f in repo_path.iterdir()} == {
"readme.md",
"requirements.txt",
"package.json",
"openapi.json",
}
assert (repo_path / "readme.md").read_text() == "Hello world!"
m_get_project.assert_called_once_with(repository.remote_id)
m_download_archive.assert_called_once_with(mocker.sentinel.project, mocker.ANY, sha)
@pytest.mark.parametrize("repository__provider", [item.value for item in Provider])
def test_openapi_definition(fake_path, repo_archive, repository, mocker):
scm_module = get_scm_module(repository.provider)
m_get_project = mocker.patch.object(
scm_module, "get_project", return_value=mocker.sentinel.project
)
m_download_archive = mocker.patch.object(
scm_module, "download_archive", return_value=repo_archive
)
fake_path.mkdir(parents=True, exist_ok=True)
mocker.patch("tempfile.mkdtemp", return_value=str(fake_path))
mocker.patch("zoo.repos.utils.OPENAPI_SCAN_EXCLUDE", [])
def redis(**kwargs):
return fakeredis.FakeStrictRedis(**kwargs)
mocker.patch("zoo.base.redis.get_connection", redis)
specs = uut.openapi_definition(repository)
m_get_project.assert_called_once_with(repository.remote_id)
m_download_archive.assert_called_once_with(
mocker.sentinel.project, mocker.ANY, None
)
assert len(specs) == 1 # spec is readable
assert specs[0]["info"]["title"] == "Petstore"
assert specs[0]["info"]["version"] == "1.0.0"
assert not fake_path.exists() # cleaned up
| 35.834646
| 88
| 0.739618
| 582
| 4,551
| 5.474227
| 0.180412
| 0.056497
| 0.037665
| 0.056497
| 0.736974
| 0.736974
| 0.736974
| 0.736974
| 0.708098
| 0.708098
| 0
| 0.001566
| 0.157987
| 4,551
| 126
| 89
| 36.119048
| 0.829854
| 0.005933
| 0
| 0.520408
| 0
| 0
| 0.106835
| 0.014377
| 0
| 0
| 0
| 0
| 0.173469
| 1
| 0.061224
| false
| 0
| 0.081633
| 0.010204
| 0.153061
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1d7549f3c0a7ceeba5f66e48e8ce62c6ad875b23
| 145
|
py
|
Python
|
app/app/calc.py
|
JimmyButler25/receipe-api
|
1309281e125c744260baf4b9454fd61316d320a6
|
[
"MIT"
] | null | null | null |
app/app/calc.py
|
JimmyButler25/receipe-api
|
1309281e125c744260baf4b9454fd61316d320a6
|
[
"MIT"
] | null | null | null |
app/app/calc.py
|
JimmyButler25/receipe-api
|
1309281e125c744260baf4b9454fd61316d320a6
|
[
"MIT"
] | null | null | null |
def add(x, y):
"""add two numbers together"""
return x + y
def subtract(x, y):
"""subtract two numbers using TDD"""
return x - y
| 20.714286
| 40
| 0.57931
| 23
| 145
| 3.652174
| 0.478261
| 0.095238
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.268966
| 145
| 7
| 41
| 20.714286
| 0.792453
| 0.37931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
d5281bc6a93aa36e5e2325bb3aa59527b368f7ba
| 31,903
|
py
|
Python
|
tests/perf_benchmark/test_lenet_all_001.py
|
laekov/akg
|
5316b8cb2340bbf71bdc724dc9d81513a67b3104
|
[
"Apache-2.0"
] | 1
|
2020-08-31T02:43:43.000Z
|
2020-08-31T02:43:43.000Z
|
tests/perf_benchmark/test_lenet_all_001.py
|
laekov/akg
|
5316b8cb2340bbf71bdc724dc9d81513a67b3104
|
[
"Apache-2.0"
] | null | null | null |
tests/perf_benchmark/test_lenet_all_001.py
|
laekov/akg
|
5316b8cb2340bbf71bdc724dc9d81513a67b3104
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
sys.path.append(os.getcwd())
from base_all_run import BaseCaseRun
from test_run.conv_run import conv_run
from test_run.conv_backprop_input_run import conv_backprop_input_run
from test_run.conv_backprop_filter_run import conv_backprop_filter_run
from test_run.fused_batch_norm_run import fused_batch_norm_run
from test_run.fused_batch_norm_grad_run import fused_batch_norm_grad_run
from test_run.batch_norm_ad_run import batch_norm_ad_run
from test_run.batchmatmul_run import batchmatmul_execute
from test_run.maxpool_with_argmax_run import maxpool_with_argmax_run
from test_run.mean_run import mean_execute
from test_run.mean_ad_run import mean_ad_run
from test_run.relu_run import relu_run
from test_run.relu_grad_run import relu_grad_run
from test_run.relu_ad_run import relu_ad_run
from test_run.add_run import add_run
from test_run.addn_run import addn_execute
from test_run.sparse_softmax_cross_entropy_with_logits_run import sparse_softmax_cross_entropy_with_logits_run
from test_run.sparse_softmax_cross_entropy_with_logits_grad_run import sparse_softmax_cross_entropy_with_logits_grad_run
from test_run.sparse_softmax_cross_entropy_with_logits_ad_run import sparse_softmax_cross_entropy_with_logits_ad_run
from test_run.bias_add_grad_run import bias_add_grad_execute
from test_run.bias_add_ad_run import bias_add_ad_run
from test_run.reshape_run import reshape_execute
from test_run.apply_momentum_run import apply_momentum_run
from test_run.cast_run import cast_run
from test_run.conv_bn1_run import conv_bn1_run
from test_run.relu_ad_run import relu_ad_run
from test_run.conv_input_ad_run import conv_input_ad_run
from test_run.conv_filter_ad_run import conv_filter_ad_run
from test_run.maxpool_grad_with_argmax_run import maxpool_grad_with_argmax_run
class TestLenet(BaseCaseRun):
def setup(self):
"""
testcase preparcondition
:return:
"""
case_name = "test_lenet_all_001"
case_path = os.getcwd()
# params init
self.params_init(case_name, case_path)
if not super(TestLenet, self).setup():
return False
self.test_args = [
("lenet_ApplyMomentum_10_84_f32", apply_momentum_run, ((10, 84), "float32", False),
["level0", "rpc", "rpc_cloud"]),
("lenet_ApplyMomentum_10_f32", apply_momentum_run, ((10,), "float32", False),
["level0", "rpc", "rpc_cloud"]),
("lenet_ApplyMomentum_120_400_f32", apply_momentum_run, ((120, 400), "float32", False),
["level0", "rpc", "rpc_cloud"]),
("lenet_ApplyMomentum_120_f32", apply_momentum_run, ((120,), "float32", False),
["level0", "rpc", "rpc_cloud"]),
("lenet_ApplyMomentum_25_1_16_16_f32", apply_momentum_run, ((25, 1, 16, 16), "float32", False),
["level0", "rpc", "rpc_cloud"]),
("lenet_ApplyMomentum_84_120_f32", apply_momentum_run, ((84, 120), "float32", False),
["level0", "rpc", "rpc_cloud"]),
("lenet_ApplyMomentum_84_f32", apply_momentum_run, ((84,), "float32", False),
["level0", "rpc", "rpc_cloud"]),
("001_cast_test_case_32_dim_2", cast_run, ((10, 84), "float32", "float16"),
["level0", "rpc", "rpc_cloud"]),
("002_cast_test_case_32_dim_1", cast_run, ((10,), "float32", "float16"), ["level0", "rpc", "rpc_cloud"]),
("003_cast_test_case_32_dim_2", cast_run, ((120, 400), "float32", "float16"),
["level0", "rpc", "rpc_cloud"]),
(
"004_cast_test_case_32_dim_1", cast_run, ((120,), "float32", "float16"),
["level0", "rpc", "rpc_cloud"]),
("005_cast_test_case_32_dim_4", cast_run, ((25, 1, 16, 16), "float32", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("006_cast_test_case_16_dim_2", cast_run, ((32, 10), "float16", "float32"),
["level0", "rpc", "rpc_cloud"]),
("007_cast_test_case_16_dim_2", cast_run, ((32, 120), "float16", "float32"),
["level0", "rpc", "rpc_cloud"]),
("008_cast_test_case_16_dim_2", cast_run, ((32, 400), "float16", "float32"),
["level0", "rpc", "rpc_cloud"]),
("09_cast_test_case_16_dim_2", cast_run, ((32, 84), "float16", "float32"),
["level0", "rpc", "rpc_cloud"]),
("010_cast_test_case_32_dim_2", cast_run, ((84, 120), "float32", "float16"),
["level0", "rpc", "rpc_cloud"]),
("011_cast_test_case_32_dim_1", cast_run, ((84,), "float32", "float16"), ["level0", "rpc", "rpc_cloud"]),
("test_lenet_001_cast_test_case_16_dim_2", cast_run, ((10, 84), "float16", "float32"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_002_cast_test_case_16_dim_1", cast_run, ((10,), "float16", "float32"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_003_cast_test_case_16_dim_2", cast_run, ((120, 400), "float16", "float32"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_004_cast_test_case_16_dim_1", cast_run, ((120,), "float16", "float32"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_005_cast_test_case_16_dim_4", cast_run, ((25, 1, 16, 16), "float16", "float32"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_006_cast_test_case_32_dim_2", cast_run, ((32, 10), "float32", "float16"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_007_cast_test_case_32_dim_2", cast_run, ((32, 120), "float32", "float16"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_008_cast_test_case_32_dim_2", cast_run, ((32, 400), "float32", "float16"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_010_cast_test_case_16_dim_2", cast_run, ((84, 120), "float16", "float32"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_011_cast_test_case_16_dim_1", cast_run, ((84,), "float16", "float32"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_09_cast_test_case_32_dim_2", cast_run, ((32, 84), "float32", "float16"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_Conv2D_32_1_14_14_16", conv_run,
((32, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1), False), ["level0", "rpc", "rpc_cloud"]),
("lenet_Conv2D_32_1_32_32_16", conv_run,
((32, 1, 32, 32), (6, 1, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1), False), ["level0", "rpc", "rpc_cloud"]),
("lenet_Conv2DBackpropInput_32_1_10_10_16", conv_backprop_input_run,
((32, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)), ["level0", "rpc", "rpc_cloud"]),
("lenet_conv_backprop_filter_run_001", conv_backprop_filter_run,
((32, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)), ["level0", "rpc", "rpc_cloud"]),
("lenet_conv_backprop_filter_run_002", conv_backprop_filter_run,
((32, 1, 32, 32), (6, 1, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)), ["level0", "rpc", "rpc_cloud"]),
("five2four_001", "five2four_run", ([32, 16, 5, 5], "float16", 'NCHW', "float16"),
["level0", "rpc", "rpc_cloud"]),
("five2four_002", "five2four_run", ([32, 16, 5, 5], "float32", 'NCHW', "float16"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("four2five_001", "four2five_run", ([32, 1, 32, 32], "float32", 'NCHW', "float32"),
["level0", "rpc", "rpc_cloud"]),
("four2five_002", "four2five_run", ([32, 16, 5, 5], "float32", 'NCHW', "float32"),
["level0", "rpc", "rpc_cloud"]),
("four2five_003", "four2five_run", ([32, 1, 32, 32], "float16", 'NCHW', "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("four2five_004", "four2five_run", ([32, 16, 5, 5], "float16", 'NCHW', "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# FullConnection
("lenet_FullConnection_001", batchmatmul_execute,
((), 32, 84, 120, (84,), 'float16', False, True, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_FullConnection_002", batchmatmul_execute,
((), 32, 84, 120, (84,), "float32", False, True, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_FullConnection_003", batchmatmul_execute,
((), 32, 120, 400, (120,), 'float16', False, True, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_FullConnection_004", batchmatmul_execute,
((), 32, 120, 400, (120,), "float32", False, True, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_FullConnection_005", batchmatmul_execute,
((), 32, 10, 84, (10,), 'float16', False, True, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_FullConnection_006", batchmatmul_execute,
((), 32, 10, 84, (10,), "float32", False, True, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_FullConnection_007", batchmatmul_execute,
((), 32, 100, 84, (100,), 'float16', False, True, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_FullConnection_008", batchmatmul_execute,
((), 32, 100, 84, (100,), "float32", False, True, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
# MatMul
("lenet_MatMul_001", batchmatmul_execute,
((), 32, 84, 10, (), "float16", False, False, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MatMul_002", batchmatmul_execute,
((), 32, 84, 10, (), 'float32', False, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MatMul_003", batchmatmul_execute,
((), 32, 400, 120, (), "float16", False, False, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMul_004', batchmatmul_execute,
((), 32, 400, 120, (), 'float32', False, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MatMul_005", batchmatmul_execute,
((), 32, 120, 84, (), "float16", False, False, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMul_006', batchmatmul_execute,
((), 32, 120, 84, (), 'float32', False, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MatMul_007", batchmatmul_execute,
((), 32, 84, 100, (), "float16", False, False, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MatMul_008", batchmatmul_execute,
((), 32, 84, 100, (), 'float32', False, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# MatMulGe
("lenet_MatMulTaGe_001", batchmatmul_execute,
((), 120, 84, 32, (), "float16", True, False, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMulTaGe_002', batchmatmul_execute,
((), 120, 84, 32, (), 'float32', True, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MatMulTaGe_003", batchmatmul_execute,
((), 400, 120, 32, (), "float16", True, False, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMulTaGe_004', batchmatmul_execute,
((), 400, 120, 32, (), 'float32', True, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMulTaGe_005', batchmatmul_execute,
((), 84, 32, 10, (), 'float16', True, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MatMulTaGe_006", batchmatmul_execute,
((), 84, 32, 10, (), "float32", True, False, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMulTaGe_007', batchmatmul_execute,
((), 84, 32, 100, (), 'float16', True, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MatMulTaGe_008", batchmatmul_execute,
((), 84, 32, 100, (), "float32", True, False, "batchmatmul_output"),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MaxPoolV2_32_1_10_10_16_f16_valid_2_0_2", maxpool_with_argmax_run,
((32, 1, 10, 10, 16), [2, 2], [2, 2], "VALID", True, "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MaxPoolV2_32_1_28_28_16_f16_valid_2_0_2", maxpool_with_argmax_run,
((32, 1, 28, 28, 16), [2, 2], [2, 2], "VALID", True, "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("relu_001", relu_run, ((32, 1, 10, 10, 16), "float16", 1e-5), ["level0", "rpc", "rpc_cloud"]),
("relu_002", relu_run, ((32, 1, 28, 28, 16), "float16", 1e-5), ["level0", "rpc", "rpc_cloud"]),
("relu_003", relu_run, ((32, 1, 10, 10, 16), "float32", 1e-5),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("relu_004", relu_run, ((32, 1, 28, 28, 16), "float32", 1e-5),
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("reshape_001", reshape_execute, [(32, 16, 5, 5), (32, -1), "float32"], ["level0", "rpc", "rpc_cloud"]),
("reshape_002", reshape_execute, [(32, 400), (32, 16, 5, 5), "float32"], ["level0", "rpc", "rpc_cloud"]),
("reshape_003", reshape_execute, [(32, 16, 5, 5), (32, -1), "float16"],
["level1", "rpc", "rpc_cloud", "Unavailable"]),
("reshape_004", reshape_execute, [(32, 400), (32, 16, 5, 5), "float16"],
["level1", "rpc", "rpc_cloud", "Unavailable"]),
# maxpool_grad_with_argmax
("test_lenet_maxpool_grad_with_argmax_001", maxpool_grad_with_argmax_run,
((32, 1, 10, 10, 16), (2, 2), (2, 2), "VALID", "float16", False, True),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_maxpool_grad_with_argmax_002", maxpool_grad_with_argmax_run,
((32, 1, 10, 10, 16), (2, 2), (2, 2), "VALID", "float32", False, True),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_maxpool_grad_with_argmax_003", maxpool_grad_with_argmax_run,
((32, 1, 28, 28, 16), (2, 2), (2, 2), "VALID", "float16", False, True),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_maxpool_grad_with_argmax_004", maxpool_grad_with_argmax_run,
((32, 1, 28, 28, 16), (2, 2), (2, 2), "VALID", "float32", False, True),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# conv_bn1
("test_lenet_conv_bn1_32_1_14_14_16", conv_bn1_run,
((32, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1), False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_conv_bn1_32_1_32_32_16", conv_bn1_run,
((32, 1, 32, 32), (6, 1, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1), False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# relu_ad
("test_lenet_relu_ad_001", relu_ad_run, ((32, 1, 10, 10, 16), "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_relu_ad_002", relu_ad_run, ((32, 1, 28, 28, 16), "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_relu_ad_003", relu_ad_run, ((32, 1, 10, 10, 16), "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_relu_ad_004", relu_ad_run, ((32, 1, 28, 28, 16), "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# bias_add_ad
("test_lenet_bias_add_ad_fp16_001", bias_add_ad_run, ([32, 10], "DefaultFormat", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_bias_add_ad_fp16_002", bias_add_ad_run, ([32, 120], "DefaultFormat", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_bias_add_ad_fp16_003", bias_add_ad_run, ([32, 84], "DefaultFormat", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_bias_add_ad_fp32_001", bias_add_ad_run, ([32, 10], "DefaultFormat", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_bias_add_ad_fp32_002", bias_add_ad_run, ([32, 120], "DefaultFormat", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_bias_add_ad_fp32_003", bias_add_ad_run, ([32, 84], "DefaultFormat", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# sparse_softmax_cross_entropy_with_logits_ad
("test_lenet_lenet_sparse_softmax_cross_entropy_with_logits_ad_32_10_f32_32_10_32_i32_32_true",
sparse_softmax_cross_entropy_with_logits_ad_run,
[(32,), "int32", (32, 10), "float32", "mean", "sparse_softmax_cross_entropy_with_logits_ad_fp32"],
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# conv_input_ad
("test_lenet_conv_input_ad_32_1_10_10_16", conv_input_ad_run,
((32, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# conv_filter_ad
("test_lenet_conv_filter_ad_run_001", conv_filter_ad_run,
((32, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_conv_filter_ad_run_002", conv_filter_ad_run,
((32, 1, 32, 32), (6, 1, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_ApplyMomentum_1_84_f32", apply_momentum_run, ((1, 84), "float32", False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_ApplyMomentum_1_f32", apply_momentum_run, ((1,), "float32", False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_ApplyMomentum_1_400_f32", apply_momentum_run, ((1, 400), "float32", False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_ApplyMomentum_1_1_16_16_f32", apply_momentum_run, ((1, 1, 16, 16), "float32", False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_ApplyMomentum_1_120_f32", apply_momentum_run, ((1, 120), "float32", False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp32_001", bias_add_grad_execute, ([1, 10], "DefaultFormat", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp32_002", bias_add_grad_execute, ([1, 120], "DefaultFormat", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp32_003", bias_add_grad_execute, ([1, 84], "DefaultFormat", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp16_004", bias_add_grad_execute, ([1, 10], "DefaultFormat", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp16_005", bias_add_grad_execute, ([1, 120], "DefaultFormat", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp16_006", bias_add_grad_execute, ([1, 84], "DefaultFormat", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp32_001", bias_add_ad_run, ([1, 10], "DefaultFormat", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp32_002", bias_add_ad_run, ([1, 120], "DefaultFormat", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp32_003", bias_add_ad_run, ([1, 84], "DefaultFormat", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp16_004", bias_add_ad_run, ([1, 10], "DefaultFormat", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp16_005", bias_add_ad_run, ([1, 120], "DefaultFormat", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("bias_add_fp16_006", bias_add_ad_run, ([1, 84], "DefaultFormat", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("001_cast_test_case_32_dim_2", cast_run, ((1, 84), "float32", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("002_cast_test_case_32_dim_1", cast_run, ((1,), "float32", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("003_cast_test_case_32_dim_2", cast_run, ((1, 400), "float32", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("004_cast_test_case_32_dim_4", cast_run, ((1, 1, 16, 16), "float32", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("005_cast_test_case_16_dim_2", cast_run, ((1, 10), "float16", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("006_cast_test_case_16_dim_2", cast_run, ((1, 120), "float16", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("007_cast_test_case_16_dim_2", cast_run, ((1, 400), "float16", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("08_cast_test_case_16_dim_2", cast_run, ((1, 84), "float16", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("009_cast_test_case_32_dim_2", cast_run, ((1, 120), "float32", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_001_cast_test_case_16_dim_1", cast_run, ((1,), "float16", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_002_cast_test_case_16_dim_4", cast_run, ((1, 1, 16, 16), "float16", "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_003_cast_test_case_32_dim_2", cast_run, ((1, 10), "float32", "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("five2four_001", "five2four_run", ([1, 16, 5, 5], "float16", 'NCHW', "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("five2four_002", "five2four_run", ([1, 16, 5, 5], "float32", 'NCHW', "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("four2five_001", "four2five_run", ([1, 1, 32, 32], "float32", 'NCHW', "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("four2five_002", "four2five_run", ([1, 16, 5, 5], "float32", 'NCHW', "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("four2five_003", "four2five_run", ([1, 1, 32, 32], "float16", 'NCHW', "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("four2five_004", "four2five_run", ([1, 16, 5, 5], "float16", 'NCHW', "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_lenet_sparse_softmax_cross_entropy_with_logits_ad_32_10_f32_32_10_32_i32_32_true",
sparse_softmax_cross_entropy_with_logits_ad_run,
[(1,), "int32", (1, 10), "float32", "mean", "sparse_softmax_cross_entropy_with_logits_ad_fp32"],
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_lenet_sparse_softmax_cross_entropy_with_logits_ad_32_10_f32_32_10_32_i32_32_true",
sparse_softmax_cross_entropy_with_logits_grad_run,
[(1,), "int32", (1, 10), "float32", "mean", "sparse_softmax_cross_entropy_with_logits_ad_fp32"],
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("relu_001", relu_run, ((1, 1, 10, 10, 16), "float16", 1e-5),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("relu_002", relu_run, ((1, 1, 28, 28, 16), "float16", 1e-5),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("relu_003", relu_run, ((1, 1, 10, 10, 16), "float32", 1e-5),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("relu_004", relu_run, ((1, 1, 28, 28, 16), "float32", 1e-5),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("relu_grad_001", relu_ad_run, ((1, 1, 10, 10, 16), "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("relu_grad_002", relu_ad_run, ((1, 1, 28, 28, 16), "float16"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("relu_grad_003", relu_ad_run, ((1, 1, 10, 10, 16), "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("relu_grad_004", relu_ad_run, ((1, 1, 28, 28, 16), "float32"),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("reshape_001", reshape_execute, [(1, 16, 5, 5), (1, -1), "float32"],
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("reshape_002", reshape_execute, [(1, 400), (1, 16, 5, 5), "float32"],
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("reshape_003", reshape_execute, [(1, 16, 5, 5), (1, -1), "float16"],
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("reshape_004", reshape_execute, [(1, 400), (1, 16, 5, 5), "float16"],
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_Conv2D_32_1_14_14_16", conv_run,
((1, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1), False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_Conv2D_32_1_32_32_16", conv_run,
((1, 1, 32, 32), (6, 1, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1), False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_Conv2DBackpropInput_32_1_10_10_16", conv_backprop_input_run,
((1, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_conv_backprop_filter_run_001", conv_backprop_filter_run,
((1, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_conv_backprop_filter_run_002", conv_backprop_filter_run,
((1, 1, 32, 32), (6, 1, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_conv_input_ad_32_1_10_10_16", conv_input_ad_run,
((1, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_conv_filter_ad_run_001", conv_filter_ad_run,
((1, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_conv_filter_ad_run_002", conv_filter_ad_run,
((1, 1, 32, 32), (6, 1, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1)),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_conv_bn1_32_1_14_14_16", conv_bn1_run,
((1, 6, 14, 14), (16, 6, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1), False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("test_lenet_conv_bn1_32_1_32_32_16", conv_bn1_run,
((1, 1, 32, 32), (6, 1, 5, 5), (0, 0, 0, 0), (1, 1), (1, 1), False),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# FullConnection
("lenet_FullConnection_1_001", batchmatmul_execute,
((1,), 32, 84, 120, (84,), 'float16', False, True, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_FullConnection_1_002", batchmatmul_execute,
((1,), 32, 120, 400, (120,), 'float16', False, True, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_FullConnection_1_003", batchmatmul_execute,
((1,), 32, 10, 84, (10,), 'float16', False, True, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_FullConnection_1_004", batchmatmul_execute,
((1,), 32, 100, 84, (100,), 'float16', False, True, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# MatMul
("lenet_MatMul_1_001", batchmatmul_execute,
((1,), 32, 84, 10, (), 'float32', False, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMul_1_002', batchmatmul_execute,
((1,), 32, 400, 120, (), 'float32', False, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMul_1_003', batchmatmul_execute,
((1,), 32, 120, 84, (), 'float32', False, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
("lenet_MatMul_1_004", batchmatmul_execute,
((1,), 32, 84, 100, (), 'float32', False, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
# MatMulGe
('lenet_MatMulTaGe_1_001', batchmatmul_execute,
((1,), 120, 84, 32, (), 'float32', True, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMulTaGe_1_002', batchmatmul_execute,
((1,), 400, 120, 32, (), 'float32', True, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMulTaGe_1_003', batchmatmul_execute,
((1,), 84, 32, 10, (), 'float32', True, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
('lenet_MatMulTaGe_1_004', batchmatmul_execute,
((1,), 84, 32, 100, (), 'float32', True, False, 'batchmatmul_output'),
["level0", "rpc", "rpc_cloud", "Unavailable"]),
]
def print_args():
cls = TestLenet()
cls.setup()
cls.print_args()
if __name__ == "__main__":
print_args()
| 62.310547
| 120
| 0.564398
| 3,907
| 31,903
| 4.239826
| 0.046583
| 0.060127
| 0.110232
| 0.141624
| 0.902264
| 0.842982
| 0.800362
| 0.721461
| 0.629701
| 0.53607
| 0
| 0.113096
| 0.241984
| 31,903
| 511
| 121
| 62.432485
| 0.571889
| 0
| 0
| 0.454128
| 0
| 0
| 0.364609
| 0.10935
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.071101
| null | null | 0.006881
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d5663f24b1779c269efe585bce4df903c6fa4876
| 95
|
py
|
Python
|
run.py
|
GenjiLemon/PETest
|
97b733489a2c45fef208b0a48fa56c3df2645711
|
[
"Apache-2.0"
] | null | null | null |
run.py
|
GenjiLemon/PETest
|
97b733489a2c45fef208b0a48fa56c3df2645711
|
[
"Apache-2.0"
] | 16
|
2021-09-09T01:38:49.000Z
|
2021-12-13T14:14:07.000Z
|
run.py
|
GenjiLemon/PETest
|
97b733489a2c45fef208b0a48fa56c3df2645711
|
[
"Apache-2.0"
] | null | null | null |
from app import app
import config
if __name__ == '__main__':
app.run(port=config.app_port)
| 19
| 33
| 0.736842
| 15
| 95
| 4.066667
| 0.6
| 0.295082
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 95
| 5
| 33
| 19
| 0.7625
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
6352786b29c232bfd634c999ef62ff0fc748bb1e
| 50
|
py
|
Python
|
MTL_startup.py
|
mtlong/taming-transformers
|
ca99af65749123a47d852752bee31d1d3458aaf6
|
[
"MIT"
] | null | null | null |
MTL_startup.py
|
mtlong/taming-transformers
|
ca99af65749123a47d852752bee31d1d3458aaf6
|
[
"MIT"
] | null | null | null |
MTL_startup.py
|
mtlong/taming-transformers
|
ca99af65749123a47d852752bee31d1d3458aaf6
|
[
"MIT"
] | null | null | null |
print("Run this script to start the environment")
| 25
| 49
| 0.78
| 8
| 50
| 4.875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14
| 50
| 2
| 49
| 25
| 0.906977
| 0
| 0
| 0
| 0
| 0
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
63684d1ae9905cd8cddfb8a217fad55942ed2565
| 3,854
|
py
|
Python
|
tests/test_timer.py
|
davidr/python-timemarker
|
16fc4d4f9d6b534b94005169c977ed143f4f9dc5
|
[
"MIT"
] | null | null | null |
tests/test_timer.py
|
davidr/python-timemarker
|
16fc4d4f9d6b534b94005169c977ed143f4f9dc5
|
[
"MIT"
] | 1
|
2017-10-31T03:54:26.000Z
|
2017-11-01T03:01:43.000Z
|
tests/test_timer.py
|
davidr/python-timemarker
|
16fc4d4f9d6b534b94005169c977ed143f4f9dc5
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from time import sleep
import pytest
import timemarker
from .helpers import split_oneline
class TestBasics(object):
def test_instantiate(self):
timer = timemarker.TimeMarker()
assert isinstance(timer, timemarker.TimeMarker)
def test_contextmgr(self):
with timemarker.TimeMarker() as timer:
assert isinstance(timer, timemarker.TimeMarker)
assert isinstance(timer, timemarker.TimeMarker)
class TestExceptions(object):
def test_badtag(self):
for tag_name in ['start', 'stop']:
with pytest.raises(ValueError):
with timemarker.TimeMarker() as timer:
timer.tag(tag_name)
class TestPctgTimer(object):
def test_onetag_pctg(self, capsys):
with timemarker.TimeMarker() as timer:
timer.tag("sleep_100ms")
sleep(.1)
timer.stats()
out, err = capsys.readouterr()
assert err == ''
assert out != ''
out_dict = split_oneline(out)
assert out_dict['TIME'] == pytest.approx(0.1, abs=1e-2)
assert out_dict['start'] == pytest.approx(0.0, abs=1e-2)
assert out_dict['sleep_100ms'] == pytest.approx(1.0, abs=1e-2)
def test_twotag_pctg(self, capsys):
with timemarker.TimeMarker() as timer:
timer.tag("sleep_100ms_1")
sleep(.1)
timer.tag("sleep_100ms_2")
sleep(.1)
timer.stats()
out, err = capsys.readouterr()
assert err == ''
assert out != ''
out_dict = split_oneline(out)
assert out_dict['TIME'] == pytest.approx(0.2, abs=1e-2)
assert out_dict['start'] == pytest.approx(0.0, abs=1e-2)
assert out_dict['sleep_100ms_1'] == pytest.approx(.5, abs=1e-2)
assert out_dict['sleep_100ms_2'] == pytest.approx(.5, abs=1e-2)
class TestRawTimer(object):
def test_onetag_raw(self, capsys):
with timemarker.TimeMarker() as timer:
timer.tag("sleep_100ms")
sleep(.1)
timer.stats(fmt="raw")
out, err = capsys.readouterr()
assert err == ''
assert out != ''
out_dict = split_oneline(out)
assert out_dict['TIME'] == pytest.approx(0.1, abs=1e-2)
assert out_dict['start'] == pytest.approx(0.0, abs=1e-2)
assert out_dict['sleep_100ms'] == pytest.approx(.1, abs=1e-2)
def test_twotag_raw(self, capsys):
with timemarker.TimeMarker() as timer:
timer.tag("sleep_100ms_1")
sleep(.1)
timer.tag("sleep_100ms_2")
sleep(.1)
timer.stats(fmt="raw")
out, err = capsys.readouterr()
assert err == ''
assert out != ''
out_dict = split_oneline(out)
assert out_dict['TIME'] == pytest.approx(0.2, abs=1e-2)
assert out_dict['start'] == pytest.approx(0.0, abs=1e-2)
assert out_dict['sleep_100ms_1'] == pytest.approx(.1, abs=1e-2)
assert out_dict['sleep_100ms_2'] == pytest.approx(.1, abs=1e-2)
class TestTagging(object):
def test_tag_aggregation(self, capsys):
with timemarker.TimeMarker() as timer:
# Run this test twice and see if the the same tags are aggregated
for i in range(2):
timer.tag("sleep_100ms_1")
sleep(.1)
timer.tag("sleep_100ms_2")
sleep(.1)
timer.stats(fmt='raw')
out, err = capsys.readouterr()
assert err == ''
assert out != ''
out_dict = split_oneline(out)
assert out_dict['TIME'] == pytest.approx(0.4, abs=1e-2)
assert out_dict['start'] == pytest.approx(0.0, abs=1e-2)
assert out_dict['sleep_100ms_1'] == pytest.approx(.2, abs=1e-2)
assert out_dict['sleep_100ms_2'] == pytest.approx(.2, abs=1e-2)
| 30.346457
| 77
| 0.584847
| 498
| 3,854
| 4.381526
| 0.144578
| 0.094867
| 0.107241
| 0.071494
| 0.804308
| 0.782768
| 0.75527
| 0.71769
| 0.657195
| 0.657195
| 0
| 0.048684
| 0.280488
| 3,854
| 126
| 78
| 30.587302
| 0.73819
| 0.022055
| 0
| 0.648352
| 0
| 0
| 0.069854
| 0
| 0
| 0
| 0
| 0
| 0.340659
| 1
| 0.087912
| false
| 0
| 0.043956
| 0
| 0.186813
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
637162b4561a90253ea16f1db521515af262ea1f
| 11,341
|
py
|
Python
|
pythran/tests/test_set.py
|
artas360/pythran
|
66dad52d52be71693043e9a7d7578cfb9cb3d1da
|
[
"BSD-3-Clause"
] | null | null | null |
pythran/tests/test_set.py
|
artas360/pythran
|
66dad52d52be71693043e9a7d7578cfb9cb3d1da
|
[
"BSD-3-Clause"
] | null | null | null |
pythran/tests/test_set.py
|
artas360/pythran
|
66dad52d52be71693043e9a7d7578cfb9cb3d1da
|
[
"BSD-3-Clause"
] | 1
|
2017-03-12T20:32:36.000Z
|
2017-03-12T20:32:36.000Z
|
import unittest
from test_env import TestEnv
class TestSet(TestEnv):
def test_cpy_constructor(self):
code="""
def are_equal(s1):
s2 = set(s1)
return s2 == s1
"""
self.run_test(code, {'jack', 'sjoerd'}, are_equal=[{str}])
def test_in(self):
self.run_test("def _in(a,b):\n return b in a", {'aze', 'qsd'},'qsd', _in=[{str},str])
def test_empty_in(self):
self.run_test("def empty_in(b):\n return b in set()",'qsd', empty_in=[str])
def test_len(self):
self.run_test("def _len(a):\n return len(a)", {'aze', 'qsd', 'azeqsd'}, _len=[{str}])
def test_disjoint(self):
self.run_test("def _isdisjoint(a,b):\n return a.isdisjoint(b)", {1,3,2}, {7,2,5}, _isdisjoint=[{int},{float}])
def test_operator_le(self):
self.run_test("def _le(a,b):\n return a <= b", {1.,5.}, {1,2,5}, _le=[{float},{int}])
def test_issubset(self):
self.run_test("def _issubset(a,b):\n return a.issubset(b)", {1.,5.}, {1,2,5}, _issubset=[{float},{int}])
def test_operator_lt(self):
self.run_test("def _lt(a,b):\n return a < b", {1.,5.}, {1,2,5}, _lt=[{float},{int}])
def test_operator_ge(self):
self.run_test("def _ge(a,b):\n return a >= b", {1.,5.}, {1,2,5}, _ge=[{float},{int}])
def test_issuperset(self):
self.run_test("def _issuperset(a,b):\n return a.issuperset(b)", {1.,5.}, {1,2,5}, _issuperset=[{float},{int}])
def test_operator_gt(self):
self.run_test("def _gt(a,b):\n return a > b", {1.,5.}, {1,2,5}, _gt=[{float},{int}])
def test_clear(self):
self.run_test("def _clear(a):\n a.clear()\n return a", {1.,5.}, _clear=[{float}])
def test_pop(self):
self.run_test("def _pop(a):\n a.pop()\n return a", {1.,5.}, _pop=[{float}])
def test_remove(self):
self.run_test("def _remove(a,b):\n a.remove(b)\n return a", {1,3}, 1., _remove=[{int}, float])
def test_remove_strict(self):
self.run_test("def _remove_strict(a,b):\n a.remove(b)\n return a <= {3} and a >= {3}", {1,3}, 1., _remove_strict=[{int}, float])
def test_discard(self):
self.run_test("def _discard(a ,b):\n a.discard(b)\n return a", {1,3}, 1., _discard=[{int},float])
def test_copy(self):
self.run_test("def _copy(a):\n b=a.copy()\n return a <= {3} and a >= {3} and not a is b", {1,3}, _copy=[{int}])
def test_fct_union(self):
self.run_test("def _fct_union(b, c):\n a={1.}\n return a.union(b, c)", {1,3}, {1.,3.,4.,5.,6.} , _fct_union=[{int},{float}])
def test_fct_union_empty_set(self):
self.run_test("def _fct_union_empty_set(b, c):\n a=set()\n return a.union(b, c)", {1,3}, {1.,3.,4.,5.,6.} , _fct_union_empty_set=[{int},{float}])
def test_fct_union_empty_set_list(self):
self.run_test("def _fct_union_empty_set_list(b, c):\n a=set()\n return a.union(b, c)", {1,3}, [1.,3.,4.,5.,6.] , _fct_union_empty_set_list=[{int},[float]])
def test_fct_union_list(self):
self.run_test("def _fct_union_list(b, c):\n a={1.}\n return a.union(b, c)", [1,3], {1.,3.,4.,5.,6.} , _fct_union_list=[[int],{float}])
def test_fct_union_1arg(self):
self.run_test("def _fct_union_1arg(b):\n a={1.}\n return a.union(b)", {1,3,4,5,6}, _fct_union_1arg=[{int}])
def test_operator_union(self):
self.run_test("def _operator_union(b, c):\n a={1.}\n return (a | b | c)", {1,3,4,5,6}, {1.,2.,4.}, _operator_union=[{int},{float}])
def test_update(self):
self.run_test("def _update(b, c):\n a={1.}\n a.update(b, c)\n return a", {1,3}, {1.,3.,4.,5.,6.} , _update=[{int},{float}])
def test_update_list(self):
self.run_test("def _update_list(b, c):\n a={1.}; a.update(b, c); return a", {1,3}, [1.,3.,4.,5.,6.] , _update_list=[{int},[float]])
def test_update_empty_set_list(self):
self.run_test("def _update_empty_set_list(b, c):\n a=set()\n a.update(b, c)\n return a", {1,3}, [1.,3.,4.,5.,6.] , _update_empty_set_list=[{int},[float]])
def test_operator_update(self):
self.run_test("def _operator_update(b, c):\n a={1.,10.}\n a |= b | c\n return a", {1,3,4,5,6}, {1.,2.,4.}, _operator_update=[{int},{float}])
def test_fct_intersection(self):
self.run_test("def _fct_intersection(b, c):\n a={1.}\n return a.intersection(b,c)", {1,3,4,5,6}, {1.,2.,4.}, _fct_intersection=[{int},{float}])
def test_fct_intersection_empty_set(self):
self.run_test("def _fct_intersection_empty_set(b, c):\n a=set()\n return a.intersection(b,c)", {1,3,4,5,6}, {1.,2.,4.}, _fct_intersection_empty_set=[{int},{float}])
def test_fct_intersection_list(self):
self.run_test("def _fct_intersection_list(b, c):\n a={1.}\n return a.intersection(b,c)", {1,3,4,5,6}, [1.,2.,4.], _fct_intersection_list=[{int},[float]])
def test_operator_intersection(self):
self.run_test("def _operator_intersection(b, c):\n a={1.}\n return (a & b & c)", {1,3,4,5,6}, {1.,2.,4.}, _operator_intersection=[{int},{float}])
def test_fct_intersection_update(self):
self.run_test("def _fct_intersection_update(b, c):\n a={1.,10.}\n return a.intersection_update(b,c)", {1,3,4,5,6}, {1.,2.,4.}, _fct_intersection_update=[{int},{float}])
def test_fct_intersection_update_empty_set(self):
self.run_test("def _fct_intersection_update_empty_set(b, c):\n a=set()\n return a.intersection_update(b,c)", {1,3,4,5,6}, {1.,2.,4.}, _fct_intersection_update_empty_set=[{int},{float}])
def test_fct_intersection_empty_set_update(self):
self.run_test("def _fct_intersection_empty_set_update(c):\n a={1}\n b=set()\n return a.intersection_update(b,c)", {1.,2.,4.}, _fct_intersection_empty_set_update=[{float}])
def test_fct_intersection_update_list(self):
self.run_test("def _fct_intersection_update_list(b, c):\n a={1.,10.}\n return a.intersection_update(b,c)", [1,3,4,5,6], {1.,2.,4.}, _fct_intersection_update_list=[[int],{float}])
def test_operator_intersection_update(self):
self.run_test("def _operator_intersection_update(b, c):\n a={1.}\n a &= b & c\n return a", {1,3,4,5,6}, {1.,2.,4.}, _operator_intersection_update=[{int},{float}])
@unittest.skip("pythran -E + pythran success")
def test_operator_intersection_update_empty_set(self):
self.run_test("def _operator_intersection_update_empty_set(b, c):\n a=set()\n a &= b & c\n return a", {1,3,4,5,6}, {1.,2.,4.}, _operator_intersection_update_empty_set=[{int},{float}])
def test_fct_difference(self):
self.run_test("def _fct_difference(b, c):\n a={1.,5.,10.}\n return a.difference(b,c)", {1,3,4,5,6}, {1.,2.,4.}, _fct_difference=[{int},{float}])
def test_fct_difference_empty_set(self):
self.run_test("def _fct_difference_empty_set(b, c):\n a=set()\n return a.difference(b,c)", {1,3,4,5,6}, {1.,2.,4.}, _fct_difference_empty_set=[{int},{float}])
def test_fct_difference_list(self):
self.run_test("def _fct_difference_list(b, c):\n a={1.,5.,10.}\n return a.difference(b,c)", [1,3,4,5,6], {1.,2.,4.}, _fct_difference_list=[[int],{float}])
def test_operator_difference(self):
self.run_test("def _operator_difference(b, c):\n a={1.}\n return (a - b - c)", {1,3,4,5,6}, {1.,2.,4.}, _operator_difference=[{int},{float}])
def test_operator_difference_1arg(self):
self.run_test("def _operator_difference_1arg(b):\n a={1.,2.,5.}\n return (b - a)", {1,3,4,5,6}, _operator_difference_1arg=[{int}])
def test_fct_difference_update(self):
self.run_test("def _fct_difference_update(b, c):\n a={1.,5.,10.}\n return a.difference_update(b,c)", {1,3,4,5,6}, {1.,2.,4.}, _fct_difference_update=[{int},{float}])
def test_fct_difference_update_empty_set(self):
self.run_test("def _fct_difference_update_empty_set(b, c):\n a=set()\n return a.difference_update(b,c)", {1,3,4,5,6}, {1.,2.,4.}, _fct_difference_update_empty_set=[{int},{float}])
def test_fct_difference_update_list(self):
self.run_test("def _fct_difference_update_list(b, c):\n a={1.,5.,10.}\n return a.difference_update(b,c)", {1,3,4,5,6}, [1.,2.,4.], _fct_difference_update_list=[{int},[float]])
def test_operator_difference_update(self):
self.run_test("def _operator_difference_update(b, c):\n a={1.}\n a -= b - c\n return a", {1,3,4,5,6}, {1.,2.,4.}, _operator_difference_update=[{int},{float}])
def test_fct_symmetric_difference(self):
self.run_test("def _fct_symmetric_difference(b, c):\n return (b.symmetric_difference(c))", {1,3,6}, {1.,2.,5.}, _fct_symmetric_difference=[{int},{float}])
def test_fct_symmetric_difference_empty_set(self):
self.run_test("def _fct_symmetric_difference_empty_set(c):\n b=set()\n return (b.symmetric_difference(c))", {1.,2.,5.}, _fct_symmetric_difference_empty_set=[{float}])
def test_fct_symmetric_difference_list(self):
self.run_test("def _fct_symmetric_difference_list(b, c):\n return (b.symmetric_difference(c))", {1,3,6}, [1.,2.,5.], _fct_symmetric_difference_list=[{int},[float]])
def test_operator_symmetric_difference(self):
self.run_test("def _operator_symmetric_difference(b, c):\n return (b ^ c)", {1,3,6}, {1.,2.,5.}, _operator_symmetric_difference=[{int},{float}])
def test_fct_symmetric_difference_update(self):
self.run_test("def _fct_symmetric_difference_update(b, c):\n return (c.symmetric_difference_update(b))", {1,3,6}, {1.,2.,5.}, _fct_symmetric_difference_update=[{int},{float}])
def test_fct_symmetric_difference_update_empty_set(self):
self.run_test("def _fct_symmetric_difference_update_empty_set(b):\n c=set()\n return (c.symmetric_difference_update(b))", {1.,2.,5.}, _fct_symmetric_difference_update_empty_set=[{float}])
def test_fct_symmetric_difference_update2(self):
self.run_test("def _fct_symmetric_difference_update2(b, c):\n return (b.symmetric_difference_update(c))", {1,3,6}, {1.,2.,5.}, _fct_symmetric_difference_update2=[{int},{float}])
def test_fct_symmetric_difference_update_list(self):
self.run_test("def _fct_symmetric_difference_update_list(b, c):\n return (b.symmetric_difference_update(c))", {1,3,6}, [1.,2.,5.], _fct_symmetric_difference_update_list=[{int},[float]])
def test_operator_symmetric_difference_update(self):
self.run_test("def _operator_symmetric_difference_update(b, c):\n b ^= c\n return b", {1,3,6}, {1.,2.,5.}, _operator_symmetric_difference_update=[{int},{float}])
def test_operator_symmetric_difference_update2(self):
self.run_test("def _operator_symmetric_difference_update2(b, c):\n c ^= b\n return c", {1,3,6}, {1.,2.,5.}, _operator_symmetric_difference_update2=[{int},{float}])
# Check if conflict between set.pop() & list.pop()
def test_conflict_pop(self):
self.run_test("def _conflict_pop(a,b):\n a.pop()\n b.pop()\n return len(a)+len(b)", {1.,5.}, [1,2], _conflict_pop=[{float},[int]])
def test_set_to_bool_conversion(self):
self.run_test("def set_to_bool_conversion(s, t): return (1 if s else 0), (t if t else set())",
set(), {1, 2},set_to_bool_conversion=[{int}, {int}])
def test_print_set(self):
self.run_test("def print_set(s): return str(s)", {1, 2}, print_set=[{int}])
def test_print_empty_set(self):
self.run_test("def print_empty_set(s): return str(s)", set(), print_empty_set=[{int}])
| 58.761658
| 195
| 0.649943
| 1,987
| 11,341
| 3.422245
| 0.043281
| 0.018529
| 0.097059
| 0.130147
| 0.842647
| 0.761029
| 0.705
| 0.583676
| 0.409118
| 0.2775
| 0
| 0.039984
| 0.13773
| 11,341
| 192
| 196
| 59.067708
| 0.655384
| 0.004232
| 0
| 0
| 0
| 0.246154
| 0.340213
| 0.128255
| 0
| 0
| 0
| 0
| 0
| 1
| 0.461538
| false
| 0
| 0.015385
| 0
| 0.492308
| 0.030769
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
638d7d72ad6ef8e9faf22245d65a1afc5d049017
| 3,678
|
py
|
Python
|
evalml/tests/integration_tests/test_time_series_integration.py
|
Mahesh1822/evalml
|
aa0ec2379aeba12bbd0dcaaa000f9a2a62064169
|
[
"BSD-3-Clause"
] | null | null | null |
evalml/tests/integration_tests/test_time_series_integration.py
|
Mahesh1822/evalml
|
aa0ec2379aeba12bbd0dcaaa000f9a2a62064169
|
[
"BSD-3-Clause"
] | 1
|
2022-02-19T12:59:09.000Z
|
2022-02-19T12:59:09.000Z
|
evalml/tests/integration_tests/test_time_series_integration.py
|
Mahesh1822/evalml
|
aa0ec2379aeba12bbd0dcaaa000f9a2a62064169
|
[
"BSD-3-Clause"
] | null | null | null |
import pandas as pd
import pytest
from evalml.automl import AutoMLSearch
from evalml.problem_types import ProblemTypes
PERIODS = 500
@pytest.mark.parametrize(
"problem_type",
[
ProblemTypes.TIME_SERIES_BINARY,
ProblemTypes.TIME_SERIES_MULTICLASS,
ProblemTypes.TIME_SERIES_REGRESSION,
],
)
def test_can_run_automl_for_time_series_with_categorical_and_boolean_features(
problem_type,
):
X = pd.DataFrame(
{
"features": range(101, 101 + PERIODS),
"date": pd.date_range("2010-10-01", periods=PERIODS),
}
)
y = pd.Series(range(PERIODS))
if problem_type == ProblemTypes.TIME_SERIES_BINARY:
y = y % 2
elif problem_type == ProblemTypes.TIME_SERIES_MULTICLASS:
y = y % 3
X.ww.init()
X.ww["bool_feature"] = (
pd.Series([True, False])
.sample(n=X.shape[0], replace=True)
.reset_index(drop=True)
)
X.ww["cat_feature"] = (
pd.Series(["a", "b", "c"])
.sample(n=X.shape[0], replace=True)
.reset_index(drop=True)
)
automl = AutoMLSearch(
X,
y,
problem_type=problem_type,
problem_configuration={
"max_delay": 5,
"gap": 3,
"forecast_horizon": 2,
"time_index": "date",
},
optimize_thresholds=False,
)
automl.search()
automl.best_pipeline.fit(X, y)
X_valid = pd.DataFrame(
{
"date": pd.date_range(
pd.Timestamp(X.date.iloc[-1]) + pd.Timedelta("4d"), periods=2
)
}
)
# Treat all features as not known-in-advanced
automl.best_pipeline.predict(X_valid, X_train=X, y_train=y)
@pytest.mark.parametrize(
"problem_type",
[
ProblemTypes.TIME_SERIES_BINARY,
ProblemTypes.TIME_SERIES_MULTICLASS,
ProblemTypes.TIME_SERIES_REGRESSION,
],
)
def test_can_run_automl_for_time_series_known_in_advance(
problem_type,
):
X = pd.DataFrame(
{
"features": range(101, 101 + PERIODS),
"date": pd.date_range("2010-10-01", periods=PERIODS),
}
)
y = pd.Series(range(PERIODS))
if problem_type == ProblemTypes.TIME_SERIES_BINARY:
# So that we have coverage for sampling
y = (
pd.Series([1] * 50 + [0] * 450)
.sample(frac=1, random_state=0, replace=False)
.reset_index(drop=True)
)
elif problem_type == ProblemTypes.TIME_SERIES_MULTICLASS:
y = y % 3
X.ww.init()
X.ww["bool_feature"] = (
pd.Series([True, False])
.sample(n=X.shape[0], replace=True)
.reset_index(drop=True)
)
X.ww["cat_feature"] = (
pd.Series(["a", "b", "c"])
.sample(n=X.shape[0], replace=True)
.reset_index(drop=True)
)
automl = AutoMLSearch(
X,
y,
problem_type=problem_type,
problem_configuration={
"max_delay": 5,
"gap": 3,
"forecast_horizon": 2,
"time_index": "date",
"known_in_advance": ["bool_feature", "cat_feature"],
},
optimize_thresholds=False,
sampler_method="Undersampler",
)
automl.search()
automl.best_pipeline.fit(X, y)
X_valid = pd.DataFrame(
{
"date": pd.date_range(
pd.Timestamp(X.date.iloc[-1]) + pd.Timedelta("4d"), periods=2
),
"bool_feature": [True, False],
"cat_feature": ["a", "c"],
}
)
# Treat all features as not known-in-advanced
automl.best_pipeline.predict(X_valid, X_train=X, y_train=y)
| 26.460432
| 78
| 0.5677
| 432
| 3,678
| 4.611111
| 0.243056
| 0.066265
| 0.110442
| 0.081325
| 0.799197
| 0.799197
| 0.799197
| 0.799197
| 0.799197
| 0.799197
| 0
| 0.022984
| 0.302066
| 3,678
| 138
| 79
| 26.652174
| 0.753019
| 0.033986
| 0
| 0.658537
| 0
| 0
| 0.082277
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.01626
| false
| 0
| 0.03252
| 0
| 0.04878
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
6395996e36e0d5c6f6e2fb107a2b6d2601bc0e44
| 96
|
py
|
Python
|
chat/utils/errors.py
|
fmillone/python-chat
|
107dc050c14b7c8d09c5539cfbbdadf75ee4ee87
|
[
"MIT"
] | null | null | null |
chat/utils/errors.py
|
fmillone/python-chat
|
107dc050c14b7c8d09c5539cfbbdadf75ee4ee87
|
[
"MIT"
] | null | null | null |
chat/utils/errors.py
|
fmillone/python-chat
|
107dc050c14b7c8d09c5539cfbbdadf75ee4ee87
|
[
"MIT"
] | null | null | null |
class IllegalArgumentError(ValueError):
pass
class InvalidRoomError(ValueError):
pass
| 13.714286
| 39
| 0.770833
| 8
| 96
| 9.25
| 0.625
| 0.378378
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 96
| 6
| 40
| 16
| 0.925
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
63a577c207bf3a5d674455cf6da4382d6179de1b
| 56
|
py
|
Python
|
fluence/optim/__init__.py
|
prajjwal1/fluence2
|
f7353f4947ac4712ecd1df34e97df27d83060f13
|
[
"Apache-2.0"
] | 64
|
2020-05-13T16:49:04.000Z
|
2022-02-16T07:43:10.000Z
|
fluence/optim/__init__.py
|
prajjwal1/fluence2
|
f7353f4947ac4712ecd1df34e97df27d83060f13
|
[
"Apache-2.0"
] | 4
|
2020-08-04T08:02:17.000Z
|
2020-10-14T06:20:11.000Z
|
fluence/optim/__init__.py
|
prajjwal1/fluence2
|
f7353f4947ac4712ecd1df34e97df27d83060f13
|
[
"Apache-2.0"
] | 2
|
2021-01-12T17:14:51.000Z
|
2021-05-20T09:40:52.000Z
|
from .lamb import Lamb
from .lookahead import Lookahead
| 18.666667
| 32
| 0.821429
| 8
| 56
| 5.75
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 56
| 2
| 33
| 28
| 0.958333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
63cc93302fedc696efc7e2a09bd7a5bfa856ec42
| 51
|
py
|
Python
|
hetzner/tests/__init__.py
|
productsupcom/hetzner
|
7041add5cc1a8012f17d8b953068d92d74ef5517
|
[
"BSD-3-Clause"
] | 45
|
2018-01-24T09:09:37.000Z
|
2022-03-10T10:39:51.000Z
|
hetzner/tests/__init__.py
|
productsupcom/hetzner
|
7041add5cc1a8012f17d8b953068d92d74ef5517
|
[
"BSD-3-Clause"
] | 24
|
2018-09-04T20:30:17.000Z
|
2022-03-02T05:01:47.000Z
|
hetzner/tests/__init__.py
|
productsupcom/hetzner
|
7041add5cc1a8012f17d8b953068d92d74ef5517
|
[
"BSD-3-Clause"
] | 22
|
2017-11-23T13:01:49.000Z
|
2021-11-19T22:39:43.000Z
|
from hetzner.tests.test_util_addr import * # NOQA
| 25.5
| 50
| 0.784314
| 8
| 51
| 4.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 51
| 1
| 51
| 51
| 0.863636
| 0.078431
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8942c25fd90da238c8d74a0cce96816415b78660
| 104
|
py
|
Python
|
src/bindings/python/client.py
|
jvleta/poflow
|
53e6e9d61ddcb3d5ec0ac3df2a930d87d37e4955
|
[
"BSD-3-Clause"
] | null | null | null |
src/bindings/python/client.py
|
jvleta/poflow
|
53e6e9d61ddcb3d5ec0ac3df2a930d87d37e4955
|
[
"BSD-3-Clause"
] | 2
|
2021-05-28T22:59:26.000Z
|
2021-05-28T23:02:16.000Z
|
src/bindings/python/client.py
|
jvleta/poflow
|
53e6e9d61ddcb3d5ec0ac3df2a930d87d37e4955
|
[
"BSD-3-Clause"
] | null | null | null |
import sys
import matplotlib.pyplot as plt
sys.path.append("../../build/src/poflow-py")
import poflow
| 14.857143
| 44
| 0.740385
| 16
| 104
| 4.8125
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105769
| 104
| 6
| 45
| 17.333333
| 0.827957
| 0
| 0
| 0
| 0
| 0
| 0.240385
| 0.240385
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8943d0fd96344543bfaa1026204affdd8440c765
| 39
|
py
|
Python
|
models/__init__.py
|
daemonslayer/disentangling-variations
|
7b8c2ab556917ec8bf27677e65500c0092c548f9
|
[
"MIT"
] | 1
|
2022-01-22T21:05:35.000Z
|
2022-01-22T21:05:35.000Z
|
models/__init__.py
|
kgupta15/disentangling-variations
|
7b8c2ab556917ec8bf27677e65500c0092c548f9
|
[
"MIT"
] | null | null | null |
models/__init__.py
|
kgupta15/disentangling-variations
|
7b8c2ab556917ec8bf27677e65500c0092c548f9
|
[
"MIT"
] | 1
|
2019-02-19T01:39:43.000Z
|
2019-02-19T01:39:43.000Z
|
from .gan import *
from .vae import *
| 13
| 19
| 0.666667
| 6
| 39
| 4.333333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 39
| 2
| 20
| 19.5
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
896daf45e032207a403ac519eff407d77afef183
| 62
|
py
|
Python
|
vagrant/fabfile/__init__.py
|
terrai/rastercube
|
c8c6214fd682f72e94df4979f5d737cea4778617
|
[
"MIT"
] | 16
|
2017-06-23T15:11:07.000Z
|
2019-01-02T19:32:11.000Z
|
vagrant/fabfile/__init__.py
|
terrai/rastercube
|
c8c6214fd682f72e94df4979f5d737cea4778617
|
[
"MIT"
] | null | null | null |
vagrant/fabfile/__init__.py
|
terrai/rastercube
|
c8c6214fd682f72e94df4979f5d737cea4778617
|
[
"MIT"
] | 6
|
2017-07-28T08:45:06.000Z
|
2020-08-28T03:19:17.000Z
|
from fabric.api import *
# commands
import hdfs
import spark
| 10.333333
| 24
| 0.774194
| 9
| 62
| 5.333333
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177419
| 62
| 5
| 25
| 12.4
| 0.941176
| 0.129032
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
898d2ccd0c83851ea396f4834d42cadda500fd5c
| 105
|
py
|
Python
|
karura/core/analysis_stop_exception.py
|
ScoopML-labs/karura
|
ffd3d06e496ffbb0602d3cff3ac0692c747523ab
|
[
"Apache-2.0"
] | 74
|
2017-03-03T00:35:14.000Z
|
2021-12-26T17:50:48.000Z
|
karura/core/analysis_stop_exception.py
|
ScoopML-labs/karura
|
ffd3d06e496ffbb0602d3cff3ac0692c747523ab
|
[
"Apache-2.0"
] | 1
|
2017-08-18T02:50:11.000Z
|
2017-08-18T07:15:25.000Z
|
karura/core/analysis_stop_exception.py
|
ScoopML-labs/karura
|
ffd3d06e496ffbb0602d3cff3ac0692c747523ab
|
[
"Apache-2.0"
] | 6
|
2017-09-29T06:56:31.000Z
|
2020-12-17T14:39:59.000Z
|
class AnalysisStopException(Exception):
def __init__(self, insight):
self.insight = insight
| 21
| 39
| 0.714286
| 10
| 105
| 7.1
| 0.7
| 0.309859
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 105
| 4
| 40
| 26.25
| 0.845238
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
89948a553402dd60ea256533a8234fd7775d900c
| 160
|
py
|
Python
|
tests/integration/conftest.py
|
nevermined-io/metadata-api
|
5d04a73abbf5f0f4566da1f8c2d997f99c6297d0
|
[
"Apache-2.0"
] | 1
|
2021-12-18T16:12:54.000Z
|
2021-12-18T16:12:54.000Z
|
tests/integration/conftest.py
|
nevermined-io/metadata-api
|
5d04a73abbf5f0f4566da1f8c2d997f99c6297d0
|
[
"Apache-2.0"
] | 12
|
2021-06-11T08:15:01.000Z
|
2022-03-07T14:14:18.000Z
|
tests/integration/conftest.py
|
nevermined-io/metadata-api
|
5d04a73abbf5f0f4566da1f8c2d997f99c6297d0
|
[
"Apache-2.0"
] | null | null | null |
import pytest
from nevermined_metadata.app.dao import Dao
@pytest.fixture
def dao():
return Dao(config_file='./tests/resources/config-test-external.ini')
| 20
| 72
| 0.775
| 23
| 160
| 5.304348
| 0.73913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10625
| 160
| 8
| 72
| 20
| 0.853147
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 0.2
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
89a5d4621b1f8a6a7485d92799939ccd6b4c90c0
| 140
|
py
|
Python
|
problems/makeuppercase.py
|
stereoabuse/codewars
|
d6437afaef38c3601903891b8b9cb0f84c108c54
|
[
"MIT"
] | null | null | null |
problems/makeuppercase.py
|
stereoabuse/codewars
|
d6437afaef38c3601903891b8b9cb0f84c108c54
|
[
"MIT"
] | null | null | null |
problems/makeuppercase.py
|
stereoabuse/codewars
|
d6437afaef38c3601903891b8b9cb0f84c108c54
|
[
"MIT"
] | null | null | null |
## MakeUpperCase
## 8 kyu
## https://www.codewars.com//kata/57a0556c7cb1f31ab3000ad7
def make_upper_case(s):
return s.upper()
| 20
| 60
| 0.678571
| 17
| 140
| 5.470588
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13913
| 0.178571
| 140
| 7
| 61
| 20
| 0.669565
| 0.55
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
89b2f839612fd989e3b1e1ab8e54b0f29c2c9c75
| 50
|
py
|
Python
|
helper.py
|
edupugantiv/cs3240-labdemo
|
40927ff94b7011c99fafb2c1f7cce68e1e2aceed
|
[
"MIT"
] | null | null | null |
helper.py
|
edupugantiv/cs3240-labdemo
|
40927ff94b7011c99fafb2c1f7cce68e1e2aceed
|
[
"MIT"
] | null | null | null |
helper.py
|
edupugantiv/cs3240-labdemo
|
40927ff94b7011c99fafb2c1f7cce68e1e2aceed
|
[
"MIT"
] | null | null | null |
def greeting(msg):
print(msg)
print("on helper")
| 12.5
| 18
| 0.7
| 8
| 50
| 4.375
| 0.75
| 0.457143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 50
| 4
| 19
| 12.5
| 0.795455
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.333333
| 0.666667
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
89b811e6ccd3be4f6123a9600eefb5da0d2170c4
| 91
|
py
|
Python
|
ts_sdk/task/__init__.py
|
tetrascience/ts-sdk-python
|
05a5034f99bc73ea456a16332ecd26ce7c403dad
|
[
"Apache-2.0"
] | 1
|
2022-01-19T19:38:49.000Z
|
2022-01-19T19:38:49.000Z
|
ts_sdk/task/__init__.py
|
tetrascience/ts-sdk-python
|
05a5034f99bc73ea456a16332ecd26ce7c403dad
|
[
"Apache-2.0"
] | 17
|
2021-03-17T07:47:07.000Z
|
2022-03-28T18:49:06.000Z
|
ts_sdk/task/__init__.py
|
tetrascience/ts-sdk-python
|
05a5034f99bc73ea456a16332ecd26ce7c403dad
|
[
"Apache-2.0"
] | 1
|
2021-03-17T08:06:25.000Z
|
2021-03-17T08:06:25.000Z
|
from .__task_script_runner import Context
from .types import File, FileCategory, ReadResult
| 45.5
| 49
| 0.857143
| 12
| 91
| 6.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098901
| 91
| 2
| 49
| 45.5
| 0.902439
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
89bd42027cc2ac7c2e3565009824af0feb20d1cb
| 540
|
py
|
Python
|
tests/test_core.py
|
ironhouzi/pytib
|
e85bad59e842f24117cc318df35080f81abe0062
|
[
"MIT"
] | 2
|
2018-09-15T16:15:33.000Z
|
2020-04-03T06:47:06.000Z
|
tests/test_core.py
|
ironhouzi/pytib
|
e85bad59e842f24117cc318df35080f81abe0062
|
[
"MIT"
] | null | null | null |
tests/test_core.py
|
ironhouzi/pytib
|
e85bad59e842f24117cc318df35080f81abe0062
|
[
"MIT"
] | null | null | null |
from pytib.core import generate_stacks
def test_single_vowel_postitions(table):
assert list(generate_stacks(['r', 'ny', 'o', 'ng'], table)) \
== [['r', 'ny', 'o'], ['ng']]
def test_joined_vowel_stac(table):
assert list(generate_stacks(['h', 'ū', 'ṃ'], table)) \
== [['h', 'ū', 'ṃ']]
def test_single_vowel_stack(table):
assert list(generate_stacks(['ai'], table)) == [['ai']]
def test_joined_vowel_postitions(table):
assert list(generate_stacks(['g', 'a', 'i'], table)) \
== [['g', 'a', 'i']]
| 25.714286
| 65
| 0.583333
| 72
| 540
| 4.138889
| 0.388889
| 0.234899
| 0.201342
| 0.308725
| 0.489933
| 0.295302
| 0.295302
| 0
| 0
| 0
| 0
| 0
| 0.17963
| 540
| 20
| 66
| 27
| 0.672686
| 0
| 0
| 0
| 1
| 0
| 0.051852
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| false
| 0
| 0.083333
| 0
| 0.416667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
98474e1cee727b14c4a8fa74f61fe4a288fa0ef4
| 134
|
py
|
Python
|
src/riotwatcher/_apis/league_of_legends/urls/LolStatusApiV4Urls.py
|
lriccardo/Riot-Watcher
|
b88117da5b2400a4383bef4caf7be4557c7e319a
|
[
"MIT"
] | 489
|
2015-01-04T22:49:51.000Z
|
2022-03-28T03:15:54.000Z
|
src/riotwatcher/_apis/league_of_legends/urls/LolStatusApiV4Urls.py
|
lriccardo/Riot-Watcher
|
b88117da5b2400a4383bef4caf7be4557c7e319a
|
[
"MIT"
] | 162
|
2015-02-09T22:10:40.000Z
|
2022-02-22T13:48:50.000Z
|
src/riotwatcher/_apis/league_of_legends/urls/LolStatusApiV4Urls.py
|
lriccardo/Riot-Watcher
|
b88117da5b2400a4383bef4caf7be4557c7e319a
|
[
"MIT"
] | 221
|
2015-01-07T18:01:57.000Z
|
2022-03-26T21:18:48.000Z
|
from .LeagueEndpoint import LeagueEndpoint
class LolStatusApiV4Urls:
platform_data = LeagueEndpoint("/status/v4/platform-data")
| 22.333333
| 62
| 0.80597
| 13
| 134
| 8.230769
| 0.692308
| 0.224299
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016807
| 0.11194
| 134
| 5
| 63
| 26.8
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0.179104
| 0.179104
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9847c9366152ad37baba1eeb93edddcbbe04c778
| 26
|
py
|
Python
|
models/VAE_test.py
|
PeterJaq/optical_film_toolbox
|
0e2d2bfa5f1f93d405a2f25ee50e51771be777a5
|
[
"Apache-2.0"
] | 4
|
2020-07-05T12:35:45.000Z
|
2022-03-17T18:43:04.000Z
|
models/VAE_test.py
|
PeterJaq/optical_film_toolbox
|
0e2d2bfa5f1f93d405a2f25ee50e51771be777a5
|
[
"Apache-2.0"
] | null | null | null |
models/VAE_test.py
|
PeterJaq/optical_film_toolbox
|
0e2d2bfa5f1f93d405a2f25ee50e51771be777a5
|
[
"Apache-2.0"
] | null | null | null |
from models.VAE import VAE
| 26
| 26
| 0.846154
| 5
| 26
| 4.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 26
| 1
| 26
| 26
| 0.956522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
985c98390f7334a400ae670f14277845167e0aa9
| 178
|
py
|
Python
|
libs/__init__.py
|
SeanLee97/word2vec-test
|
68053556c7016cecc5e97dd25c28dd452b77f2e4
|
[
"MIT"
] | 1
|
2019-01-20T08:39:25.000Z
|
2019-01-20T08:39:25.000Z
|
libs/__init__.py
|
SeanLee97/word2vec-test
|
68053556c7016cecc5e97dd25c28dd452b77f2e4
|
[
"MIT"
] | null | null | null |
libs/__init__.py
|
SeanLee97/word2vec-test
|
68053556c7016cecc5e97dd25c28dd452b77f2e4
|
[
"MIT"
] | null | null | null |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
from .gensim_word_vector import GensimWordVector
from .word_vector import WordVector
__all__ = ('GensimWordVecotr', 'WordVector')
| 25.428571
| 48
| 0.747191
| 21
| 178
| 6
| 0.761905
| 0.15873
| 0.253968
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006369
| 0.117978
| 178
| 7
| 49
| 25.428571
| 0.796178
| 0.235955
| 0
| 0
| 0
| 0
| 0.19403
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
989caecace4f1fb1cf3289ae72113c1f50cdf625
| 273
|
py
|
Python
|
models.py
|
aiotter/kaede-bot
|
c51fa764bf6277986ccb08c6a8aad6781db12b8e
|
[
"MIT"
] | 2
|
2019-08-01T23:55:15.000Z
|
2019-08-05T02:01:51.000Z
|
models.py
|
aiotter/kaede-bot
|
c51fa764bf6277986ccb08c6a8aad6781db12b8e
|
[
"MIT"
] | 6
|
2020-06-12T12:47:32.000Z
|
2020-06-12T14:18:09.000Z
|
models.py
|
aiotter/kaede-bot
|
c51fa764bf6277986ccb08c6a8aad6781db12b8e
|
[
"MIT"
] | 1
|
2020-06-12T12:20:46.000Z
|
2020-06-12T12:20:46.000Z
|
import dataclasses
@dataclasses.dataclass
class MusicItem:
title: str
artist: str
added: dataclasses.field()
@dataclasses.dataclass
class LocalMusicItem(MusicItem):
path: str
@dataclasses.dataclass
class StreamMusicItem(MusicItem):
strem_url: str
| 14.368421
| 33
| 0.750916
| 28
| 273
| 7.285714
| 0.535714
| 0.294118
| 0.367647
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172161
| 273
| 18
| 34
| 15.166667
| 0.902655
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.083333
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
7f38798e50268269f34b0a766b76429e59341c4e
| 20
|
py
|
Python
|
synthtree/__main__.py
|
Gustavo6046/synth-tree
|
534c23d20f069538f2261c0b0fe677877cc447e5
|
[
"MIT"
] | null | null | null |
synthtree/__main__.py
|
Gustavo6046/synth-tree
|
534c23d20f069538f2261c0b0fe677877cc447e5
|
[
"MIT"
] | null | null | null |
synthtree/__main__.py
|
Gustavo6046/synth-tree
|
534c23d20f069538f2261c0b0fe677877cc447e5
|
[
"MIT"
] | 1
|
2022-01-12T08:17:04.000Z
|
2022-01-12T08:17:04.000Z
|
from synth import *
| 10
| 19
| 0.75
| 3
| 20
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 20
| 1
| 20
| 20
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7f3cf2488833c6e48d95f70bacf71b36ae03be1c
| 68
|
py
|
Python
|
PyraPose/backend/__init__.py
|
sThalham/DPRDS
|
f16b90a5dabf1232e0b9f2ba14afe1fc091bb9fd
|
[
"Apache-2.0"
] | 2
|
2020-12-03T03:02:45.000Z
|
2022-01-13T17:50:41.000Z
|
PyraPose/backend/__init__.py
|
sThalham/DPRDS
|
f16b90a5dabf1232e0b9f2ba14afe1fc091bb9fd
|
[
"Apache-2.0"
] | 2
|
2021-02-08T16:14:40.000Z
|
2021-03-25T09:04:09.000Z
|
PyraPose/backend/__init__.py
|
sThalham/DPRDS
|
f16b90a5dabf1232e0b9f2ba14afe1fc091bb9fd
|
[
"Apache-2.0"
] | null | null | null |
from .common import * # noqa: F401,F403
from .tf_backend import *
| 22.666667
| 41
| 0.705882
| 10
| 68
| 4.7
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109091
| 0.191176
| 68
| 2
| 42
| 34
| 0.745455
| 0.220588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7f77e1a7cef8ba693555d341aaee380442c845bc
| 102
|
py
|
Python
|
24-Dependencies/__init__.py
|
Chang-Liu-TAMU/FastAPI_Learning
|
bf8eac5ebbcdccee86b58d0c7732b982dbebc7c0
|
[
"MIT"
] | null | null | null |
24-Dependencies/__init__.py
|
Chang-Liu-TAMU/FastAPI_Learning
|
bf8eac5ebbcdccee86b58d0c7732b982dbebc7c0
|
[
"MIT"
] | null | null | null |
24-Dependencies/__init__.py
|
Chang-Liu-TAMU/FastAPI_Learning
|
bf8eac5ebbcdccee86b58d0c7732b982dbebc7c0
|
[
"MIT"
] | null | null | null |
# @Time: 2022/4/1 17:03
# @Author: chang liu
# @Email: chang_liu_tamu@gmail.com
# @File:__init__.py.py
| 25.5
| 34
| 0.696078
| 19
| 102
| 3.421053
| 0.842105
| 0.246154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0.117647
| 102
| 4
| 35
| 25.5
| 0.611111
| 0.921569
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7fae4933e19135d2e87e5531ef259c42c6bece34
| 183
|
py
|
Python
|
Numpy practice/Numpy4.py
|
Macorov/Numpy-Python-Practice
|
0aa296ed690dd0da8f19e7a456a8a665cec94aeb
|
[
"MIT"
] | null | null | null |
Numpy practice/Numpy4.py
|
Macorov/Numpy-Python-Practice
|
0aa296ed690dd0da8f19e7a456a8a665cec94aeb
|
[
"MIT"
] | null | null | null |
Numpy practice/Numpy4.py
|
Macorov/Numpy-Python-Practice
|
0aa296ed690dd0da8f19e7a456a8a665cec94aeb
|
[
"MIT"
] | null | null | null |
import numpy as np
s = np.array([[12,41,3,13,312,77],[1,42,913,865,5,21]])
print(s)
print(s[0,1:3])
print(s[:,1])
print(s[0,:])
print(s[s<12])
b = np.where(s>12,s,-1)
print(b)
| 20.333333
| 56
| 0.568306
| 45
| 183
| 2.311111
| 0.488889
| 0.288462
| 0.134615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2125
| 0.125683
| 183
| 9
| 57
| 20.333333
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.111111
| 0
| 0.111111
| 0.666667
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
7faeeca742af07c86711f0474b2b7863a9e23259
| 297
|
py
|
Python
|
snmpagent_unity/unity_impl/StorageProcessorCpuUtilization.py
|
factioninc/snmp-unity-agent
|
3525dc0fac60d1c784dcdd7c41693544bcbef843
|
[
"Apache-2.0"
] | 2
|
2019-03-01T11:14:59.000Z
|
2019-10-02T17:47:59.000Z
|
snmpagent_unity/unity_impl/StorageProcessorCpuUtilization.py
|
factioninc/snmp-unity-agent
|
3525dc0fac60d1c784dcdd7c41693544bcbef843
|
[
"Apache-2.0"
] | 2
|
2019-03-01T11:26:29.000Z
|
2019-10-11T18:56:54.000Z
|
snmpagent_unity/unity_impl/StorageProcessorCpuUtilization.py
|
factioninc/snmp-unity-agent
|
3525dc0fac60d1c784dcdd7c41693544bcbef843
|
[
"Apache-2.0"
] | 1
|
2019-10-03T21:09:17.000Z
|
2019-10-03T21:09:17.000Z
|
class StorageProcessorCpuUtilization(object):
def read_get(self, name, idx_name, unity_client):
return unity_client.get_sp_utilization(idx_name)
class StorageProcessorCpuUtilizationColumn(object):
def get_idx(self, name, idx, unity_client):
return unity_client.get_sps()
| 33
| 56
| 0.771044
| 36
| 297
| 6.055556
| 0.444444
| 0.201835
| 0.100917
| 0.201835
| 0.284404
| 0.284404
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 297
| 8
| 57
| 37.125
| 0.86166
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
f688ffd7ef75b02b6514b52e42a8e3a85d0bb515
| 253
|
py
|
Python
|
vhdmmio/vhdl/behavior/__init__.py
|
jvanstraten/vhdmmio
|
f166b07074a9159311a01af88497df91c19e09d1
|
[
"Apache-2.0"
] | 4
|
2019-07-01T14:41:38.000Z
|
2021-11-28T12:54:49.000Z
|
vhdmmio/vhdl/behavior/__init__.py
|
jvanstraten/vhdmmio
|
f166b07074a9159311a01af88497df91c19e09d1
|
[
"Apache-2.0"
] | 4
|
2019-08-23T15:05:24.000Z
|
2020-12-16T10:02:20.000Z
|
vhdmmio/vhdl/behavior/__init__.py
|
jvanstraten/vhdmmio
|
f166b07074a9159311a01af88497df91c19e09d1
|
[
"Apache-2.0"
] | 1
|
2021-07-16T13:41:21.000Z
|
2021-07-16T13:41:21.000Z
|
"""Submodule for parsed field behaviors."""
from .base import BehaviorCodeGen
from .primitive import PrimitiveBehaviorCodeGen
from .interrupt import InterruptBehaviorCodeGen
from .axi import AxiBehaviorCodeGen
from .custom import CustomBehaviorCodeGen
| 31.625
| 47
| 0.849802
| 25
| 253
| 8.6
| 0.68
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102767
| 253
| 7
| 48
| 36.142857
| 0.947137
| 0.146245
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f6cb6fa4f580e44408d179fc9881d7704fb8218f
| 3,187
|
py
|
Python
|
CoreScripting/src/au/gov/asd/tac/constellation/views/scripting/calculator/resources/obliterator.py
|
itachi46/constellation
|
36f1c51aa421095e9771f0d539aa0a6741d84b19
|
[
"Apache-2.0"
] | 1
|
2019-10-23T11:53:34.000Z
|
2019-10-23T11:53:34.000Z
|
CoreScripting/src/au/gov/asd/tac/constellation/views/scripting/calculator/resources/obliterator.py
|
formalhaut69/constellation
|
21c0a5bb7db598cbd7136d0803e5e2d4e9195188
|
[
"Apache-2.0"
] | null | null | null |
CoreScripting/src/au/gov/asd/tac/constellation/views/scripting/calculator/resources/obliterator.py
|
formalhaut69/constellation
|
21c0a5bb7db598cbd7136d0803e5e2d4e9195188
|
[
"Apache-2.0"
] | null | null | null |
# This special python singleton object is used to represent null values for attributes inside the attribute calculator.
# It is designed to be equal to the inbuilt singleton None, and behaves like the object False
# in conditional expressions (if) and boolean expressions (and or not).
# If this singleton object is the result of an attribute calculator evaluation, then the plugin
# will store the java representation of null (rather than this object) in the destination attribute.
class Obliterator(object):
the_obliterator = None
def __new__(cls):
if Obliterator.the_obliterator is None:
Obliterator.the_obliterator = super(Obliterator, cls).__new__(cls)
return Obliterator.the_obliterator
def __init__(self):
pass
def __getattr__(self, name):
return lambda : self
def __getattribute__(self, name):
return lambda : self
def __eq__(self, other):
if other is None or other is self:
return True
return False
def __lt__(self, other):
return self
def __le__(self, other):
return self
def __ne__(self, other):
return not self.__eq__(other)
def __gt__(self, other):
return self
def __ge__(self, other):
return self
def __setattr__(self, name, val):
pass
def __getitem__(self, key):
return self
def __setitem__(self, key, val):
pass
def __contains__(self, item):
return False
def __add__(self, other):
return self
def __sub__(self, other):
return self
def __mul__(self, other):
return self
def __truediv__(self, other):
return self
def __floordiv__(self, other):
return self
def __mod__(self, other):
return self
def __divmod__(self, other):
return self
def __pow__(self, other):
return self
def __lshift__(self, other):
return self
def __rshift__(self, other):
return self
def __and__(self, other):
return self
def __or__(self, other):
return self
def __xor__(self, other):
return self
def __radd__(self, other):
return self
def __rsub__(self, other):
return self
def __rmul__(self, other):
return self
def __rtruediv__(self, other):
return self
def __rfloordiv__(self, other):
return self
def __mod__(self, other):
return self
def __rdivmod__(self, other):
return self
def __rpow__(self, other):
return self
def __rlshift__(self, other):
return self
def __rrshift__(self, other):
return self
def __rand__(self, other):
return self
def __ror__(self, other):
return self
def __rxor__(self, other):
return self
def __int__(self):
return 0
def __float__(self):
return 0
def __len__(self):
return 0
def __nonzero__(self):
return False
def __hash__(self):
return None.__hash__()-1
def __repr__(self):
return ''
def __str__(self):
return ''
| 20.694805
| 119
| 0.619078
| 383
| 3,187
| 4.618799
| 0.281984
| 0.130582
| 0.26286
| 0.322216
| 0.40701
| 0.083663
| 0.053137
| 0.053137
| 0.053137
| 0.053137
| 0
| 0.001819
| 0.310009
| 3,187
| 154
| 120
| 20.694805
| 0.802638
| 0.148102
| 0
| 0.46
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.47
| false
| 0.03
| 0
| 0.42
| 0.94
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
f6e5f6513428905c101b6d71a2abf0bc7e65594d
| 756
|
py
|
Python
|
test_remote.py
|
mikkokotila/npv
|
4b38b0cc7b0573b886c28fcd63fc1d2d57a81c19
|
[
"MIT"
] | 6
|
2020-01-27T15:11:27.000Z
|
2022-03-02T22:55:59.000Z
|
test_remote.py
|
mikkokotila/npvpy
|
4b38b0cc7b0573b886c28fcd63fc1d2d57a81c19
|
[
"MIT"
] | 1
|
2019-08-19T14:32:51.000Z
|
2019-08-19T14:32:51.000Z
|
test_remote.py
|
mikkokotila/npv
|
4b38b0cc7b0573b886c28fcd63fc1d2d57a81c19
|
[
"MIT"
] | 3
|
2020-04-17T23:38:30.000Z
|
2022-02-10T00:21:04.000Z
|
from npv import NPV
model = NPV('params.txt', 2019, 8, 5)
model.annual_income
model.annual_stats
model.compute()
model.compute('ebitda')
model.compute('gross_profit')
model.monte_carlo(10, 'ebitda')
model.monthly_cashflow
model.monthly_income
model.monthly_stats
model.simulate_financials()
model.annual_income
model.annual_stats
model.compute()
model.compute('ebitda')
model.compute('gross_profit')
model.monte_carlo(10, 'ebitda')
model.monthly_cashflow
model.monthly_income
model.monthly_stats
model.simulate_financials()
model = NPV('params.txt',
start_year=2021,
start_month=1,
years=10,
cash_lag=8,
investment_months=[1, 12, 18],
investment_amounts=[100000, 500000, 1000000])
| 22.909091
| 57
| 0.723545
| 100
| 756
| 5.26
| 0.39
| 0.136882
| 0.053232
| 0.064639
| 0.720532
| 0.720532
| 0.720532
| 0.720532
| 0.720532
| 0.720532
| 0
| 0.066038
| 0.15873
| 756
| 32
| 58
| 23.625
| 0.761006
| 0
| 0
| 0.689655
| 0
| 0
| 0.089947
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.034483
| 0
| 0.034483
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f6f09bc820d94c4774e3d374c645471b7e9d24ba
| 391
|
py
|
Python
|
lark/auth/schemas.py
|
voidfiles/lark
|
e3f202d88b97f7b985a358fe28df7e52204f7846
|
[
"MIT"
] | 35
|
2015-01-03T06:50:33.000Z
|
2021-11-01T09:07:01.000Z
|
lark/auth/schemas.py
|
voidfiles/lark
|
e3f202d88b97f7b985a358fe28df7e52204f7846
|
[
"MIT"
] | 2
|
2016-12-27T04:43:59.000Z
|
2020-04-01T20:51:30.000Z
|
lark/auth/schemas.py
|
voidfiles/lark
|
e3f202d88b97f7b985a358fe28df7e52204f7846
|
[
"MIT"
] | 6
|
2015-02-04T01:53:44.000Z
|
2020-01-28T17:24:36.000Z
|
import colander
class ClientSchema(colander.MappingSchema):
name = colander.SchemaNode(colander.String())
description = colander.SchemaNode(colander.String())
default_scope = colander.SchemaNode(colander.String(), missing='')
redirect_uris = colander.SchemaNode(colander.Sequence(colander.String),
missing=['http://localhost:8000'])
| 39.1
| 75
| 0.685422
| 35
| 391
| 7.6
| 0.514286
| 0.270677
| 0.390977
| 0.360902
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012698
| 0.194373
| 391
| 9
| 76
| 43.444444
| 0.831746
| 0
| 0
| 0
| 0
| 0
| 0.053708
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.857143
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
10127845665c50a4b32be39d31ff3ec9ea474670
| 1,294
|
py
|
Python
|
ch2/as_html/css_selectors.py
|
rex-chien/ithome-scrapy
|
e7be299aab9d07abae367b56bfc4b54fce7b3899
|
[
"MIT"
] | 4
|
2021-03-27T18:04:02.000Z
|
2022-03-22T16:20:26.000Z
|
ch2/as_html/css_selectors.py
|
rex-chien/ithome-scrapy
|
e7be299aab9d07abae367b56bfc4b54fce7b3899
|
[
"MIT"
] | null | null | null |
ch2/as_html/css_selectors.py
|
rex-chien/ithome-scrapy
|
e7be299aab9d07abae367b56bfc4b54fce7b3899
|
[
"MIT"
] | 1
|
2021-12-24T02:03:57.000Z
|
2021-12-24T02:03:57.000Z
|
from bs4 import BeautifulSoup
html_doc = """
<html>
<head>
<title>爬蟲在手、資料我有</title>
</head>
<body>
<p class="title"><b>爬蟲在手、資料我有</b></p>
<p class="chapter">基礎知識
<a href="http://example.com/environment" class="page" id="link1">準備環境</a>、
<a href="http://example.com/csv" class="page" id="link2">CSV</a>、
<a href="http://example.com/json" class="page" id="link3">JSON</a>
</p>
<p class="chapter">...</p>
</body>
</html>
"""
soup = BeautifulSoup(html_doc, 'lxml')
# 找出 body 下的 a 標籤
print(soup.select('body a'))
# [<a href="http://example.com/environment" class="page" id="link1">準備環境</a>
# <a href="http://example.com/csv" class="page" id="link2">CSV</a>
# <a href="http://example.com/json" class="page" id="link3">JSON</a>]
# 找出 class 包含 page 的標籤
print(soup.select('.page'))
# [<a href="http://example.com/environment" class="page" id="link1">準備環境</a>
# <a href="http://example.com/csv" class="page" id="link2">CSV</a>
# <a href="http://example.com/json" class="page" id="link3">JSON</a>]
# 找出 id 是 link2 的標籤
print(soup.select('#link2'))
# [<a href="http://example.com/csv" class="page" id="link2">CSV</a>]
# 找出「第一個」class 包含 page 的標籤
print(soup.select_one('.page'))
# <a href="http://example.com/environment" class="page" id="link1">準備環境</a>
| 30.809524
| 82
| 0.621329
| 209
| 1,294
| 3.832536
| 0.200957
| 0.068664
| 0.123596
| 0.219725
| 0.717853
| 0.717853
| 0.716604
| 0.644195
| 0.644195
| 0.644195
| 0
| 0.012357
| 0.12442
| 1,294
| 41
| 83
| 31.560976
| 0.694616
| 0.49459
| 0
| 0
| 0
| 0.136364
| 0.692668
| 0.126365
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.045455
| 0
| 0.045455
| 0.181818
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
63e9569808a16bb20cfecdef8295a922bd868ed6
| 97
|
py
|
Python
|
data_structures/queue_/__init__.py
|
kirkirey/programming-for-linguists
|
d97c59738713fab725073e9c88c7321119a648fc
|
[
"Apache-2.0"
] | null | null | null |
data_structures/queue_/__init__.py
|
kirkirey/programming-for-linguists
|
d97c59738713fab725073e9c88c7321119a648fc
|
[
"Apache-2.0"
] | null | null | null |
data_structures/queue_/__init__.py
|
kirkirey/programming-for-linguists
|
d97c59738713fab725073e9c88c7321119a648fc
|
[
"Apache-2.0"
] | 4
|
2021-02-09T12:00:34.000Z
|
2021-05-21T18:59:38.000Z
|
"""
Programming for linguists
Queue module
"""
from data_structures.queue_.queue_ import Queue_
| 13.857143
| 48
| 0.793814
| 12
| 97
| 6.083333
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123711
| 97
| 6
| 49
| 16.166667
| 0.858824
| 0.402062
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1215265847c0a482aca9c83a76ef6a071858ada5
| 67
|
py
|
Python
|
src/opencmiss/extensions/zincbasicview/__init__.py
|
hsorby/neon.extension.zincbasicview
|
5ccbf30c55b8c1e0f626a2da6d8ae9cfc9fc3e32
|
[
"Apache-2.0"
] | null | null | null |
src/opencmiss/extensions/zincbasicview/__init__.py
|
hsorby/neon.extension.zincbasicview
|
5ccbf30c55b8c1e0f626a2da6d8ae9cfc9fc3e32
|
[
"Apache-2.0"
] | null | null | null |
src/opencmiss/extensions/zincbasicview/__init__.py
|
hsorby/neon.extension.zincbasicview
|
5ccbf30c55b8c1e0f626a2da6d8ae9cfc9fc3e32
|
[
"Apache-2.0"
] | null | null | null |
from opencmiss.extensions.zincbasicview.view import ZincBasicView
| 22.333333
| 65
| 0.880597
| 7
| 67
| 8.428571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074627
| 67
| 2
| 66
| 33.5
| 0.951613
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1227017607d78ac4f2cc79f6e6f0219870547c2e
| 231
|
py
|
Python
|
platsec_aws_scanner.py
|
jezd-axyl/platsec-aws-scanner
|
bc2b064c87ac2f77fab49c1e1eb3782d6de685b2
|
[
"Apache-2.0"
] | null | null | null |
platsec_aws_scanner.py
|
jezd-axyl/platsec-aws-scanner
|
bc2b064c87ac2f77fab49c1e1eb3782d6de685b2
|
[
"Apache-2.0"
] | 4
|
2021-05-06T12:36:46.000Z
|
2022-02-11T09:47:57.000Z
|
platsec_aws_scanner.py
|
jezd-axyl/platsec-aws-scanner
|
bc2b064c87ac2f77fab49c1e1eb3782d6de685b2
|
[
"Apache-2.0"
] | 2
|
2021-04-21T04:48:47.000Z
|
2022-01-14T04:29:17.000Z
|
#!/usr/bin/env python
from src.aws_scanner_argument_parser import AwsScannerArgumentParser
from src.aws_scanner_main import AwsScannerMain
if __name__ == "__main__":
AwsScannerMain(AwsScannerArgumentParser().parse_cli_args())
| 33
| 68
| 0.831169
| 27
| 231
| 6.555556
| 0.703704
| 0.079096
| 0.112994
| 0.19209
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08658
| 231
| 6
| 69
| 38.5
| 0.838863
| 0.08658
| 0
| 0
| 0
| 0
| 0.038095
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
123106146048410278506f4a55dfadc21345ec07
| 105
|
py
|
Python
|
enthought/developer/tools/profiler.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/developer/tools/profiler.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/developer/tools/profiler.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
# proxy module
from __future__ import absolute_import
from etsdevtools.developer.tools.profiler import *
| 26.25
| 50
| 0.847619
| 13
| 105
| 6.461538
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104762
| 105
| 3
| 51
| 35
| 0.893617
| 0.114286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1235ebae6fa0c7e1c5852b111a871a3402591b8a
| 209
|
py
|
Python
|
openwisp_utils/tasks.py
|
Aryamanz29/openwisp-utils
|
c5558fc14a22316e49e9144d39216de348e19b05
|
[
"BSD-3-Clause"
] | null | null | null |
openwisp_utils/tasks.py
|
Aryamanz29/openwisp-utils
|
c5558fc14a22316e49e9144d39216de348e19b05
|
[
"BSD-3-Clause"
] | 1
|
2022-01-25T17:46:52.000Z
|
2022-01-25T17:46:52.000Z
|
openwisp_utils/tasks.py
|
Aryamanz29/openwisp-utils
|
c5558fc14a22316e49e9144d39216de348e19b05
|
[
"BSD-3-Clause"
] | null | null | null |
from celery import Task
from . import settings as app_settings
class OpenwispCeleryTask(Task):
soft_time_limit = app_settings.CELERY_SOFT_TIME_LIMIT
time_limit = app_settings.CELERY_HARD_TIME_LIMIT
| 23.222222
| 57
| 0.822967
| 30
| 209
| 5.333333
| 0.433333
| 0.225
| 0.1625
| 0.25
| 0.325
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138756
| 209
| 8
| 58
| 26.125
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1247cb04f6fbbb801210b44bb5c38ab0f2cedb22
| 364
|
py
|
Python
|
tests/test_rockets.py
|
yzy830d/HiKayluml
|
b7f3266063f72834ab285695bf84ecc114812ef6
|
[
"MIT"
] | 15
|
2018-09-10T19:10:56.000Z
|
2021-11-19T13:11:54.000Z
|
tests/test_rockets.py
|
yzy830d/HiKayluml
|
b7f3266063f72834ab285695bf84ecc114812ef6
|
[
"MIT"
] | 4
|
2018-09-14T09:14:10.000Z
|
2021-11-20T00:00:17.000Z
|
tests/test_rockets.py
|
yzy830d/HiKayluml
|
b7f3266063f72834ab285695bf84ecc114812ef6
|
[
"MIT"
] | 9
|
2018-10-02T12:56:03.000Z
|
2021-05-04T20:22:35.000Z
|
from spacex_py import rockets
def get_rockets():
got_rockets, _ = rockets.get_rockets()
return got_rockets
def get_rockets_by_method():
got_rockets, _ = rockets.get_rockets("bfr")
return got_rockets
def test_get_rockets():
assert type(get_rockets()) is list
def test_get_rockets_by_method():
assert type(get_rockets_by_method()) is dict
| 24.266667
| 48
| 0.75
| 54
| 364
| 4.62963
| 0.333333
| 0.32
| 0.144
| 0.216
| 0.216
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162088
| 364
| 15
| 48
| 24.266667
| 0.819672
| 0
| 0
| 0.181818
| 0
| 0
| 0.008219
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 1
| 0.363636
| true
| 0
| 0.090909
| 0
| 0.636364
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
d601836b6e44a059a4c10d7e2aa8d0ebb1b4f3f3
| 33
|
py
|
Python
|
custom_components/sampler/__init__.py
|
t0rx/hass-custom-components
|
79a1e8cfa6b401a3d65d469f378011385981762e
|
[
"MIT"
] | null | null | null |
custom_components/sampler/__init__.py
|
t0rx/hass-custom-components
|
79a1e8cfa6b401a3d65d469f378011385981762e
|
[
"MIT"
] | null | null | null |
custom_components/sampler/__init__.py
|
t0rx/hass-custom-components
|
79a1e8cfa6b401a3d65d469f378011385981762e
|
[
"MIT"
] | null | null | null |
"""Sampler sensor integration."""
| 33
| 33
| 0.727273
| 3
| 33
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 33
| 1
| 33
| 33
| 0.774194
| 0.818182
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d62210c75465c3e835868c34a99f7d305901089b
| 121
|
py
|
Python
|
tests/__init__.py
|
jamezpolley/begins
|
7dfac6f7c9f5cb04ee1f44993709895a4ea60d31
|
[
"Apache-2.0"
] | 120
|
2015-03-11T19:36:57.000Z
|
2021-03-28T05:02:34.000Z
|
tests/__init__.py
|
jamezpolley/begins
|
7dfac6f7c9f5cb04ee1f44993709895a4ea60d31
|
[
"Apache-2.0"
] | 22
|
2015-02-24T22:41:18.000Z
|
2020-06-10T06:27:49.000Z
|
tests/__init__.py
|
jamezpolley/begins
|
7dfac6f7c9f5cb04ee1f44993709895a4ea60d31
|
[
"Apache-2.0"
] | 23
|
2015-05-22T12:56:24.000Z
|
2020-05-29T01:34:03.000Z
|
from __future__ import absolute_import, division, print_function
import logging
import sys
logging.raiseExceptions = 0
| 17.285714
| 64
| 0.842975
| 15
| 121
| 6.4
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009434
| 0.123967
| 121
| 6
| 65
| 20.166667
| 0.896226
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c3b840ce0af3ee418ba1f9b35e1bea3521b18f3d
| 158
|
py
|
Python
|
estate_app/route.py
|
bharathjinka09/estate_app
|
8aa8d8ff5aa3486019d3cf75212a0dcd9a26575d
|
[
"MIT"
] | 3
|
2021-06-20T08:32:34.000Z
|
2022-02-23T17:20:16.000Z
|
estate_app/route.py
|
bharathjinka09/estate_app
|
8aa8d8ff5aa3486019d3cf75212a0dcd9a26575d
|
[
"MIT"
] | null | null | null |
estate_app/route.py
|
bharathjinka09/estate_app
|
8aa8d8ff5aa3486019d3cf75212a0dcd9a26575d
|
[
"MIT"
] | 4
|
2021-06-29T01:52:18.000Z
|
2021-12-17T19:43:07.000Z
|
routes = [
{'from_route':'/property/detail/<docname>','to_route':'property/detail'},
# {'from_route':'/agent/detail/<docname>','to_route':'agent/detail'},
]
| 39.5
| 74
| 0.670886
| 19
| 158
| 5.368421
| 0.421053
| 0.176471
| 0.372549
| 0.392157
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050633
| 158
| 4
| 75
| 39.5
| 0.68
| 0.424051
| 0
| 0
| 0
| 0
| 0.655556
| 0.288889
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c3f74c4e78a376b04f14b16e684dc7fe14513dfe
| 93
|
py
|
Python
|
pymatgen/analysis/defects/__init__.py
|
NadezhdaBzhilyanskaya/pymatgen
|
fae11a8142d457a649fa84ff9781eb2b39334bdc
|
[
"MIT"
] | 1
|
2015-05-18T14:31:20.000Z
|
2015-05-18T14:31:20.000Z
|
pymatgen/analysis/defects/__init__.py
|
NadezhdaBzhilyanskaya/pymatgen
|
fae11a8142d457a649fa84ff9781eb2b39334bdc
|
[
"MIT"
] | null | null | null |
pymatgen/analysis/defects/__init__.py
|
NadezhdaBzhilyanskaya/pymatgen
|
fae11a8142d457a649fa84ff9781eb2b39334bdc
|
[
"MIT"
] | null | null | null |
"""
The defects package implements defect generation tools
"""
from .point_defects import *
| 15.5
| 54
| 0.763441
| 11
| 93
| 6.363636
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150538
| 93
| 5
| 55
| 18.6
| 0.886076
| 0.580645
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
61792adcfc29115cf462dbd37a5d2d1b8eca656f
| 544
|
py
|
Python
|
tests/test_symbol.py
|
yehonatanz/konst
|
4fa5539960a0219817c47e254be8fbc20620d2f8
|
[
"MIT"
] | null | null | null |
tests/test_symbol.py
|
yehonatanz/konst
|
4fa5539960a0219817c47e254be8fbc20620d2f8
|
[
"MIT"
] | null | null | null |
tests/test_symbol.py
|
yehonatanz/konst
|
4fa5539960a0219817c47e254be8fbc20620d2f8
|
[
"MIT"
] | null | null | null |
import pytest
def test_symbol():
from konst.symbol import RED
assert RED.name == 'RED'
def test_equal_symbols_are_identical():
from konst.symbol import GREEN
g1 = GREEN
from konst.symbol import GREEN
g2 = GREEN
assert g1 is g2
def test_symbol_is_immutable():
from konst.symbol import BLUE
with pytest.raises(TypeError):
BLUE.name = 3
with pytest.raises(TypeError):
del BLUE.name
def test_symbol_repr():
from konst.symbol import YELLOW
assert repr(YELLOW) == 'YELLOW'
| 16.484848
| 39
| 0.678309
| 75
| 544
| 4.786667
| 0.36
| 0.125348
| 0.208914
| 0.292479
| 0.144847
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012195
| 0.246324
| 544
| 32
| 40
| 17
| 0.863415
| 0
| 0
| 0.210526
| 0
| 0
| 0.016544
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 1
| 0.210526
| false
| 0
| 0.315789
| 0
| 0.526316
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
61b0548512fb6722a8e1270d41301a2d49b0672c
| 3,220
|
py
|
Python
|
ampharos/tables.py
|
bijij/Ampharos
|
3ebf2217d6916953434d872e140cd8478874bc7b
|
[
"MIT"
] | null | null | null |
ampharos/tables.py
|
bijij/Ampharos
|
3ebf2217d6916953434d872e140cd8478874bc7b
|
[
"MIT"
] | null | null | null |
ampharos/tables.py
|
bijij/Ampharos
|
3ebf2217d6916953434d872e140cd8478874bc7b
|
[
"MIT"
] | 1
|
2022-01-05T05:51:59.000Z
|
2022-01-05T05:51:59.000Z
|
from typing import List, Type
from donphan import Table, SQLType, Column
class Abilities(Table, _name="abilities", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True)
name: Column[SQLType.Text]
description: Column[SQLType.Text]
introduced: Column[SQLType.Integer]
class Items(Table, _name="items", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True)
name: Column[SQLType.Text]
description: Column[SQLType.Text]
class Types(Table, _name="types", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True)
name: Column[SQLType.Text]
class Moves(Table, _name="moves", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True)
type: Column[SQLType.Text] = Column(references=Types.term)
name: Column[SQLType.Text]
description: Column[SQLType.Text]
pp: Column[SQLType.SmallInt]
power: Column[SQLType.SmallInt]
accuracy: Column[SQLType.SmallInt]
category: Column[SQLType.SmallInt]
class Pokemon(Table, _name="pokemon", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True)
dex_no: Column[SQLType.SmallInt]
classification: Column[SQLType.Text]
class PokemonNames(Table, _name="pokemonnames", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True, references=Pokemon.term)
english: Column[SQLType.Text]
japanese: Column[SQLType.Text]
kana: Column[SQLType.Text]
class PokemonEvolutions(Table, _name="pokemonevolutions", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True, references=Pokemon.term)
evolution: Column[SQLType.Text] = Column(primary_key=True, references=Pokemon.term)
class PokemonDexEntries(Table, _name="pokemondexentries", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True, references=Pokemon.term)
sun: Column[SQLType.Text]
moon: Column[SQLType.Text]
class PokemonTypes(Table, _name="pokemontypes", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True, references=Pokemon.term)
first: Column[SQLType.Text] = Column(references=Types.term)
second: Column[SQLType.Text] = Column(references=Types.term)
class PokemonAbilities(Table, _name="pokemonabilities", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True, references=Pokemon.term)
first: Column[SQLType.Text] = Column(references=Abilities.term)
second: Column[SQLType.Text] = Column(references=Abilities.term)
hidden: Column[SQLType.Text] = Column(references=Abilities.term)
class PokemonBaseStats(Table, _name="pokemonbasestats", schema="ampharos"):
term: Column[SQLType.Text] = Column(primary_key=True, references=Pokemon.term)
hp: Column[SQLType.SmallInt]
attack: Column[SQLType.SmallInt]
defense: Column[SQLType.SmallInt]
special_attack: Column[SQLType.SmallInt]
special_defense: Column[SQLType.SmallInt]
speed: Column[SQLType.SmallInt]
ALL_TABLES: List[Type[Table]] = [
Abilities,
Items,
Types,
Moves,
Pokemon,
PokemonEvolutions,
PokemonDexEntries,
PokemonNames,
PokemonTypes,
PokemonAbilities,
PokemonBaseStats,
]
| 33.894737
| 87
| 0.734472
| 372
| 3,220
| 6.284946
| 0.153226
| 0.239093
| 0.225406
| 0.177074
| 0.531651
| 0.531651
| 0.531651
| 0.441831
| 0.420873
| 0.420873
| 0
| 0
| 0.136957
| 3,220
| 94
| 88
| 34.255319
| 0.84131
| 0
| 0
| 0.26087
| 0
| 0
| 0.064907
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.028986
| 0
| 0.811594
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
4efb264d134e2bb6f62ac3ebc67f34abd4ed84d0
| 413
|
py
|
Python
|
plot/test.py
|
MCCCSunny/vnpy-edited
|
c9ef56d4b809bac1f083c213ca37f74a1f80b65e
|
[
"MIT"
] | null | null | null |
plot/test.py
|
MCCCSunny/vnpy-edited
|
c9ef56d4b809bac1f083c213ca37f74a1f80b65e
|
[
"MIT"
] | null | null | null |
plot/test.py
|
MCCCSunny/vnpy-edited
|
c9ef56d4b809bac1f083c213ca37f74a1f80b65e
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 22 10:20:35 2017
@author: WCP
"""
import sys
sys.path.append('C:\\Users\\WCP\\Desktop\\vnpy1.7.2_SC\\vnpy-master\\examples\\VnTrader\\temp')
sys.path.append('C:\\Users\\WCP\\Desktop\\vnpy1.7.2_SC\\vnpy-master')
import vnpy.trader.vtObject
import shelve
f=shelve.open('C:\\Users\\WCP\\Desktop\\vnpy1.7.2_SC\\vnpy-master\\examples\\VnTrader\\temp\\ContractData.vt')
| 29.5
| 110
| 0.702179
| 69
| 413
| 4.15942
| 0.536232
| 0.062718
| 0.094077
| 0.167247
| 0.595819
| 0.595819
| 0.595819
| 0.595819
| 0.595819
| 0.595819
| 0
| 0.056995
| 0.065375
| 413
| 13
| 111
| 31.769231
| 0.686529
| 0.174334
| 0
| 0
| 0
| 0.333333
| 0.657658
| 0.657658
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f671f64e28695710459ff6160f94138b903287c2
| 967
|
py
|
Python
|
utility/graph.py
|
ignaziopedone/qkd-sim
|
7a3f53a8855badd4291f14845485b34511a5d20e
|
[
"Apache-2.0"
] | null | null | null |
utility/graph.py
|
ignaziopedone/qkd-sim
|
7a3f53a8855badd4291f14845485b34511a5d20e
|
[
"Apache-2.0"
] | null | null | null |
utility/graph.py
|
ignaziopedone/qkd-sim
|
7a3f53a8855badd4291f14845485b34511a5d20e
|
[
"Apache-2.0"
] | null | null | null |
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as st
# 128-bit keys
x = [27,27,27,27,27,27,27,27,27,27,27,27,34,34,34,18,18,18,18,18,18,18,18,18,32,32,32,32,32,32,32,32,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,30,30,30,30,30,30,30,30,30,30,30,41,16,16,16,16,16,20,20,20,20,20,20,20,20,20,39,37,37,37,37,13,11,11,9]
# 512-bit keys
#x = [22,22,22,22,22,22,22,22,22,28,28,28,28,26,26,26,26,26,23,23,23,23,23,23,23,23,25,25,25,25,25,19,19,19,30,30,30,30,28,28,28,28,28,28,24,24,24,24,24,24,24,24,24,18,18,22,22,22,22,22,21,21,21,29,29,29,29,25,25,25,25,25,25,25,25,25,25,23,23,23,23,23,23,23,26,26,26,27,27,27,20,20,20,16,34,21,21,16,33,18]
l = plt.hist(x, density=True, bins=10, label="QBER")
mn, mx = plt.xlim()
plt.xlim(mn, mx)
kde_xs = np.linspace(mn, mx, 301)
kde = st.gaussian_kde(x)
plt.plot(kde_xs, kde.pdf(kde_xs))
plt.ylabel('Probabilità')
plt.xlabel('QBER (%)')
plt.show()
| 42.043478
| 306
| 0.668046
| 268
| 967
| 2.395522
| 0.223881
| 0.180685
| 0.242991
| 0.286604
| 0.439252
| 0.404984
| 0.404984
| 0.358255
| 0.246106
| 0.246106
| 0
| 0.450055
| 0.057911
| 967
| 22
| 307
| 43.954545
| 0.254665
| 0.341262
| 0
| 0
| 0
| 0
| 0.03645
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.230769
| 0
| 0.230769
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9cdd679fa01b4b021cc5d8d386dfb4bfdb414db9
| 161
|
py
|
Python
|
integration-tests/tests/conftest.py
|
JamesHinshelwood/openapi-python-client
|
08bc2acf91d50d4fcdd7f0e50a8b0d3f00a187d9
|
[
"MIT"
] | 1
|
2022-02-17T11:45:13.000Z
|
2022-02-17T11:45:13.000Z
|
integration-tests/tests/conftest.py
|
guioliveirabh/openapi-python-client
|
d8d9cecffe41c5dc1c43bc667598b90f0d9253ca
|
[
"MIT"
] | null | null | null |
integration-tests/tests/conftest.py
|
guioliveirabh/openapi-python-client
|
d8d9cecffe41c5dc1c43bc667598b90f0d9253ca
|
[
"MIT"
] | null | null | null |
import pytest
from integration_tests.client import Client
@pytest.fixture(scope="session")
def client() -> Client:
return Client("http://localhost:3000")
| 17.888889
| 43
| 0.745342
| 20
| 161
| 5.95
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028369
| 0.124224
| 161
| 8
| 44
| 20.125
| 0.815603
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 0.2
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
9ced5b379c49f757677859c4ee8c07e8c06a821b
| 151
|
py
|
Python
|
edivorce/apps/core/views/styleguide.py
|
gerritvdm/eDivorce
|
e3c0a4037a7141769250b96df6cc4eb4ea5ef3af
|
[
"Apache-2.0"
] | 6
|
2017-03-24T18:20:33.000Z
|
2021-01-29T03:25:07.000Z
|
edivorce/apps/core/views/styleguide.py
|
gerritvdm/eDivorce
|
e3c0a4037a7141769250b96df6cc4eb4ea5ef3af
|
[
"Apache-2.0"
] | 13
|
2018-10-12T17:20:37.000Z
|
2021-11-05T23:13:21.000Z
|
edivorce/apps/core/views/styleguide.py
|
gerritvdm/eDivorce
|
e3c0a4037a7141769250b96df6cc4eb4ea5ef3af
|
[
"Apache-2.0"
] | 11
|
2017-03-15T12:36:39.000Z
|
2021-03-05T14:35:59.000Z
|
from django.shortcuts import render
def guide(request):
"""
Visual design styles
"""
return render(request, 'styleguide/guide.html')
| 16.777778
| 51
| 0.675497
| 17
| 151
| 6
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.211921
| 151
| 8
| 52
| 18.875
| 0.857143
| 0.13245
| 0
| 0
| 0
| 0
| 0.182609
| 0.182609
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
142bf0e57e5f561beeb3fc86925310f33687342a
| 114
|
py
|
Python
|
DSA/bit_magic/shift_operator.py
|
RohanMiraje/DSAwithPython
|
ea4884afcac9d6cc2817a93e918c829dd10cef5d
|
[
"MIT"
] | 2
|
2020-02-12T03:00:03.000Z
|
2020-07-06T17:27:03.000Z
|
DSA/bit_magic/shift_operator.py
|
RohanMiraje/DSAwithPython
|
ea4884afcac9d6cc2817a93e918c829dd10cef5d
|
[
"MIT"
] | null | null | null |
DSA/bit_magic/shift_operator.py
|
RohanMiraje/DSAwithPython
|
ea4884afcac9d6cc2817a93e918c829dd10cef5d
|
[
"MIT"
] | null | null | null |
n = 10
r_shift = n >> 1
print(r_shift)
l_shift = n << 1
print(l_shift)
k = 3
if 7 & (1 << k-1):
print("set")
| 11.4
| 18
| 0.535088
| 25
| 114
| 2.28
| 0.48
| 0.315789
| 0.245614
| 0.421053
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 0.263158
| 114
| 9
| 19
| 12.666667
| 0.583333
| 0
| 0
| 0
| 0
| 0
| 0.026316
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.375
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1431e96f44f997c62fbd95d7d8d6d38b6d44dcd9
| 25
|
py
|
Python
|
ExpertPythonProgramming/SecondEdition/01/future/sub/foo.py
|
t2y/python-study
|
52a132ea600d4696164e540d8a8f8f5fc58e097a
|
[
"Apache-2.0"
] | 18
|
2016-08-15T00:24:44.000Z
|
2020-11-30T15:11:52.000Z
|
ExpertPythonProgramming/SecondEdition/01/future/sub/foo.py
|
t2y/python-study
|
52a132ea600d4696164e540d8a8f8f5fc58e097a
|
[
"Apache-2.0"
] | null | null | null |
ExpertPythonProgramming/SecondEdition/01/future/sub/foo.py
|
t2y/python-study
|
52a132ea600d4696164e540d8a8f8f5fc58e097a
|
[
"Apache-2.0"
] | 6
|
2016-09-28T10:47:03.000Z
|
2020-10-14T10:20:06.000Z
|
print('I am module foo')
| 12.5
| 24
| 0.68
| 5
| 25
| 3.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 25
| 1
| 25
| 25
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.