hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b4148b82caffcb3d401203b514031ef55ddaf4b5 | 1,279 | py | Python | CodigoSOLID.py | JhonGalarza/SOLID | 5ee45f136a24cb2300837c8ed89accdc2f299c83 | [
"MIT"
] | null | null | null | CodigoSOLID.py | JhonGalarza/SOLID | 5ee45f136a24cb2300837c8ed89accdc2f299c83 | [
"MIT"
] | null | null | null | CodigoSOLID.py | JhonGalarza/SOLID | 5ee45f136a24cb2300837c8ed89accdc2f299c83 | [
"MIT"
] | null | null | null | #DATOS DE ENTRADA
ANIMAL= int(input("¿De cual animal quiere conocer la caracteristicas? 1.Leon 2.Ballena 3.Tucan? "))
class Animal:
def __init__(self, ANIMAL):
self.ANIMAL = ANIMAL
def acciones_comun():
comun = "Comer"
return comun
def sentido_vista():
vista = ... | 24.596154 | 120 | 0.620797 | 848 | 0.6625 | 0 | 0 | 0 | 0 | 0 | 0 | 343 | 0.267969 |
b414e74ae421f14965c6e966091b96bde22167db | 8,249 | py | Python | orca/topology/infra/k8s/__init__.py | filwie/orca | 84cfd53d309d85f7a7fb8649ba4abc8c2df9feac | [
"Apache-2.0"
] | null | null | null | orca/topology/infra/k8s/__init__.py | filwie/orca | 84cfd53d309d85f7a7fb8649ba4abc8c2df9feac | [
"Apache-2.0"
] | null | null | null | orca/topology/infra/k8s/__init__.py | filwie/orca | 84cfd53d309d85f7a7fb8649ba4abc8c2df9feac | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 OpenRCA Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 29.566308 | 74 | 0.562856 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 566 | 0.068614 |
b415b852eb1504fe65a58d7db038c31b5386abda | 2,616 | py | Python | thelma/repositories/rdb/view.py | fogathmann/TheLMA | ac330a0005da4fea2f1387da9ff9938611ad1481 | [
"MIT"
] | 1 | 2020-07-12T22:47:58.000Z | 2020-07-12T22:47:58.000Z | thelma/repositories/rdb/view.py | papagr/TheLMA | d2dc7a478ee5d24ccf3cc680888e712d482321d0 | [
"MIT"
] | null | null | null | thelma/repositories/rdb/view.py | papagr/TheLMA | d2dc7a478ee5d24ccf3cc680888e712d482321d0 | [
"MIT"
] | 1 | 2020-07-12T22:40:36.000Z | 2020-07-12T22:40:36.000Z | """
This file is part of the TheLMA (THe Laboratory Management Application) project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Utilities to create/drop views.
Based on a recipe published in:
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/Views
"""
from sqlalchemy.sql import table... | 33.974026 | 90 | 0.69419 | 263 | 0.100535 | 0 | 0 | 1,404 | 0.536697 | 0 | 0 | 976 | 0.373089 |
b415cd56b8b968d2043025ce5a7780e981f5488b | 960 | py | Python | msblog/models.py | designermanjeets/mscreativepixel | 8fefa48296c97fc541bc6d4f9ad8fa7048d0e377 | [
"Apache-2.0"
] | null | null | null | msblog/models.py | designermanjeets/mscreativepixel | 8fefa48296c97fc541bc6d4f9ad8fa7048d0e377 | [
"Apache-2.0"
] | null | null | null | msblog/models.py | designermanjeets/mscreativepixel | 8fefa48296c97fc541bc6d4f9ad8fa7048d0e377 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from datetime import datetime
import string, random
import uuid
# Create your models here.
class HeaderNavs(models.Model):
title = models.CharField(max_length = 50)
url = models.CharField(max_length = 50)
def __str__(self):
return self.title
class Meta:
... | 28.235294 | 114 | 0.660417 | 832 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.09375 |
b415f8911ff14da18af621c103440493a6703472 | 1,281 | py | Python | Practical/Easy/HSV color wheel/colorwheel.py | saintwithataint/Pro-g-rammingChallenges4 | 3f720a375b89ee289237819c2dc89226634b7a5b | [
"Apache-2.0"
] | 1 | 2022-03-16T16:47:22.000Z | 2022-03-16T16:47:22.000Z | Practical/Easy/HSV color wheel/colorwheel.py | saintwithataint/Pro-g-rammingChallenges4 | 3f720a375b89ee289237819c2dc89226634b7a5b | [
"Apache-2.0"
] | null | null | null | Practical/Easy/HSV color wheel/colorwheel.py | saintwithataint/Pro-g-rammingChallenges4 | 3f720a375b89ee289237819c2dc89226634b7a5b | [
"Apache-2.0"
] | 2 | 2022-02-02T18:02:03.000Z | 2022-03-16T16:47:34.000Z | import colour
import matplotlib.pyplot as plt
import numpy as np
COLOUR_STYLE = colour.plotting.colour_style()
COLOUR_STYLE.update(
{
"figure.figsize": (11, 11),
"legend.framealpha": colour.plotting.COLOUR_STYLE_CONSTANTS.opacity.low,
}
)
plt.style.use(COLOUR_STYLE)
plt.style.use("dark_backgrou... | 26.6875 | 80 | 0.640125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.081187 |
b4162ac39dacfccdd55b041dd156a4ebc43907ba | 40,090 | py | Python | kojen/smgen.py | kohjaen/kojen | e61855e48617e691d1fa0ddac4fdabac6b6a1eff | [
"MIT"
] | 3 | 2020-07-12T08:17:42.000Z | 2022-02-11T15:44:49.000Z | kojen/smgen.py | kohjaen/kojen | e61855e48617e691d1fa0ddac4fdabac6b6a1eff | [
"MIT"
] | null | null | null | kojen/smgen.py | kohjaen/kojen | e61855e48617e691d1fa0ddac4fdabac6b6a1eff | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'eugene'
'''
MIT License
Copyright (c) 2015 Eugene Grobbelaar (email : koh.jaen@yahoo.de)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to d... | 50.301129 | 200 | 0.60464 | 33,363 | 0.832203 | 0 | 0 | 0 | 0 | 0 | 0 | 10,961 | 0.27341 |
b419bda7c8455defc3ecb61092c5f3412e12801a | 1,744 | py | Python | roku/discovery.py | metagrapher/python-roku | 0cd209ec94531e7c4c29ca7f6a41a6199374c206 | [
"BSD-3-Clause"
] | null | null | null | roku/discovery.py | metagrapher/python-roku | 0cd209ec94531e7c4c29ca7f6a41a6199374c206 | [
"BSD-3-Clause"
] | null | null | null | roku/discovery.py | metagrapher/python-roku | 0cd209ec94531e7c4c29ca7f6a41a6199374c206 | [
"BSD-3-Clause"
] | null | null | null | """
Code adapted from Dan Krause.
https://gist.github.com/dankrause/6000248
http://github.com/dankrause
"""
import socket
from http.client import HTTPResponse
from io import BytesIO
ST_DIAL = 'urn:dial-multiscreen-org:service:dial:1'
ST_ECP = 'roku:ecp'
class _FakeSocket(BytesIO):
def makefile(self, *args, **kw)... | 26.830769 | 79 | 0.598624 | 465 | 0.266628 | 0 | 0 | 0 | 0 | 0 | 0 | 337 | 0.193234 |
b41a1df236c0501272e47ba309bb8f6eaa3a041a | 4,113 | py | Python | Approxilyzer/gem5/scripts/relyzer/run_gem5_gl.py | cornell-zhang/GLAIVE | 8e29ac621a95a25c19ccfeb5071a9d3595093ef7 | [
"BSD-3-Clause"
] | 10 | 2020-11-21T04:13:33.000Z | 2022-01-03T23:08:09.000Z | Approxilyzer/gem5/scripts/relyzer/run_gem5_gl.py | cornell-zhang/GLAIVE | 8e29ac621a95a25c19ccfeb5071a9d3595093ef7 | [
"BSD-3-Clause"
] | null | null | null | Approxilyzer/gem5/scripts/relyzer/run_gem5_gl.py | cornell-zhang/GLAIVE | 8e29ac621a95a25c19ccfeb5071a9d3595093ef7 | [
"BSD-3-Clause"
] | null | null | null | import os, sys
from argparse import ArgumentParser
from datetime import datetime as dt
from pprint import pprint as pp
import shutil, glob
#from pyfiglet import figlet_format, Figlet
import datetime
'''
python run_gem5_gl.py -a radix -l inst
python run_gem5_gl.py -a radix -l bit
'''
def app(args):
if not a... | 32.904 | 90 | 0.556042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,335 | 0.324581 |
b41ac0fb4f1e55fdca39a67f5c6756119ab70fed | 68 | py | Python | onnxsim/__init__.py | Wheest/onnx-simplifier | 70e3b52aadbc73fe01029dc7ba0d4965d8fc1a8c | [
"Apache-2.0"
] | 1,977 | 2019-04-01T10:48:18.000Z | 2022-03-31T07:43:03.000Z | onnxsim/__init__.py | fedral/onnx-simplifier | 70e3b52aadbc73fe01029dc7ba0d4965d8fc1a8c | [
"Apache-2.0"
] | 167 | 2019-05-03T08:21:15.000Z | 2022-03-31T10:21:03.000Z | onnxsim/__init__.py | fedral/onnx-simplifier | 70e3b52aadbc73fe01029dc7ba0d4965d8fc1a8c | [
"Apache-2.0"
] | 251 | 2019-04-01T12:21:42.000Z | 2022-03-30T18:14:39.000Z | from onnxsim.onnx_simplifier import simplify
__version__ = '0.0.0'
| 17 | 44 | 0.794118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.102941 |
b41c9702fa909cdc15c31981b7aeb56a1df4c9bb | 534 | py | Python | src/commands/__init__.py | lysol/lvlss | ca068de516159be732d2cb8c4752dee4f4ef2e09 | [
"MIT"
] | null | null | null | src/commands/__init__.py | lysol/lvlss | ca068de516159be732d2cb8c4752dee4f4ef2e09 | [
"MIT"
] | null | null | null | src/commands/__init__.py | lysol/lvlss | ca068de516159be732d2cb8c4752dee4f4ef2e09 | [
"MIT"
] | null | null | null | from quit import Quit
from set_name import SetName
from who import Who
from say import Say
from look import Look
from go import Go
from take import Take
from inventory import Inventory
from drop import Drop
from make import Make
from landfill import Landfill
from item_info import ItemInfo
from script import... | 28.105263 | 50 | 0.773408 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b41db3bb0788a43b8d82ec7b22eb82e644666c44 | 2,141 | py | Python | Softmax.py | tranbamanh229289/Machine-and-Data-mining- | b43a3815b74365e6e5b05b49bb92f3db4606ffca | [
"Apache-2.0"
] | null | null | null | Softmax.py | tranbamanh229289/Machine-and-Data-mining- | b43a3815b74365e6e5b05b49bb92f3db4606ffca | [
"Apache-2.0"
] | null | null | null | Softmax.py | tranbamanh229289/Machine-and-Data-mining- | b43a3815b74365e6e5b05b49bb92f3db4606ffca | [
"Apache-2.0"
] | null | null | null | import Common
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
RATIO = 0.8
EPOCHS = 500
LEARN_RATE = 0.01
INDENTIFICATION_RATE = 0.6
# Read training data
X_train, Y_train, X_test, Y_test,scale_train,scale_test = Common.process(RATIO)
def preprocessing (X_train,Y_train ,X_test ,Y_test):
X_tra... | 29.328767 | 80 | 0.652032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.03503 |
b41e6039b9544ca2bf93ee054b91393cabc444ec | 1,343 | py | Python | Wallpaper change.py | Arbazkhan4712/Wallpaper-Changer-using-Python | a221443bc7e7b5410f06653fa741b9d7af0fe10f | [
"MIT"
] | 4 | 2020-04-17T06:39:23.000Z | 2021-12-25T11:05:16.000Z | Wallpaper change.py | Arbazkhan4712/Wallpaper-Changer-using-Python | a221443bc7e7b5410f06653fa741b9d7af0fe10f | [
"MIT"
] | null | null | null | Wallpaper change.py | Arbazkhan4712/Wallpaper-Changer-using-Python | a221443bc7e7b5410f06653fa741b9d7af0fe10f | [
"MIT"
] | 3 | 2020-04-03T12:36:20.000Z | 2020-06-06T15:12:04.000Z | import ctypes
import os
import time
from pynput.keyboard import Key,Controller
import Bing
def closeTerminal():
keyboard=Controller()
keyboard.press(Key.alt)
keyboard.press(Key.f4)
keyboard.release(Key.alt)
keyboard.release(Key.f4)
def changeWallpaper(image_path):
start=time.time()
end=ti... | 26.86 | 97 | 0.581534 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.043931 |
b41e78f19f2060ee9b4a3efdc51b5e3c612a3ca4 | 968 | py | Python | tests/sensitivity/sf2/sf2_test.py | vic-c137/mpi-boids-simulation | a822f20f5c1cd7cd2a6261a53adeb24e2c0115ec | [
"Apache-2.0"
] | null | null | null | tests/sensitivity/sf2/sf2_test.py | vic-c137/mpi-boids-simulation | a822f20f5c1cd7cd2a6261a53adeb24e2c0115ec | [
"Apache-2.0"
] | null | null | null | tests/sensitivity/sf2/sf2_test.py | vic-c137/mpi-boids-simulation | a822f20f5c1cd7cd2a6261a53adeb24e2c0115ec | [
"Apache-2.0"
] | null | null | null | # Import statements
import subprocess
from os import system
# Variable declarations
np = "10"
cexe = "./Boids"
nboids = "50"
nloops = "500"
k = "7"
maxv = "10"
acc = "1.25"
width = "1000"
height = "1000"
sf1 = "1"
sf2 = "32"
min = "50"
sf3 = "8"
sf4 = "10"
dataPath = "./data/"
jexe = "BoidModelTest"
... | 31.225806 | 220 | 0.558884 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 303 | 0.313017 |
b41e7a6675758027f59252fdd90ad0a28c111058 | 976 | py | Python | flask_start/flask_start/public/email.py | kostekci/flask_start | fa279fc8907aff9868e2596f4ed9c4d9428d2f75 | [
"MIT"
] | null | null | null | flask_start/flask_start/public/email.py | kostekci/flask_start | fa279fc8907aff9868e2596f4ed9c4d9428d2f75 | [
"MIT"
] | 95 | 2021-09-13T21:23:12.000Z | 2022-03-31T21:22:32.000Z | flask_start/flask_start/public/email.py | kostekci/flask_start | fa279fc8907aff9868e2596f4ed9c4d9428d2f75 | [
"MIT"
] | null | null | null | from flask_mail import Message
from flask import render_template
from flask_start.extensions import mail
'''
from threading import Thread
def send_async_email(app, msg):
with app.app_context():
mail.send(msg)
'''
def send_email(subject, sender, recipients, text_body, html_body):
msg = Message(subject... | 32.533333 | 75 | 0.646516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.286885 |
b41f08666a2d2b54abb8df40e1f44d9b70d9644a | 7,784 | py | Python | demo/trace_model.py | furkankirac/maskrcnn-benchmark | a348dc36600e577c3ba569320f3a6a8e15986f72 | [
"MIT"
] | null | null | null | demo/trace_model.py | furkankirac/maskrcnn-benchmark | a348dc36600e577c3ba569320f3a6a8e15986f72 | [
"MIT"
] | null | null | null | demo/trace_model.py | furkankirac/maskrcnn-benchmark | a348dc36600e577c3ba569320f3a6a8e15986f72 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from __future__ import division
import os
import numpy
from io import BytesIO
from matplotlib import pyplot
import requests
import torch
from PIL import Image
from maskrcnn_benchmark.config import cfg
from predictor import COCODemo
from maskrcnn... | 41.185185 | 163 | 0.654034 | 0 | 0 | 0 | 0 | 3,731 | 0.479317 | 0 | 0 | 1,564 | 0.200925 |
b42110e69fbba6f3cc1175f605afe65f09844634 | 5,211 | py | Python | validation_tests/analytical_exact/river_at_rest_varying_topo_width/numerical_varying_width.py | samcom12/anuga_core | f4378114dbf02d666fe6423de45798add5c42806 | [
"Python-2.0",
"OLDAP-2.7"
] | 136 | 2015-05-07T05:47:43.000Z | 2022-02-16T03:07:40.000Z | validation_tests/analytical_exact/river_at_rest_varying_topo_width/numerical_varying_width.py | samcom12/anuga_core | f4378114dbf02d666fe6423de45798add5c42806 | [
"Python-2.0",
"OLDAP-2.7"
] | 184 | 2015-05-03T09:27:54.000Z | 2021-12-20T04:22:48.000Z | validation_tests/analytical_exact/river_at_rest_varying_topo_width/numerical_varying_width.py | samcom12/anuga_core | f4378114dbf02d666fe6423de45798add5c42806 | [
"Python-2.0",
"OLDAP-2.7"
] | 70 | 2015-03-18T07:35:22.000Z | 2021-11-01T07:07:29.000Z | """Simple water flow example using ANUGA
Water driven up a linear slope and time varying boundary,
similar to a beach environment
"""
#------------------------------------------------------------------------------
# Import necessary modules
#----------------------------------------------------------------------------... | 36.440559 | 96 | 0.459797 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,748 | 0.527346 |
b424151af9b357850be4c70639941f09ba348b96 | 253 | py | Python | src/temperature/urls.py | JohanGovers/home-mon-server | e22ee05508597f11b313f8fa600a4867ad15f759 | [
"MIT"
] | null | null | null | src/temperature/urls.py | JohanGovers/home-mon-server | e22ee05508597f11b313f8fa600a4867ad15f759 | [
"MIT"
] | null | null | null | src/temperature/urls.py | JohanGovers/home-mon-server | e22ee05508597f11b313f8fa600a4867ad15f759 | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, url
from temperature import views
urlpatterns = patterns('',
url(r'^$', views.index, name='index'),
url(r'^save_temp_reading$', views.save_temp_reading, name='save_temp_reading'),
)
| 31.625 | 88 | 0.660079 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.217391 |
b425096bf56f11b8a01b6bd3c09874f67758b609 | 5,767 | py | Python | FictionTools/amitools/amitools/binfmt/elf/BinFmtELF.py | polluks/Puddle-BuildTools | c1762d53a33002b62d8cffe3db129505a387bec3 | [
"BSD-2-Clause"
] | 38 | 2021-06-18T12:56:15.000Z | 2022-03-12T20:38:40.000Z | FictionTools/amitools/amitools/binfmt/elf/BinFmtELF.py | polluks/Puddle-BuildTools | c1762d53a33002b62d8cffe3db129505a387bec3 | [
"BSD-2-Clause"
] | 2 | 2021-06-20T16:28:12.000Z | 2021-11-17T21:33:56.000Z | FictionTools/amitools/amitools/binfmt/elf/BinFmtELF.py | polluks/Puddle-BuildTools | c1762d53a33002b62d8cffe3db129505a387bec3 | [
"BSD-2-Clause"
] | 6 | 2021-06-18T18:18:36.000Z | 2021-12-22T08:01:32.000Z | from amitools.binfmt.BinImage import *
from .ELFFile import *
from .ELF import *
from .ELFReader import ELFReader
from .DwarfDebugLine import DwarfDebugLine
class BinFmtELF:
"""Handle Amiga m68k binaries in ELF format (usually from AROS)"""
def is_image(self, path):
"""check if a given file is a supp... | 31.686813 | 85 | 0.521415 | 5,341 | 0.926131 | 0 | 0 | 0 | 0 | 0 | 0 | 860 | 0.149124 |
b425e1b4a3766b7202ee32581542acc01753bfbd | 11,532 | py | Python | recordtransform.py | Andresfgomez970/Managing-.wav-files-in-python | 2bf344a3217efe9dc15349ef4be14f2e5cb53ace | [
"MIT"
] | null | null | null | recordtransform.py | Andresfgomez970/Managing-.wav-files-in-python | 2bf344a3217efe9dc15349ef4be14f2e5cb53ace | [
"MIT"
] | null | null | null | recordtransform.py | Andresfgomez970/Managing-.wav-files-in-python | 2bf344a3217efe9dc15349ef4be14f2e5cb53ace | [
"MIT"
] | null | null | null | import pyaudio
import wave
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.pylab as plt
from scipy.io import wavfile
import cmath as cm
from scipy.fftpack import fft
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
fro... | 31.508197 | 129 | 0.644034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,506 | 0.217308 |
b4266c4983e7f09a613d7773116f8f267c2d1a3a | 2,994 | py | Python | AllSidesScraper/allsides.py | Epicrider/polibalance | 88a0adf54d09baeac3dcad36ce119640d6aa990b | [
"MIT"
] | null | null | null | AllSidesScraper/allsides.py | Epicrider/polibalance | 88a0adf54d09baeac3dcad36ce119640d6aa990b | [
"MIT"
] | null | null | null | AllSidesScraper/allsides.py | Epicrider/polibalance | 88a0adf54d09baeac3dcad36ce119640d6aa990b | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
from communityFeedback import *
from time import sleep
from rich.progress import track
import json
page = [
'https://www.allsides.com/media-bias/media-bias-ratings',
]
def table(full_table):
# The main table
print('Web scraper is parsing the table!')
for... | 32.193548 | 94 | 0.59352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 961 | 0.320975 |
b426f99a8bac6c3327cab3da97ce79ef51269da3 | 1,068 | py | Python | commands/calc.py | periodicaidan/dalton-cli | 6a83e1a2675e335bf807c43c4201d78e5b389837 | [
"MIT"
] | 2 | 2018-12-21T19:09:49.000Z | 2018-12-22T10:41:36.000Z | commands/calc.py | periodicaidan/dalton-cli | 6a83e1a2675e335bf807c43c4201d78e5b389837 | [
"MIT"
] | null | null | null | commands/calc.py | periodicaidan/dalton-cli | 6a83e1a2675e335bf807c43c4201d78e5b389837 | [
"MIT"
] | null | null | null | """
File: commands/calc.py
Purpose: Performs calculations in response to user input, and outputs the result
"""
from sys import argv
import click
from calculator import *
from models import History
from models.Config import Config
from help_menus import calc_help
@click.group("calc", invoke_without_command=True)
@... | 31.411765 | 85 | 0.652622 | 0 | 0 | 0 | 0 | 798 | 0.747191 | 0 | 0 | 310 | 0.290262 |
b42826894cb5a72b4000d0d8ef3a13b2f541b2b5 | 3,271 | py | Python | aot/meta_triggers/metatrigger_treasure.py | jaycheungchunman/age-of-triggers | f2a75685a0b0cc9e26132d4f52b6ed2c4798f6b4 | [
"MIT"
] | null | null | null | aot/meta_triggers/metatrigger_treasure.py | jaycheungchunman/age-of-triggers | f2a75685a0b0cc9e26132d4f52b6ed2c4798f6b4 | [
"MIT"
] | null | null | null | aot/meta_triggers/metatrigger_treasure.py | jaycheungchunman/age-of-triggers | f2a75685a0b0cc9e26132d4f52b6ed2c4798f6b4 | [
"MIT"
] | null | null | null | from aot import *
from aot.model.trigger import *
from aot.model.condition import *
from aot.model.effect import *
from aot.meta_triggers.metatrigger import MetaTrigger
from aot.model.enums.resource import EnumResource
from aot.model.enums.player import PlayerEnum
from aot.model.enums.unit import UnitConstant, UnitType... | 45.430556 | 101 | 0.551819 | 2,939 | 0.898502 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.033323 |
b4283b91c4a94a15dbf38eab20ef16e0e0641f20 | 2,625 | py | Python | agent/lm_agent/server_interfaces/lsdyna.py | omnivector-solutions/license-manager | 9eb1e4569d692aef83a2388096e7413bc010be61 | [
"MIT"
] | 2 | 2020-11-15T22:54:39.000Z | 2022-02-15T07:58:55.000Z | agent/lm_agent/server_interfaces/lsdyna.py | omnivector-solutions/license-manager | 9eb1e4569d692aef83a2388096e7413bc010be61 | [
"MIT"
] | 2 | 2022-02-18T19:36:45.000Z | 2022-03-16T23:07:44.000Z | agent/lm_agent/server_interfaces/lsdyna.py | omnivector-solutions/license-manager | 9eb1e4569d692aef83a2388096e7413bc010be61 | [
"MIT"
] | null | null | null | """LS-Dyna license server interface."""
import typing
from lm_agent.config import settings
from lm_agent.exceptions import LicenseManagerBadServerOutput
from lm_agent.parsing import lsdyna
from lm_agent.server_interfaces.license_server_interface import LicenseReportItem, LicenseServerInterface
from lm_agent.server_int... | 38.602941 | 105 | 0.694476 | 2,269 | 0.864381 | 0 | 0 | 0 | 0 | 1,484 | 0.565333 | 826 | 0.314667 |
b428942d04da784eb0b105b8727b2b0340163593 | 2,634 | py | Python | examples/gan/gan_embeddings.py | ojmakhura/DIGITS | f34e62c245054b51ea51fcb8949d2ca777f162d1 | [
"BSD-3-Clause"
] | null | null | null | examples/gan/gan_embeddings.py | ojmakhura/DIGITS | f34e62c245054b51ea51fcb8949d2ca777f162d1 | [
"BSD-3-Clause"
] | null | null | null | examples/gan/gan_embeddings.py | ojmakhura/DIGITS | f34e62c245054b51ea51fcb8949d2ca777f162d1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
import argparse
import os
import pickle
import shutil
import numpy as np
import PIL.Image
import tensorflow as tf
from tensorflow.contrib.tensorboard.plugins import projector
TB_DIR = os.path.join(os.getcwd(), "gan-tb")
SPRITE_IMA... | 29.595506 | 88 | 0.678056 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 395 | 0.149962 |
b42ac51788c29cf80e7fbe118ac8d2f98639006c | 30 | py | Python | punch_version.py | joshua-s/punch | c29751844ecf654cc21966a14842e8165e0bc300 | [
"ISC"
] | null | null | null | punch_version.py | joshua-s/punch | c29751844ecf654cc21966a14842e8165e0bc300 | [
"ISC"
] | null | null | null | punch_version.py | joshua-s/punch | c29751844ecf654cc21966a14842e8165e0bc300 | [
"ISC"
] | null | null | null | major = 1
minor = 4
patch = 5
| 7.5 | 9 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b42bbf006e731b294f9bc03e50361e650c57e4a5 | 97 | py | Python | 17.py | yonghuatang/python | 6d53bf2f1e75ac03b07eb56ff83e26d8b5155bb1 | [
"MIT"
] | null | null | null | 17.py | yonghuatang/python | 6d53bf2f1e75ac03b07eb56ff83e26d8b5155bb1 | [
"MIT"
] | null | null | null | 17.py | yonghuatang/python | 6d53bf2f1e75ac03b07eb56ff83e26d8b5155bb1 | [
"MIT"
] | null | null | null | from datetime import date
now = date.today()
print('The date today is', now, now.strftime("%A"))
| 24.25 | 51 | 0.701031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.237113 |
b42bc72a01713bbb619aec869a9dad62431b9ce2 | 4,613 | py | Python | pyxtal/miscellaneous/from_ase_molecule.py | ubikpt/PyXtal | 32da046a2bde542279824d6377aea116b679a2e7 | [
"MIT"
] | 127 | 2018-09-21T22:27:17.000Z | 2022-03-30T21:11:49.000Z | pyxtal/miscellaneous/from_ase_molecule.py | ubikpt/PyXtal | 32da046a2bde542279824d6377aea116b679a2e7 | [
"MIT"
] | 171 | 2018-08-06T07:10:24.000Z | 2022-03-29T00:59:53.000Z | pyxtal/miscellaneous/from_ase_molecule.py | ubikpt/PyXtal | 32da046a2bde542279824d6377aea116b679a2e7 | [
"MIT"
] | 50 | 2018-08-12T22:50:46.000Z | 2022-03-23T07:52:47.000Z | from pyxtal.molecule import *
from ase.build import molecule
from pymatgen.core import Molecule
def get_ase_mol(molname):
"""convert ase molecule to pymatgen style"""
ase_mol = molecule(molname)
pos = ase_mol.get_positions()
symbols = ase_mol.get_chemical_symbols()
return Molecule(symbols, pos)
... | 36.904 | 82 | 0.506829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,097 | 0.237806 |
b42d69d014401c8b0ab94e331591c7f7f7c7c313 | 2,650 | py | Python | my_project/evolution_forces.py | Abhigyan-Mishra/Quantum-Animation | 675ac367461f6f2b3e0cee3a99db9e1541567e7a | [
"MIT"
] | null | null | null | my_project/evolution_forces.py | Abhigyan-Mishra/Quantum-Animation | 675ac367461f6f2b3e0cee3a99db9e1541567e7a | [
"MIT"
] | null | null | null | my_project/evolution_forces.py | Abhigyan-Mishra/Quantum-Animation | 675ac367461f6f2b3e0cee3a99db9e1541567e7a | [
"MIT"
] | null | null | null | from manimlib.imports import *
"""
TODO:
[ ] fix arrow head size
auto scale according to size?
have a default size, but, if the arrow size is too short, then shrink the head
[ ] slide the point according to the gradient
"""
class ParaboloidPlot(SpecialThreeDScene):
CONFIG = {
"three_d_axes_config": {
"num_... | 24.311927 | 80 | 0.669057 | 2,418 | 0.912453 | 0 | 0 | 0 | 0 | 0 | 0 | 832 | 0.313962 |
b42dd19edf20cbabd2658c3670786d63ec526613 | 13,056 | py | Python | tests/python/tensor_graph/test/test_internal/performance/build_time_resnet.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | 22 | 2022-03-18T07:29:31.000Z | 2022-03-23T14:54:32.000Z | tests/python/tensor_graph/test/test_internal/performance/build_time_resnet.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | null | null | null | tests/python/tensor_graph/test/test_internal/performance/build_time_resnet.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | 2 | 2022-03-18T08:26:34.000Z | 2022-03-20T06:02:48.000Z | import tvm
import sys
import time
import numpy as np
from tvm.tensor_graph.testing.models import resnet
from tvm.tensor_graph.core import ForwardGraph, BackwardGraph, compute, \
GraphTensor, GraphOp, PyTIRGraph
from tvm.tensor_graph.nn import CELoss, SGD
from tvm.tensor_graph.core.schedul... | 32.157635 | 137 | 0.644455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,911 | 0.299556 |
b42f2c192af4e02268e2e461bdd471fe5bb67342 | 2,300 | py | Python | Python3/src/basicExample.py | emanuelen5/XPlaneConnect | 0d462ac306bc802a3b269227d3b98d2507abcd40 | [
"Unlicense"
] | 457 | 2015-01-02T14:21:11.000Z | 2022-03-27T02:56:47.000Z | Python3/src/basicExample.py | fseconomy/XPlaneConnect | 11a5f350bd6888873d293bf3c9f59b0fba1331c1 | [
"Unlicense"
] | 211 | 2015-03-24T16:41:33.000Z | 2022-03-27T18:36:11.000Z | Python3/src/basicExample.py | fseconomy/XPlaneConnect | 11a5f350bd6888873d293bf3c9f59b0fba1331c1 | [
"Unlicense"
] | 258 | 2015-01-01T17:02:27.000Z | 2022-03-31T19:36:03.000Z | from time import sleep
import xpc
def ex():
print("X-Plane Connect example script")
print("Setting up simulation")
with xpc.XPlaneConnect() as client:
# Verify connection
try:
# If X-Plane does not respond to the request, a timeout error
# will be raised.
... | 31.944444 | 81 | 0.541304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 956 | 0.415652 |
b42fa4f8536cb94842b8b435241c9e24e5dca076 | 27,419 | py | Python | venv/lib/python3.6/site-packages/pelican/readers.py | RyanHelgoth/CMPUT404-Lab5 | 82424bf5a9b80ff186bd69d224457c8b70a3bdf3 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.6/site-packages/pelican/readers.py | RyanHelgoth/CMPUT404-Lab5 | 82424bf5a9b80ff186bd69d224457c8b70a3bdf3 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.6/site-packages/pelican/readers.py | RyanHelgoth/CMPUT404-Lab5 | 82424bf5a9b80ff186bd69d224457c8b70a3bdf3 | [
"Apache-2.0"
] | null | null | null | import datetime
import logging
import os
import re
from collections import OrderedDict
from html import escape
from html.parser import HTMLParser
from io import StringIO
import docutils
import docutils.core
import docutils.io
from docutils.parsers.rst.languages import get_language as get_docutils_lang
from docutils.wr... | 36.607477 | 79 | 0.581276 | 19,598 | 0.71476 | 0 | 0 | 211 | 0.007695 | 0 | 0 | 7,556 | 0.275575 |
b4314fe64ec815899c36c9b326b930ecd497d54b | 4,017 | py | Python | xmuda/models/CP_v5.py | anhquancao/xmuda-extend | 4b670ec2f6766e3a624e81dbe5d97b209c1c4f76 | [
"Apache-2.0"
] | null | null | null | xmuda/models/CP_v5.py | anhquancao/xmuda-extend | 4b670ec2f6766e3a624e81dbe5d97b209c1c4f76 | [
"Apache-2.0"
] | null | null | null | xmuda/models/CP_v5.py | anhquancao/xmuda-extend | 4b670ec2f6766e3a624e81dbe5d97b209c1c4f76 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from xmuda.models.DDR import Bottleneck3D
from xmuda.models.LMSCNet import SegmentationHead, ASPP
import numpy as np
from xmuda.models.modules import Process, Upsample, Downsample
import math
from xmuda.data.utils.preprocess import create_voxel_position... | 40.17 | 134 | 0.638536 | 3,689 | 0.918347 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0.065472 |
b432caf11213235d03484242de9f5514f01637df | 10,511 | py | Python | gala/potential/potential/tests/helpers.py | ltlancas/gala | 2621bb599d67e74a85446abf72d5930ef70ca181 | [
"MIT"
] | 1 | 2021-10-14T03:36:15.000Z | 2021-10-14T03:36:15.000Z | gala/potential/potential/tests/helpers.py | ltlancas/gala | 2621bb599d67e74a85446abf72d5930ef70ca181 | [
"MIT"
] | null | null | null | gala/potential/potential/tests/helpers.py | ltlancas/gala | 2621bb599d67e74a85446abf72d5930ef70ca181 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import division, print_function
# Standard library
import time
# Third-party
import matplotlib.pyplot as plt
import numpy as np
from scipy.misc import derivative
from astropy.extern.six.moves import cPickle as pickle
import pytest
# Project
from ..io import load
from ..core import C... | 38.785978 | 113 | 0.560936 | 9,806 | 0.932927 | 0 | 0 | 1,606 | 0.152792 | 0 | 0 | 1,137 | 0.108172 |
b4343b1a76985ec5d57d6a76843b7a4f2ed671b3 | 9,677 | py | Python | main.py | ailzy/Reinforcement-learning-in-portfolio-management- | 6d850bf52637482636ed8336480343e0e4cef1bd | [
"MIT"
] | null | null | null | main.py | ailzy/Reinforcement-learning-in-portfolio-management- | 6d850bf52637482636ed8336480343e0e4cef1bd | [
"MIT"
] | null | null | null | main.py | ailzy/Reinforcement-learning-in-portfolio-management- | 6d850bf52637482636ed8336480343e0e4cef1bd | [
"MIT"
] | 1 | 2019-05-13T00:54:08.000Z | 2019-05-13T00:54:08.000Z | # -*- coding: utf-8 -*-
from argparse import ArgumentParser
import json
import time
import pandas as pd
import tensorflow as tf
import numpy as np
import math
from decimal import Decimal
import matplotlib.pyplot as plt
from agents.ornstein_uhlenbeck import OrnsteinUhlenbeckActionNoise
eps=10e-8
epochs=0... | 36.516981 | 190 | 0.602563 | 2,049 | 0.211739 | 0 | 0 | 0 | 0 | 0 | 0 | 1,492 | 0.15418 |
b43620ea470685e6e28c7e7bc58a0b84c3272e13 | 7,365 | py | Python | packages/structural_dhcp_mriqc/structural_dhcp_mriqc/utils/fs2gif.py | amakropoulos/structural-pipeline-measures | 70e22f9ad94cc57e72e510576cfc3129da83f7fc | [
"Apache-2.0"
] | 2 | 2017-09-11T15:25:14.000Z | 2019-09-27T17:08:31.000Z | packages/structural_dhcp_mriqc/structural_dhcp_mriqc/utils/fs2gif.py | amakropoulos/structural-pipeline-measures | 70e22f9ad94cc57e72e510576cfc3129da83f7fc | [
"Apache-2.0"
] | 6 | 2019-08-22T06:29:45.000Z | 2021-09-19T18:59:46.000Z | packages/structural_dhcp_mriqc/structural_dhcp_mriqc/utils/fs2gif.py | amakropoulos/structural-pipeline-measures | 70e22f9ad94cc57e72e510576cfc3129da83f7fc | [
"Apache-2.0"
] | 1 | 2018-02-12T14:38:33.000Z | 2018-02-12T14:38:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: oesteban
# @Date: 2016-03-16 11:28:27
# @Last Modified by: oesteban
# @Last Modified time: 2016-04-04 13:50:50
"""
Batch export freesurfer results to animated gifs
"""
from __future__ import absolute_import
from __future__ import division
from __future__ im... | 39.810811 | 118 | 0.567549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,933 | 0.262458 |
b4366804d5c82535ca7d92caff9e07608cd7136b | 10,751 | py | Python | DE_DataBase.py | almirjgomes/DE_DataBaseConnect | 2a369d77498c4c6c42b7447871472e5c4320b2ff | [
"MIT"
] | null | null | null | DE_DataBase.py | almirjgomes/DE_DataBaseConnect | 2a369d77498c4c6c42b7447871472e5c4320b2ff | [
"MIT"
] | null | null | null | DE_DataBase.py | almirjgomes/DE_DataBaseConnect | 2a369d77498c4c6c42b7447871472e5c4320b2ff | [
"MIT"
] | null | null | null | import os
import sqlite3 as sq3
import cx_Oracle as ora
import pandas as pd
import psycopg2 as ps2
import mysql.connector as mysql
import sqlalchemy
# Reponsabilidades desta classe:
# Apenas se conectar a uma das bases de dados abaixo especificadas
# Bases conhecidas: SQLITE, ORACLE, MYSQL, POSTGRES
class DATABASE:
... | 40.878327 | 167 | 0.474467 | 10,416 | 0.9683 | 0 | 0 | 0 | 0 | 0 | 0 | 3,792 | 0.352515 |
b4372d11f9380b54abe868161855c4d8eb68fe8d | 3,301 | py | Python | peter_lists/blog/views.py | pvize1/peter_lists | 77e9f30cfc45f500e059b7b163db541335180332 | [
"MIT"
] | null | null | null | peter_lists/blog/views.py | pvize1/peter_lists | 77e9f30cfc45f500e059b7b163db541335180332 | [
"MIT"
] | 8 | 2021-05-12T05:53:42.000Z | 2022-03-31T04:08:18.000Z | peter_lists/blog/views.py | pvize1/peter_lists | 77e9f30cfc45f500e059b7b163db541335180332 | [
"MIT"
] | null | null | null | from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.views.generic import (
ListView,
DetailView,
CreateView,
UpdateView,
DeleteView,
)
from django.shortcuts import render
from django.db.models import Count
from django.d... | 29.212389 | 94 | 0.684035 | 1,370 | 0.415026 | 0 | 0 | 0 | 0 | 0 | 0 | 567 | 0.171766 |
b4378b3e91302a7b53287f43ef0ed313d4ff8c2f | 1,992 | py | Python | tests/test_pythonpath.py | browniebroke/pytest-srcpaths | c0bf4a9b521c8f7af029f9923b344936cf425bf1 | [
"MIT"
] | 26 | 2021-02-18T20:49:41.000Z | 2022-02-08T21:06:20.000Z | tests/test_pythonpath.py | browniebroke/pytest-srcpaths | c0bf4a9b521c8f7af029f9923b344936cf425bf1 | [
"MIT"
] | null | null | null | tests/test_pythonpath.py | browniebroke/pytest-srcpaths | c0bf4a9b521c8f7af029f9923b344936cf425bf1 | [
"MIT"
] | 2 | 2021-04-04T01:45:37.000Z | 2022-02-07T11:28:51.000Z | import sys
from typing import Generator
from typing import List
from typing import Optional
import pytest
from _pytest.pytester import Pytester
def test_one_dir_pythonpath(pytester: Pytester, file_structure) -> None:
pytester.makefile(".ini", pytest="[pytest]\npythonpath=sub\n")
result = pytester.runpytest("... | 30.181818 | 81 | 0.676205 | 266 | 0.133534 | 899 | 0.451305 | 244 | 0.12249 | 0 | 0 | 476 | 0.238956 |
b4379f94d32e1eef87fdbc70ab371bde034c9874 | 1,735 | py | Python | coretemp.py | InScene/dht22-mqtt-daemon | 9a73715f4074f11222d1a6b263c12c897fadf0de | [
"MIT"
] | null | null | null | coretemp.py | InScene/dht22-mqtt-daemon | 9a73715f4074f11222d1a6b263c12c897fadf0de | [
"MIT"
] | null | null | null | coretemp.py | InScene/dht22-mqtt-daemon | 9a73715f4074f11222d1a6b263c12c897fadf0de | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
import paho.mqtt.client as mqtt
import time
import Adafruit_DHT
from configparser import ConfigParser
import json
config = ConfigParser(delimiters=('=', ))
config.read('config.ini')
sensor_type = config['sensor'].get('type', 'dht22').lower()
if sensor_type == 'dht22':
sensor = Adafruit_DH... | 30.438596 | 79 | 0.688184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 508 | 0.292795 |
b437d795dd924c40c4d023f3c55940133611431e | 663 | py | Python | mythril/support/support_utils.py | step21/mythril | d26a68e5473a57bd38091e1a5cad96a2b4e2c2ab | [
"MIT"
] | null | null | null | mythril/support/support_utils.py | step21/mythril | d26a68e5473a57bd38091e1a5cad96a2b4e2c2ab | [
"MIT"
] | 21 | 2019-04-12T17:54:51.000Z | 2021-11-04T18:47:45.000Z | mythril/support/support_utils.py | step21/mythril | d26a68e5473a57bd38091e1a5cad96a2b4e2c2ab | [
"MIT"
] | 1 | 2021-09-06T03:14:58.000Z | 2021-09-06T03:14:58.000Z | """This module contains utility functions for the Mythril support package."""
from typing import Dict
class Singleton(type):
"""A metaclass type implementing the singleton pattern."""
_instances = {} # type: Dict
def __call__(cls, *args, **kwargs):
"""Delegate the call to an existing resource o... | 28.826087 | 81 | 0.627451 | 558 | 0.841629 | 0 | 0 | 0 | 0 | 0 | 0 | 380 | 0.573152 |
b437ff845481fd16be2f8fc1d410e6c3c3a17c1d | 554 | py | Python | tests/functions/list/test_lists_map.py | sukovanej/mplisp | a3faf8c06936bcc5cde59899abf41a1b379090f5 | [
"MIT"
] | null | null | null | tests/functions/list/test_lists_map.py | sukovanej/mplisp | a3faf8c06936bcc5cde59899abf41a1b379090f5 | [
"MIT"
] | null | null | null | tests/functions/list/test_lists_map.py | sukovanej/mplisp | a3faf8c06936bcc5cde59899abf41a1b379090f5 | [
"MIT"
] | null | null | null | import unittest
import mplisp.evaluator as evaluator
class TestListMap(unittest.TestCase):
def map_test(self):
input1 = """
(map (lambda (x) (* 2 x)) (list 1 2 3))
"""
output1 = list(evaluator.evaluate(input1))
self.assertEqual(output1[0], [2, 4, 6])
def map_test_2(... | 22.16 | 50 | 0.534296 | 498 | 0.898917 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.305054 |
b4387eea371c6bde1ade7a6d0d94c1c04a7c6258 | 1,210 | py | Python | malpickle/main.py | erose1337/malpickle | 3c708426d5f5e33d3e232d77cbbfca0a955d6ebf | [
"MIT"
] | null | null | null | malpickle/main.py | erose1337/malpickle | 3c708426d5f5e33d3e232d77cbbfca0a955d6ebf | [
"MIT"
] | null | null | null | malpickle/main.py | erose1337/malpickle | 3c708426d5f5e33d3e232d77cbbfca0a955d6ebf | [
"MIT"
] | null | null | null | import argparse
from __init__ import insert_code
def main():
parser = argparse.ArgumentParser(description="Inject code into pickle files")
parser.add_argument("pickle_file", help="The pickle file to inject code into")
parser.add_argument("code_file", help="The shell script to inject")
#parser.add_argu... | 31.842105 | 121 | 0.680165 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 343 | 0.283471 |
b43894ad3119624561e61e4cdbc634a63ac5df12 | 1,923 | py | Python | src/redis_lock/django_cache.py | suligap/python-redis-lock | 369e95bb5e26284ef0944e551f93d9f2596e5345 | [
"BSD-2-Clause"
] | null | null | null | src/redis_lock/django_cache.py | suligap/python-redis-lock | 369e95bb5e26284ef0944e551f93d9f2596e5345 | [
"BSD-2-Clause"
] | null | null | null | src/redis_lock/django_cache.py | suligap/python-redis-lock | 369e95bb5e26284ef0944e551f93d9f2596e5345 | [
"BSD-2-Clause"
] | null | null | null | from django.core.cache.backends.base import DEFAULT_TIMEOUT
from django_redis.cache import RedisCache as PlainRedisCache
from redis_lock import Lock
from redis_lock import reset_all
class RedisCache(PlainRedisCache):
@property
def __client(self):
try:
return self.client.get_client()
... | 33.155172 | 92 | 0.598024 | 1,737 | 0.903276 | 0 | 0 | 322 | 0.167447 | 0 | 0 | 577 | 0.300052 |
b438f353825f2b371f64bd83071ca8831b7f58ce | 3,510 | py | Python | nets/facenet.py | QiongWang-l/llfr | 00f62f03dd2964add1ff1b007292d06afff708f4 | [
"MIT"
] | null | null | null | nets/facenet.py | QiongWang-l/llfr | 00f62f03dd2964add1ff1b007292d06afff708f4 | [
"MIT"
] | null | null | null | nets/facenet.py | QiongWang-l/llfr | 00f62f03dd2964add1ff1b007292d06afff708f4 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.nn import functional as F
from torchvision.models.utils import load_state_dict_from_url
from nets.inception_resnetv1 import InceptionResnetV1
from nets.mobilenet import MobileNetV1
class mobilenet(nn.Module):
def __init__(self, pretrained):
super(mobilenet, s... | 37.340426 | 189 | 0.61396 | 3,267 | 0.930769 | 0 | 0 | 0 | 0 | 0 | 0 | 366 | 0.104274 |
b439967634fbd815c14f34a574722d653f74e466 | 367 | py | Python | distributed_social_network/posts/migrations/0003_auto_20190308_2055.py | leevtori/CMPUT404-project | 52214288855ae4b3f05b8d17e67a2686debffb19 | [
"Apache-2.0"
] | null | null | null | distributed_social_network/posts/migrations/0003_auto_20190308_2055.py | leevtori/CMPUT404-project | 52214288855ae4b3f05b8d17e67a2686debffb19 | [
"Apache-2.0"
] | 51 | 2019-03-22T00:31:06.000Z | 2021-06-10T21:17:30.000Z | distributed_social_network/posts/migrations/0003_auto_20190308_2055.py | leevtori/CMPUT404-project | 52214288855ae4b3f05b8d17e67a2686debffb19 | [
"Apache-2.0"
] | 1 | 2019-02-08T01:33:57.000Z | 2019-02-08T01:33:57.000Z | # Generated by Django 2.1.7 on 2019-03-08 20:55
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('posts', '0002_auto_20190221_0234'),
]
operations = [
migrations.RenameField(
model_name='post',
old_name='visiblilty',
... | 19.315789 | 47 | 0.588556 | 282 | 0.768392 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.297003 |
b439fd956c9d132bc84b304fc1984cd145eb18b5 | 2,260 | py | Python | minify/migrations/0004_auto__del_unique_urlminify_short_url__add_unique_urlminify_short_url_s.py | djsan15/url-minifier | 00ff087dadc7e14015cc5640e135f8454afd11dc | [
"MIT"
] | null | null | null | minify/migrations/0004_auto__del_unique_urlminify_short_url__add_unique_urlminify_short_url_s.py | djsan15/url-minifier | 00ff087dadc7e14015cc5640e135f8454afd11dc | [
"MIT"
] | null | null | null | minify/migrations/0004_auto__del_unique_urlminify_short_url__add_unique_urlminify_short_url_s.py | djsan15/url-minifier | 00ff087dadc7e14015cc5640e135f8454afd11dc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'URLMinify', fields ['short_url']
db.dele... | 52.55814 | 217 | 0.615487 | 2,093 | 0.926106 | 0 | 0 | 0 | 0 | 0 | 0 | 1,437 | 0.635841 |
b43cafc5d4e3e3709f5f5f9476d5698dfa194510 | 1,182 | py | Python | Validation/EcalRecHits/test/EcalTBValidationData_cfg.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | Validation/EcalRecHits/test/EcalTBValidationData_cfg.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | Validation/EcalRecHits/test/EcalTBValidationData_cfg.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
process = cms.Process("h4ValidData")
# initialize MessageLogger
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(-1)
)
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring... | 36.9375 | 73 | 0.756345 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 367 | 0.310491 |
b43dc0c04bfb765d1057fbf1d173d5c4374ca965 | 1,948 | py | Python | database/domains.py | changyc9928/Genshin-Discord-Bot | be64481f43755c0031b469e79271ec7f0753cb0a | [
"MIT"
] | null | null | null | database/domains.py | changyc9928/Genshin-Discord-Bot | be64481f43755c0031b469e79271ec7f0753cb0a | [
"MIT"
] | null | null | null | database/domains.py | changyc9928/Genshin-Discord-Bot | be64481f43755c0031b469e79271ec7f0753cb0a | [
"MIT"
] | null | null | null | import asyncio
from query_graphql import query_artifact_domains, query_weapon_materials_book
class Domains:
leylines = {
"Blossom of Revelation": "Character EXP Materials",
"Blossom of Wealth": "Mora"
}
weapon_domains = {}
talent_domains = {}
artifact_domains = {}
trounce_doma... | 34.785714 | 98 | 0.627823 | 1,851 | 0.950205 | 0 | 0 | 606 | 0.311088 | 588 | 0.301848 | 834 | 0.428131 |
b43e6c43008ba217cff97642ff4168d07bf643bc | 23,644 | py | Python | policy.py | nyu-dl/dl4mt-simul-trans | 392ff3148e944be6fbc475d5285441807902e2e0 | [
"BSD-3-Clause"
] | 34 | 2016-12-01T07:59:43.000Z | 2021-09-13T10:46:15.000Z | policy.py | yifanjun233/dl4mt-simul-trans | 392ff3148e944be6fbc475d5285441807902e2e0 | [
"BSD-3-Clause"
] | 1 | 2020-09-14T08:35:00.000Z | 2020-09-14T08:35:00.000Z | policy.py | yifanjun233/dl4mt-simul-trans | 392ff3148e944be6fbc475d5285441807902e2e0 | [
"BSD-3-Clause"
] | 18 | 2016-12-15T01:43:33.000Z | 2021-09-29T07:24:08.000Z | """
-- Policy Network for decision making [more general]
"""
from nmt_uni import *
from layers import _p
import os
import time, datetime
import cPickle as pkl
# hyper params
TINY = 1e-7
PI = numpy.pi
E = numpy.e
A = 0.2
B = 1
class Controller(object):
def __init__(self, trng,
option... | 39.871838 | 118 | 0.514084 | 23,398 | 0.989596 | 0 | 0 | 2,401 | 0.101548 | 0 | 0 | 5,344 | 0.226019 |
b43f15ecbdb1d9b59ec1324ee2719d330bd46baf | 3,637 | py | Python | src/app/drivers/pycolator/splitmerge.py | husensofteng/msstitch | a917ed24fbc8b018b3f2bbec31e852aa76cc715c | [
"MIT"
] | null | null | null | src/app/drivers/pycolator/splitmerge.py | husensofteng/msstitch | a917ed24fbc8b018b3f2bbec31e852aa76cc715c | [
"MIT"
] | null | null | null | src/app/drivers/pycolator/splitmerge.py | husensofteng/msstitch | a917ed24fbc8b018b3f2bbec31e852aa76cc715c | [
"MIT"
] | null | null | null | from app.drivers.pycolator import base
from app.actions.pycolator import splitmerge as preparation
from app.readers import pycolator as readers
from app.drivers.options import pycolator_options
class SplitDriver(base.PycolatorDriver):
outfile = None
def run(self):
self.set_filter_types()
for ... | 36.37 | 79 | 0.668958 | 3,431 | 0.94336 | 0 | 0 | 0 | 0 | 0 | 0 | 1,104 | 0.303547 |
b442fb148ab72708b2f20e85644d227c7977348c | 453 | py | Python | ejercicio 14.py | Davidpadilla1234/taller_estructura-secuencial | 3a65931ad75fd4902f406c6c872053169dad1a0b | [
"MIT"
] | null | null | null | ejercicio 14.py | Davidpadilla1234/taller_estructura-secuencial | 3a65931ad75fd4902f406c6c872053169dad1a0b | [
"MIT"
] | null | null | null | ejercicio 14.py | Davidpadilla1234/taller_estructura-secuencial | 3a65931ad75fd4902f406c6c872053169dad1a0b | [
"MIT"
] | null | null | null | """
Entradas:
lectura actual--->float--->lect2
lectura anterior--->float--->lect1
valor kw--->float--->valorkw
Salidas:
consumo--->float--->consumo
total factura-->flotante--->total
"""
lect2 = float ( entrada ( "Digite lectura real:" ))
lect1 = float ( entrada ( "Digite lectura anterior:" ))
valorkw = float ( input ( ... | 30.2 | 55 | 0.653422 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.615894 |
b4430cd61e95dcd15b900c13c175b1309fa0cc87 | 4,955 | py | Python | src/workers/correct.py | brainsqueeze/Image_correction | db19088fb101ce760601416d19622d46d76f482c | [
"MIT"
] | 10 | 2017-08-31T06:16:56.000Z | 2022-03-12T19:44:50.000Z | src/workers/correct.py | brainsqueeze/Image_correction | db19088fb101ce760601416d19622d46d76f482c | [
"MIT"
] | 2 | 2018-06-01T09:27:07.000Z | 2018-07-23T01:43:16.000Z | src/workers/correct.py | brainsqueeze/Image_correction | db19088fb101ce760601416d19622d46d76f482c | [
"MIT"
] | 3 | 2018-10-24T04:59:10.000Z | 2021-09-03T10:37:35.000Z | # __author__ = 'Dave'
import cv2
from skimage import io
from skimage.transform import probabilistic_hough_line
import matplotlib.pyplot as plt
import os
import warnings
import random
import numpy as np
warnings.filterwarnings('ignore', category=RuntimeWarning)
class CorrectImage(object):
def __init__(self):
... | 32.598684 | 105 | 0.559435 | 4,688 | 0.946115 | 0 | 0 | 1,731 | 0.349344 | 0 | 0 | 1,829 | 0.369122 |
b443c0485b44fdad4aad919722875c535cf37d83 | 2,469 | py | Python | plot_scripts/CC_timeline_plot.py | idunnam/Thesis | a567a25aa037c949de285158804a6ee396fc0e6c | [
"MIT"
] | null | null | null | plot_scripts/CC_timeline_plot.py | idunnam/Thesis | a567a25aa037c949de285158804a6ee396fc0e6c | [
"MIT"
] | 1 | 2022-01-28T13:12:26.000Z | 2022-01-28T13:12:26.000Z | plot_scripts/CC_timeline_plot.py | idunnam/Thesis | a567a25aa037c949de285158804a6ee396fc0e6c | [
"MIT"
] | null | null | null | """
This code is used for plotting induvidual timelines of seasonal CC for each CMIP5 and CMIP6 model
"""
import matplotlib.pyplot as plt
import xarray as xr
import numpy as np
import seaborn as sns
import pandas as pd
#=== Import SEB Anomalies ====
#from seasonal_SEB_components import *
ACCESS = xr.open_dataset('/p... | 46.584906 | 97 | 0.722155 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,089 | 0.441069 |
b443e69cd16f1827fe9ba10cb1499425321f1ac2 | 1,059 | py | Python | manage.py | xinbingliang/dockertest | aca2a508658681a5e6b1beab714059bf1b43d9ed | [
"MIT"
] | 30 | 2018-05-23T16:58:12.000Z | 2021-10-18T21:25:01.000Z | manage.py | xinbingliang/dockertest | aca2a508658681a5e6b1beab714059bf1b43d9ed | [
"MIT"
] | 2 | 2019-12-01T13:32:50.000Z | 2019-12-01T13:32:53.000Z | manage.py | xinbingliang/dockertest | aca2a508658681a5e6b1beab714059bf1b43d9ed | [
"MIT"
] | 136 | 2018-02-04T14:13:33.000Z | 2022-03-09T08:26:07.000Z | # manage.py
import unittest
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from skeleton.server import app, db
from skeleton.server.models import User
migrate = Migrate(app, db)
manager = Manager(app)
# migrations
manager.add_command('db', MigrateCommand)
@manager.command
def... | 18.578947 | 79 | 0.685552 | 0 | 0 | 0 | 0 | 699 | 0.660057 | 0 | 0 | 230 | 0.217186 |
b444035780c265816dfc1fd4e30cb0ee8b926672 | 610 | py | Python | client/middleware.py | uktrade/directory-forms-api | 078e38ddf7a761d2d34a0e1ab2dc3f20cd32e6aa | [
"MIT"
] | null | null | null | client/middleware.py | uktrade/directory-forms-api | 078e38ddf7a761d2d34a0e1ab2dc3f20cd32e6aa | [
"MIT"
] | 77 | 2018-10-29T14:38:37.000Z | 2022-03-23T14:20:39.000Z | client/middleware.py | uktrade/directory-forms-api | 078e38ddf7a761d2d34a0e1ab2dc3f20cd32e6aa | [
"MIT"
] | 1 | 2021-08-05T10:20:17.000Z | 2021-08-05T10:20:17.000Z | import sigauth.middleware
import sigauth.helpers
from client import helpers
class SignatureCheckMiddleware(sigauth.middleware.SignatureCheckMiddlewareBase):
secret = None
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.request_checker = helpers.RequestSignatureChe... | 30.5 | 80 | 0.703279 | 530 | 0.868852 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.086885 |
b444a932576d7caabe2a8eb3dc47c1e354d4d5e3 | 3,867 | py | Python | scripts/prepare-kernel-headers.py | sonicyang/mctest | 39c26c43e9fcf1fd94322effad4ca211d495339a | [
"BSD-2-Clause"
] | 4 | 2017-05-22T07:05:33.000Z | 2020-10-22T02:34:48.000Z | scripts/prepare-kernel-headers.py | sonicyang/mctest | 39c26c43e9fcf1fd94322effad4ca211d495339a | [
"BSD-2-Clause"
] | null | null | null | scripts/prepare-kernel-headers.py | sonicyang/mctest | 39c26c43e9fcf1fd94322effad4ca211d495339a | [
"BSD-2-Clause"
] | 2 | 2020-02-19T13:23:16.000Z | 2020-12-08T02:26:16.000Z | import os
import subprocess
import errno
import shutil
import re
import sys
kernel_path = ''
install_path = ''
patch_rules = []
arch = ''
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc:
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
else:
... | 27.820144 | 82 | 0.60693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,131 | 0.292475 |
b446c92bc9ef0b8ec976811e71bda60bd2a8e30d | 18,912 | py | Python | model/loss.py | Daipuwei/YOLO-tf2 | 1b2e7133c99507573f419c8a367a8dba4abeae5b | [
"MIT"
] | null | null | null | model/loss.py | Daipuwei/YOLO-tf2 | 1b2e7133c99507573f419c8a367a8dba4abeae5b | [
"MIT"
] | null | null | null | model/loss.py | Daipuwei/YOLO-tf2 | 1b2e7133c99507573f419c8a367a8dba4abeae5b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2021/9/18 下午11:19
# @Author : DaiPuWei
# @Email : 771830171@qq.com
# @File : loss.py
# @Software: PyCharm
"""
这是YOLO模型的损失函数的定义脚本,目前目标分类损失支持smooth Label;
目标定位损失支持均方差损失、GIOU Loss、DIOU Loss和CIOU Loss;
"""
import math
import tensorflow as tf
from tensorflow.keras import ... | 46.239609 | 123 | 0.519882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,306 | 0.355558 |
b4470139b4eff5eadddd95183f7509c2d7a4cf79 | 59,405 | py | Python | electrum_vtc/tests/test_lnpeer.py | samdisk11/electrum | 4fffb4328a1764b5cd969b5c733e67bced2548a0 | [
"MIT"
] | null | null | null | electrum_vtc/tests/test_lnpeer.py | samdisk11/electrum | 4fffb4328a1764b5cd969b5c733e67bced2548a0 | [
"MIT"
] | 2 | 2022-01-11T17:19:40.000Z | 2022-01-14T16:32:23.000Z | electrum_vtc/tests/test_lnpeer.py | samdisk11/electrum | 4fffb4328a1764b5cd969b5c733e67bced2548a0 | [
"MIT"
] | 2 | 2022-01-13T05:04:16.000Z | 2022-01-14T11:48:39.000Z | import asyncio
import tempfile
from decimal import Decimal
import os
from contextlib import contextmanager
from collections import defaultdict
import logging
import concurrent
from concurrent import futures
import unittest
from typing import Iterable, NamedTuple, Tuple, List, Dict
from aiorpcx import TaskGroup, timeou... | 46.775591 | 138 | 0.647908 | 55,415 | 0.932834 | 117 | 0.00197 | 35,810 | 0.602811 | 27,639 | 0.465264 | 6,700 | 0.112785 |
b4484ab703976e8f170a719cc81c5d0146cb13ba | 533 | py | Python | dictionaries/lab/06_students.py | Galchov/python-fundamentals | 4939bdd1c66a7b458fd9ffd0a01d714de26724b5 | [
"MIT"
] | null | null | null | dictionaries/lab/06_students.py | Galchov/python-fundamentals | 4939bdd1c66a7b458fd9ffd0a01d714de26724b5 | [
"MIT"
] | null | null | null | dictionaries/lab/06_students.py | Galchov/python-fundamentals | 4939bdd1c66a7b458fd9ffd0a01d714de26724b5 | [
"MIT"
] | null | null | null | data = input()
courses = {}
while ":" in data:
student_name, id, course_name = data.split(":")
if course_name not in courses:
courses[course_name] = {}
courses[course_name][id] = student_name
data = input()
searched_course = data
searched_course_name_as_list = searched_course.split("_")
se... | 23.173913 | 57 | 0.669794 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.052533 |
b44863efc63447d4fc28f184aca9628762468a02 | 637 | py | Python | eth_tester/normalization/common.py | PabloLefort/eth-tester | 9a795cff7da3916062884e9c1e690545741e60c5 | [
"MIT"
] | 215 | 2018-05-17T19:09:07.000Z | 2021-03-05T18:10:15.000Z | eth_tester/normalization/common.py | PabloLefort/eth-tester | 9a795cff7da3916062884e9c1e690545741e60c5 | [
"MIT"
] | 1 | 2021-03-25T21:51:01.000Z | 2021-03-25T21:51:01.000Z | eth_tester/normalization/common.py | PabloLefort/eth-tester | 9a795cff7da3916062884e9c1e690545741e60c5 | [
"MIT"
] | 1 | 2019-02-27T21:29:16.000Z | 2019-02-27T21:29:16.000Z | from cytoolz.functoolz import (
curry,
)
from eth_utils import (
to_dict,
to_tuple,
)
@curry
@to_dict
def normalize_dict(value, normalizers):
for key, item in value.items():
normalizer = normalizers[key]
yield key, normalizer(item)
@curry
@to_tuple
def normalize_array(value, normali... | 17.694444 | 71 | 0.657771 | 0 | 0 | 343 | 0.538462 | 529 | 0.830455 | 0 | 0 | 96 | 0.150706 |
b448742ef1c956bf4c670f1ca4c802b2271cb5bd | 1,030 | py | Python | je_open_cv/modules/image_operations.py | JE-Chen/Python-OPENCV-JE | d5dd3823f0a1cfc195da66bdcbe738c9bbdfc59b | [
"MIT"
] | null | null | null | je_open_cv/modules/image_operations.py | JE-Chen/Python-OPENCV-JE | d5dd3823f0a1cfc195da66bdcbe738c9bbdfc59b | [
"MIT"
] | null | null | null | je_open_cv/modules/image_operations.py | JE-Chen/Python-OPENCV-JE | d5dd3823f0a1cfc195da66bdcbe738c9bbdfc59b | [
"MIT"
] | null | null | null | import cv2
'''
基本圖像處理用
'''
# 取得圖像 行 列 通道數
def get_image_properties(image):
total = [image.shape, image.size, image.dtype]
return total
def get_image_shape(image):
return image.shape
# 取得 圖片大小
def get_image_size(image):
return image.size
# 取得圖片類型
def get_image_type(image):
return image.dtype... | 18.727273 | 109 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 563 | 0.501783 |
b44950222260e5d85816513148e16767252becb1 | 9,124 | py | Python | Incident-Response/Tools/grr/grr/client/grr_response_client/vfs_handlers/ntfs.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 1 | 2021-07-24T17:22:50.000Z | 2021-07-24T17:22:50.000Z | Incident-Response/Tools/grr/grr/client/grr_response_client/vfs_handlers/ntfs.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-28T03:40:31.000Z | 2022-02-28T03:40:52.000Z | Incident-Response/Tools/grr/grr/client/grr_response_client/vfs_handlers/ntfs.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-25T08:34:51.000Z | 2022-03-16T17:29:44.000Z | #!/usr/bin/env python
"""Virtual filesystem module based on pyfsntfs."""
import stat
from typing import Any, Callable, Dict, Iterable, Optional, Text, Type
import pyfsntfs
from grr_response_client import client_utils
from grr_response_client.vfs_handlers import base as vfs_base
from grr_response_core.lib import rdfv... | 36.790323 | 137 | 0.694432 | 8,071 | 0.88459 | 923 | 0.101162 | 1,946 | 0.213284 | 0 | 0 | 1,778 | 0.194871 |
b44954b2c2b3e9462c5ae4cfc721ce64071a8588 | 1,184 | py | Python | 04.Encapsulation/Exe/pizza_maker/project/main.py | nmoskova/Python-OOP | 07327bcb93eee3a7db5d7c0bbdd1b54eb9e8b864 | [
"MIT"
] | null | null | null | 04.Encapsulation/Exe/pizza_maker/project/main.py | nmoskova/Python-OOP | 07327bcb93eee3a7db5d7c0bbdd1b54eb9e8b864 | [
"MIT"
] | null | null | null | 04.Encapsulation/Exe/pizza_maker/project/main.py | nmoskova/Python-OOP | 07327bcb93eee3a7db5d7c0bbdd1b54eb9e8b864 | [
"MIT"
] | null | null | null | from encapsulation_04.exe.pizza_maker.project.dough import Dough
from encapsulation_04.exe.pizza_maker.project.pizza import Pizza
from encapsulation_04.exe.pizza_maker.project.topping import Topping
tomato_topping = Topping("Tomato", 60)
print(tomato_topping.topping_type)
print(tomato_topping.weight)
mushrooms_toppin... | 29.6 | 68 | 0.831081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.092905 |
b4498ac05bf8ea7aa023efd2ecbb1bd7c7b56fb2 | 1,158 | py | Python | src/unicon/plugins/iosxe/cat9k/__init__.py | nielsvanhooy/unicon.plugins | 3416fd8223f070cbb67a2cbe604e3c5d13584318 | [
"Apache-2.0"
] | null | null | null | src/unicon/plugins/iosxe/cat9k/__init__.py | nielsvanhooy/unicon.plugins | 3416fd8223f070cbb67a2cbe604e3c5d13584318 | [
"Apache-2.0"
] | null | null | null | src/unicon/plugins/iosxe/cat9k/__init__.py | nielsvanhooy/unicon.plugins | 3416fd8223f070cbb67a2cbe604e3c5d13584318 | [
"Apache-2.0"
] | null | null | null | """ cat9k IOS-XE connection implementation.
"""
__author__ = "Rob Trotter <rlt@cisco.com>"
from unicon.plugins.iosxe import (
IosXESingleRpConnection,
IosXEDualRPConnection,
IosXEServiceList,
HAIosXEServiceList)
from .statemachine import IosXECat9kSingleRpStateMachine, IosXECat9kDualRpStateMachine
fr... | 26.930233 | 86 | 0.768566 | 742 | 0.64076 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.07772 |
b44998685fc665e80493c8e5ef4cef6084f68ca9 | 4,875 | py | Python | ludopediaAnuncios.py | christianbobsin/LudopediaDataMiner | d136a40b024b3611a8a88371b4a47a673c782180 | [
"MIT"
] | 2 | 2018-03-16T23:05:51.000Z | 2021-08-05T03:23:44.000Z | ludopediaAnuncios.py | christianbobsin/LudopediaDataMiner | d136a40b024b3611a8a88371b4a47a673c782180 | [
"MIT"
] | null | null | null | ludopediaAnuncios.py | christianbobsin/LudopediaDataMiner | d136a40b024b3611a8a88371b4a47a673c782180 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from lxml import html
from time import sleep
from datetime import datetime
import requests
import os
import sqlite3
import sys
# No terminal usar ~: python ludopedia.py [idIni] [regs]
# por ex. ~: python ludopedia.py 451 3000
con = sqlite3.connect('ludopedia.db')
cursor = con.cursor()
cursor.... | 28.676471 | 223 | 0.570256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,564 | 0.525949 |
b449d07b5e029400778e8d16d3a55f2ee36130ff | 18,334 | py | Python | midterm/yolo_utils.py | ClarkBrun/emotic | ea4c1d846ac8aa18a902c0e68fb6e5dc5e1ae2d1 | [
"MIT"
] | null | null | null | midterm/yolo_utils.py | ClarkBrun/emotic | ea4c1d846ac8aa18a902c0e68fb6e5dc5e1ae2d1 | [
"MIT"
] | null | null | null | midterm/yolo_utils.py | ClarkBrun/emotic | ea4c1d846ac8aa18a902c0e68fb6e5dc5e1ae2d1 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
def to_cpu(tensor):
return tensor.detach().cpu()
def xywh2xyxy(x):
''' Convert bounding box from [x, y, w, h] to [x1, y1, x2, y2]
:param x: bounding boxes array
:return: Converted bounding box array
'... | 37.038384 | 115 | 0.678412 | 9,443 | 0.515054 | 0 | 0 | 0 | 0 | 0 | 0 | 4,020 | 0.219265 |
b44ac7b8e26906825e3b89cdfb277cf731bbe790 | 5,557 | py | Python | pytracking-master/ltr/train_settings/bbreg/atom.py | wsumel/AMMC | ef101878b4a97f07984186ea09146348c0526fa6 | [
"Apache-2.0"
] | 3 | 2021-12-02T11:34:37.000Z | 2021-12-19T09:30:10.000Z | pytracking-master/ltr/train_settings/bbreg/atom.py | wsumel/AMMC | ef101878b4a97f07984186ea09146348c0526fa6 | [
"Apache-2.0"
] | null | null | null | pytracking-master/ltr/train_settings/bbreg/atom.py | wsumel/AMMC | ef101878b4a97f07984186ea09146348c0526fa6 | [
"Apache-2.0"
] | null | null | null | import torch.nn as nn
import torch.optim as optim
from ltr.dataset import Lasot, TrackingNet, MSCOCOSeq, Got10k
from ltr.data import processing, sampler, LTRLoader
import ltr.models.bbreg.atom as atom_models
from ltr import actors
from ltr.trainers import LTRTrainer
import ltr.data.transforms as tfm
def run(settings)... | 55.57 | 133 | 0.638114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,250 | 0.22478 |
b44b2dc4ce40901657329bbb40489909361c416f | 281 | py | Python | exercise 8.6.py | tuyanyang/python_exercise | c1027c2451d7f3c0fd00152a5430386d930ef9ef | [
"Apache-2.0"
] | null | null | null | exercise 8.6.py | tuyanyang/python_exercise | c1027c2451d7f3c0fd00152a5430386d930ef9ef | [
"Apache-2.0"
] | null | null | null | exercise 8.6.py | tuyanyang/python_exercise | c1027c2451d7f3c0fd00152a5430386d930ef9ef | [
"Apache-2.0"
] | null | null | null | nums = list()
while True:
nStr = input('Enter a number: ')
try:
if nStr == 'done':
break
n = float(nStr)
nums.append(n)
except:
print('Invalid input')
continue
print('Maximum: ',max(nums))
print('Minimum: ',min(nums)) | 21.615385 | 36 | 0.519573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.217082 |
b44cdf1520f9983049c66891c92f13dc5a062fff | 5,899 | py | Python | gui/activity_list.py | keremkoseoglu/Kifu | bed7a15f71e2345c654b1adab07a5edecdbae342 | [
"MIT"
] | null | null | null | gui/activity_list.py | keremkoseoglu/Kifu | bed7a15f71e2345c654b1adab07a5edecdbae342 | [
"MIT"
] | 82 | 2020-06-25T09:45:01.000Z | 2022-03-31T09:35:31.000Z | gui/activity_list.py | keremkoseoglu/Kifu | bed7a15f71e2345c654b1adab07a5edecdbae342 | [
"MIT"
] | null | null | null | """ Activity list window """
import tkinter
import tkinter.ttk
from model import activity, invoice
from model.activity import Activity
from model.company import Company
from gui.activity import ActivityWindow
from gui.activity_split import ActivitySplit
from gui.invoice import InvoiceWindow
from gui.popup_file import p... | 34.098266 | 97 | 0.66418 | 5,447 | 0.923377 | 0 | 0 | 525 | 0.088998 | 0 | 0 | 369 | 0.062553 |
b44e0121e131edfd41c92b9e516f42e320c6b70f | 3,551 | py | Python | src/cactus/shared/commonTest.py | thiagogenez/cactus | 910234eb8bafca33e6a219079c8d988b6f43bc59 | [
"MIT-0"
] | 209 | 2016-11-12T14:16:50.000Z | 2022-03-30T04:44:11.000Z | src/cactus/shared/commonTest.py | thiagogenez/cactus | 910234eb8bafca33e6a219079c8d988b6f43bc59 | [
"MIT-0"
] | 468 | 2016-11-06T01:16:43.000Z | 2022-03-31T16:24:37.000Z | src/cactus/shared/commonTest.py | thiagogenez/cactus | 910234eb8bafca33e6a219079c8d988b6f43bc59 | [
"MIT-0"
] | 75 | 2017-03-09T22:19:27.000Z | 2022-03-14T22:03:33.000Z | import os
import shutil
import unittest
from base64 import b64encode
from sonLib.bioio import TestStatus
from sonLib.bioio import getTempFile
from sonLib.bioio import getTempDirectory
from sonLib.bioio import system
from toil.job import Job
from toil.common import Toil
from cactus.shared.common import cactus_call, Chi... | 34.475728 | 84 | 0.619825 | 3,167 | 0.891861 | 0 | 0 | 2,088 | 0.588003 | 0 | 0 | 561 | 0.157984 |
b44e0a41d16e0ba8bfc1be48250cce3e7506e1d1 | 7,185 | py | Python | porespy/networks/__getnet__.py | hfathian/porespy | 8747e675ba8e6410d8448492c70f6911e0eb816a | [
"MIT"
] | 3 | 2020-09-02T20:02:55.000Z | 2021-07-09T03:50:49.000Z | porespy/networks/__getnet__.py | hfathian/porespy | 8747e675ba8e6410d8448492c70f6911e0eb816a | [
"MIT"
] | null | null | null | porespy/networks/__getnet__.py | hfathian/porespy | 8747e675ba8e6410d8448492c70f6911e0eb816a | [
"MIT"
] | null | null | null | import sys
import numpy as np
import openpnm as op
from tqdm import tqdm
import scipy.ndimage as spim
from porespy.tools import extend_slice
import openpnm.models.geometry as op_gm
def regions_to_network(im, dt=None, voxel_size=1):
r"""
Analyzes an image that has been partitioned into pore regions and extract... | 43.545455 | 83 | 0.622825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,433 | 0.338622 |
b44ef5d465bb9fde348df90c5e65dba1ad7814be | 67,560 | py | Python | pandas/core/internals.py | lodagro/pandas | dfcf74679a273395cc9d7b3db78a1fbbc17c4f57 | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/internals.py | lodagro/pandas | dfcf74679a273395cc9d7b3db78a1fbbc17c4f57 | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/internals.py | lodagro/pandas | dfcf74679a273395cc9d7b3db78a1fbbc17c4f57 | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | import itertools
from datetime import datetime
from numpy import nan
import numpy as np
from pandas.core.common import _possibly_downcast_to_dtype, isnull
from pandas.core.index import Index, MultiIndex, _ensure_index, _handle_legacy_indexes
from pandas.core.indexing import _check_slice_bounds, _maybe_convert_indices... | 33.004397 | 120 | 0.574571 | 57,414 | 0.849822 | 718 | 0.010628 | 2,283 | 0.033792 | 0 | 0 | 11,310 | 0.167407 |
b44f004ae7c6b3eb8725a6532e9b3868344a526e | 4,919 | py | Python | Sketches/MH/PipeBuilder/BuildViewer.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 12 | 2015-10-20T10:22:01.000Z | 2021-07-19T10:09:44.000Z | Sketches/MH/PipeBuilder/BuildViewer.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 2 | 2015-10-20T10:22:55.000Z | 2017-02-13T11:05:25.000Z | Sketches/MH/PipeBuilder/BuildViewer.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 6 | 2015-03-09T12:51:59.000Z | 2020-03-01T13:06:21.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Ve... | 36.708955 | 121 | 0.551332 | 3,211 | 0.652775 | 2,158 | 0.438707 | 0 | 0 | 0 | 0 | 2,134 | 0.433828 |
b44f498d26d9dd58f69d6d12b6ff289ae252ed43 | 2,076 | py | Python | examples/exp_example.py | physimals/avb | 16663a935de35e4042c77000ea47abd7e5cd16ad | [
"Apache-2.0"
] | null | null | null | examples/exp_example.py | physimals/avb | 16663a935de35e4042c77000ea47abd7e5cd16ad | [
"Apache-2.0"
] | null | null | null | examples/exp_example.py | physimals/avb | 16663a935de35e4042c77000ea47abd7e5cd16ad | [
"Apache-2.0"
] | null | null | null | """
Example of usage of the AVB framework to infer a single exponential decay
model.
This uses the Python classes directly to infer the parameters for a single
instance of noisy data constructed as a Numpy array.
"""
import sys
import logging
import numpy as np
from vaby_avb import Avb
import vaby
# Uncomment line ... | 33.483871 | 167 | 0.750482 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,201 | 0.578516 |
b44ff9fd50fe2d54276ded1d327434e0e7c23eab | 282 | py | Python | tests/test_classes/users.py | dialogs/python-bot-sdk | 737152e5ef8406af0b22600ef7cefa78da9035e8 | [
"Apache-2.0"
] | 9 | 2019-01-22T09:59:12.000Z | 2021-05-08T10:59:00.000Z | tests/test_classes/users.py | dialogs/python-bot-sdk | 737152e5ef8406af0b22600ef7cefa78da9035e8 | [
"Apache-2.0"
] | 29 | 2018-10-08T17:10:49.000Z | 2021-04-28T18:46:30.000Z | tests/test_classes/users.py | dialogs/python-bot-sdk | 737152e5ef8406af0b22600ef7cefa78da9035e8 | [
"Apache-2.0"
] | 8 | 2019-01-22T09:49:32.000Z | 2022-01-26T18:55:52.000Z | from dialog_api.users_pb2 import RequestLoadFullUsers, ResponseLoadFullUsers, FullUser
class Users:
def LoadFullUsers(self, request: RequestLoadFullUsers) -> ResponseLoadFullUsers:
return ResponseLoadFullUsers(full_users=[FullUser(id=1, contact_info=[], about=None)])
| 40.285714 | 94 | 0.797872 | 192 | 0.680851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b45067ac1c187f969ca36977c34f99d5b3112b27 | 3,965 | py | Python | aws_marketplace/creating_marketplace_products/src/training_specification.py | jerrypeng7773/amazon-sagemaker-examples | c5ddecce1f739a345465b9a38b064983a129141d | [
"Apache-2.0"
] | 2,610 | 2020-10-01T14:14:53.000Z | 2022-03-31T18:02:31.000Z | aws_marketplace/creating_marketplace_products/src/training_specification.py | jerrypeng7773/amazon-sagemaker-examples | c5ddecce1f739a345465b9a38b064983a129141d | [
"Apache-2.0"
] | 1,959 | 2020-09-30T20:22:42.000Z | 2022-03-31T23:58:37.000Z | aws_marketplace/creating_marketplace_products/src/training_specification.py | jerrypeng7773/amazon-sagemaker-examples | c5ddecce1f739a345465b9a38b064983a129141d | [
"Apache-2.0"
] | 2,052 | 2020-09-30T22:11:46.000Z | 2022-03-31T23:02:51.000Z | import json
class TrainingSpecification:
template = """
{
"TrainingSpecification": {
"TrainingImage": "IMAGE_REPLACE_ME",
"SupportedHyperParameters": [
{
"Description": "Grow a tree with max_leaf_nodes in best-first fashion. Best nodes are defined as relative reduction in impu... | 30.5 | 186 | 0.54174 | 3,950 | 0.996217 | 0 | 0 | 1,029 | 0.259521 | 0 | 0 | 1,556 | 0.392434 |
b450cdc3b9ccbf44259b53088cde193f44fcd78c | 483 | py | Python | Exercises1_12/R-1.12.py | opnsesame/Data-Structures-and-Algorithms-Exercises | 62f4066c6370225a41295ecb08e05258b08f6d7e | [
"Apache-2.0"
] | null | null | null | Exercises1_12/R-1.12.py | opnsesame/Data-Structures-and-Algorithms-Exercises | 62f4066c6370225a41295ecb08e05258b08f6d7e | [
"Apache-2.0"
] | null | null | null | Exercises1_12/R-1.12.py | opnsesame/Data-Structures-and-Algorithms-Exercises | 62f4066c6370225a41295ecb08e05258b08f6d7e | [
"Apache-2.0"
] | null | null | null | #Python's random module includes a function choice(data) that returns a
#random element from a non-empty sequence. The random modul includes a
#more basic function randrange,with parameterization similar to the
#built-in range function , that return a random choice from the given
#range.Using only the randrange func... | 48.3 | 72 | 0.78882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 372 | 0.770186 |
b45291fae69314faf72f4230d287a0ca6f8e5cfe | 10,093 | py | Python | database/mongo_connector.py | timburbank/openrvdas | ba77d3958075abd21ff94a396e4a97879962ac0c | [
"BSD-2-Clause"
] | 1 | 2020-06-29T17:25:44.000Z | 2020-06-29T17:25:44.000Z | database/mongo_connector.py | timburbank/openrvdas | ba77d3958075abd21ff94a396e4a97879962ac0c | [
"BSD-2-Clause"
] | null | null | null | database/mongo_connector.py | timburbank/openrvdas | ba77d3958075abd21ff94a396e4a97879962ac0c | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Tables:
data: pk timestamp field_name field_value source_record
We don't know what type each value will have, so have a column for
int, float, str and bool and leave all but the appropriate value type
NULL. Docs claim that NULL values take no space, so...
Still so many ways we could make ... | 31.442368 | 93 | 0.618548 | 8,838 | 0.875656 | 0 | 0 | 0 | 0 | 0 | 0 | 5,546 | 0.54949 |
b4532acfa1818a77c2c7b5bc9830fae6dbfa670b | 10,204 | py | Python | ElectricRoute/flask_auth_app/project/__init__.py | luciatomainodelacr/TFM | dd989ba18e22d71f6c9c03e16b71110c7c23a9a8 | [
"MIT"
] | 1 | 2021-05-26T15:45:06.000Z | 2021-05-26T15:45:06.000Z | ElectricRoute/flask_auth_app/project/__init__.py | luciatomainodelacr/TFM | dd989ba18e22d71f6c9c03e16b71110c7c23a9a8 | [
"MIT"
] | null | null | null | ElectricRoute/flask_auth_app/project/__init__.py | luciatomainodelacr/TFM | dd989ba18e22d71f6c9c03e16b71110c7c23a9a8 | [
"MIT"
] | 5 | 2021-03-07T19:20:26.000Z | 2021-04-11T18:26:12.000Z | # =============================================================================
# Inicialización de la aplicación: __init__.py
# =============================================================================
"""
Este archivo tendrá la función de crear la aplicación, que iniciará la base de
datos y registrará los molo... | 129.164557 | 6,108 | 0.130243 | 0 | 0 | 0 | 0 | 220 | 0.021539 | 0 | 0 | 1,223 | 0.119738 |
b4533a5f5cb54cabae74aca99fd6222059d74d85 | 1,822 | py | Python | benchmarks/cifar10/benchmark_sample_creator.py | aarati-K/one-access | 928788a8729770c665cb94db6891dfaf4f32d1fc | [
"MIT"
] | null | null | null | benchmarks/cifar10/benchmark_sample_creator.py | aarati-K/one-access | 928788a8729770c665cb94db6891dfaf4f32d1fc | [
"MIT"
] | 12 | 2018-12-01T23:30:20.000Z | 2018-12-19T02:56:34.000Z | benchmarks/cifar10/benchmark_sample_creator.py | aarati-K/one-access | 928788a8729770c665cb94db6891dfaf4f32d1fc | [
"MIT"
] | null | null | null | from store.cifar10 import Cifar10
import torchvision.transforms as transforms
import time
import matplotlib.pyplot as plt
batch_size = 1
rel_sample_size = 10000
ds = Cifar10(input_data_folder="/home/aarati/datasets/cifar-10-batches-py", \
max_batches=2, batch_size=batch_size, rel_sample_size=rel_sample_size, \
... | 36.44 | 125 | 0.660263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,242 | 0.681668 |
b4544908bc703c4da565a916d491bf32413a078b | 1,095 | py | Python | beet/contrib/render.py | Arcensoth/beet | 8a20a6fbee8724d8c26fe7e9ade68dffa57406bd | [
"MIT"
] | 46 | 2021-03-09T23:34:52.000Z | 2022-03-08T01:30:04.000Z | beet/contrib/render.py | Arcensoth/beet | 8a20a6fbee8724d8c26fe7e9ade68dffa57406bd | [
"MIT"
] | 127 | 2021-02-24T00:41:44.000Z | 2022-03-31T05:14:31.000Z | beet/contrib/render.py | Arcensoth/beet | 8a20a6fbee8724d8c26fe7e9ade68dffa57406bd | [
"MIT"
] | 9 | 2021-03-11T18:18:28.000Z | 2022-03-11T20:32:01.000Z | """Plugin that invokes the built-in template renderer."""
__all__ = [
"RenderOptions",
"render",
]
from typing import Dict, List
from pydantic import BaseModel
from beet import Context, configurable
class RenderOptions(BaseModel):
resource_pack: Dict[str, List[str]] = {}
data_pack: Dict[str, Lis... | 26.707317 | 79 | 0.630137 | 117 | 0.106849 | 0 | 0 | 701 | 0.640183 | 0 | 0 | 189 | 0.172603 |
b45497bfff55851d8e2cfb1521b54e7ce3939306 | 15,269 | py | Python | customtkinter/customtkinter_progressbar.py | thisSELFmySELF/CustomTkinter | 9edb25d6c4604300641212fe664097d71ed12d0c | [
"CC0-1.0"
] | 1 | 2022-02-20T12:05:08.000Z | 2022-02-20T12:05:08.000Z | customtkinter/customtkinter_progressbar.py | thisSELFmySELF/CustomTkinter | 9edb25d6c4604300641212fe664097d71ed12d0c | [
"CC0-1.0"
] | null | null | null | customtkinter/customtkinter_progressbar.py | thisSELFmySELF/CustomTkinter | 9edb25d6c4604300641212fe664097d71ed12d0c | [
"CC0-1.0"
] | null | null | null | import sys
import tkinter
from .customtkinter_tk import CTk
from .customtkinter_frame import CTkFrame
from .appearance_mode_tracker import AppearanceModeTracker
from .customtkinter_color_manager import CTkColorManager
class CTkProgressBar(tkinter.Frame):
""" tkinter custom progressbar, always horizontal, values ... | 46.551829 | 150 | 0.568276 | 15,047 | 0.985461 | 0 | 0 | 475 | 0.031109 | 0 | 0 | 2,471 | 0.161831 |
b45613d6f68d15fc7e95c155cc5ae42470c0d2ab | 694 | py | Python | backtest/tests/test_strategy.py | Christakou/backtest | fa97f50b36a1d56fe667250169ed50a8d9121c3c | [
"MIT"
] | null | null | null | backtest/tests/test_strategy.py | Christakou/backtest | fa97f50b36a1d56fe667250169ed50a8d9121c3c | [
"MIT"
] | null | null | null | backtest/tests/test_strategy.py | Christakou/backtest | fa97f50b36a1d56fe667250169ed50a8d9121c3c | [
"MIT"
] | null | null | null | import pytest
from backtest.strategy import BuyAndHoldEqualAllocation
@pytest.fixture
def strategy():
symbols = ('AAPL', 'GOOG')
strategy = BuyAndHoldEqualAllocation(relevant_symbols=symbols)
return strategy
def test_strategy_execute(strategy):
strategy.execute()
assert len(strategy.holdings) > 0... | 33.047619 | 79 | 0.698847 | 0 | 0 | 0 | 0 | 149 | 0.214697 | 0 | 0 | 90 | 0.129683 |
b4561bfc43f0bcb4bcb4c7719b19ceba05dfa31d | 853 | py | Python | onnx/backend/test/case/node/constant.py | stillmatic/onnx | 8d5eb62d5299f6dcb6ac787f0ea8e6cf5b8331a7 | [
"Apache-2.0"
] | null | null | null | onnx/backend/test/case/node/constant.py | stillmatic/onnx | 8d5eb62d5299f6dcb6ac787f0ea8e6cf5b8331a7 | [
"Apache-2.0"
] | null | null | null | onnx/backend/test/case/node/constant.py | stillmatic/onnx | 8d5eb62d5299f6dcb6ac787f0ea8e6cf5b8331a7 | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
import onnx
from ..base import Base
from . import expect
class Constant(Base):
@staticmethod
def exp... | 25.088235 | 57 | 0.601407 | 584 | 0.684642 | 0 | 0 | 557 | 0.652989 | 0 | 0 | 102 | 0.119578 |
b4566ae71e0167b9625fba644e2226d4778cf90a | 4,337 | py | Python | nvd3/multiChart.py | areski/python-nvd3 | 1890ad28e13f9a35d8b338817ef161720576538b | [
"MIT"
] | 442 | 2015-01-12T10:13:52.000Z | 2022-01-11T15:18:48.000Z | nvd3/multiChart.py | areski/python-nvd3 | 1890ad28e13f9a35d8b338817ef161720576538b | [
"MIT"
] | 106 | 2015-01-11T20:27:50.000Z | 2021-11-05T17:18:15.000Z | nvd3/multiChart.py | areski/python-nvd3 | 1890ad28e13f9a35d8b338817ef161720576538b | [
"MIT"
] | 161 | 2015-01-06T13:31:18.000Z | 2022-03-09T05:22:30.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Python-nvd3 is a Python wrapper for NVD3 graph library.
NVD3 is an attempt to build re-usable charts and chart components
for d3.js without taking away the power that d3.js gives you.
Project location : https://github.com/areski/python-nvd3
"""
from .NVD3Chart import NVD... | 34.975806 | 142 | 0.537929 | 3,992 | 0.920452 | 0 | 0 | 0 | 0 | 0 | 0 | 3,022 | 0.696795 |
b456f67dd7f5c131a9b03642b6c76bf26ca01173 | 4,114 | py | Python | utils/config.py | AlbertiPot/nar | eb081f0e1ee16c2b1eb5e6e2afd41254cd7dce28 | [
"BSD-3-Clause"
] | 2 | 2022-02-08T06:45:41.000Z | 2022-02-09T03:49:54.000Z | utils/config.py | AlbertiPot/nar | eb081f0e1ee16c2b1eb5e6e2afd41254cd7dce28 | [
"BSD-3-Clause"
] | null | null | null | utils/config.py | AlbertiPot/nar | eb081f0e1ee16c2b1eb5e6e2afd41254cd7dce28 | [
"BSD-3-Clause"
] | null | null | null | """
Date: 2021/09/23
Target: config utilities for yml file.
implementation adapted from Slimmable: https://github.com/JiahuiYu/slimmable_networks.git
"""
import os
import yaml
class LoaderMeta(type):
"""
Constructor for supporting `!include`.
"""
def __new__(mcs, __name__, __bases__, __dict__):
... | 33.177419 | 89 | 0.528439 | 3,784 | 0.919786 | 0 | 0 | 0 | 0 | 0 | 0 | 721 | 0.175255 |
b457086f7edbfe9899dbbd18e732ac94f61af7c3 | 2,798 | py | Python | src/api/fundings/entities.py | cbn-alpin/gefiproj-api | 35e3f00dd71bcdd9ad751307ac379aa78d1545cf | [
"MIT"
] | 2 | 2020-10-15T15:16:08.000Z | 2020-11-06T10:41:13.000Z | src/api/fundings/entities.py | cbn-alpin/gefiproj-api | 35e3f00dd71bcdd9ad751307ac379aa78d1545cf | [
"MIT"
] | 1 | 2020-11-14T19:40:14.000Z | 2020-11-14T19:40:14.000Z | src/api/fundings/entities.py | cbn-alpin/gefiproj-api | 35e3f00dd71bcdd9ad751307ac379aa78d1545cf | [
"MIT"
] | null | null | null | from marshmallow import Schema, fields, validate
from sqlalchemy import Column, String, Integer, Float, Date, ForeignKey
from sqlalchemy.orm import relationship
from ..funders.entities import Funder, FunderSchema
from src.api import db
from src.shared.entity import Base
class Funding(Base, db.Model):
__tablename... | 43.046154 | 111 | 0.723016 | 2,521 | 0.901001 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.057184 |
b4572258e2d4b6f3324edd66303f6bcb5c6923f1 | 2,817 | py | Python | src/extensions/COMMANDS/CommitCommand.py | DMTF/python-redfish-utility | 4e084d47152aeaede576b32252a38b7dc4525dcb | [
"BSD-3-Clause"
] | 15 | 2017-01-20T02:25:05.000Z | 2022-03-26T17:42:47.000Z | src/extensions/COMMANDS/CommitCommand.py | DMTF/python-redfish-utility | 4e084d47152aeaede576b32252a38b7dc4525dcb | [
"BSD-3-Clause"
] | 5 | 2017-05-11T17:07:26.000Z | 2018-08-03T18:08:27.000Z | src/extensions/COMMANDS/CommitCommand.py | DMTF/python-redfish-utility | 4e084d47152aeaede576b32252a38b7dc4525dcb | [
"BSD-3-Clause"
] | 11 | 2017-01-24T22:50:20.000Z | 2022-03-22T18:40:31.000Z | ###
# Copyright Notice:
# Copyright 2016 Distributed Management Task Force, Inc. All rights reserved.
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/python-redfish-utility/blob/master/LICENSE.md
###
""" Commit Command for RDMC """
import sys
from optparse import OptionPars... | 33.535714 | 127 | 0.587504 | 2,289 | 0.812567 | 0 | 0 | 0 | 0 | 0 | 0 | 1,096 | 0.389066 |
b4576da0f0a8dc0e5c329b27142e2588b0fb6f46 | 16,721 | py | Python | rosetta/views.py | evrenesat/ganihomes | eece2d8d957989b176cc5a36d723f676862f8d17 | [
"BSD-2-Clause"
] | 24 | 2016-08-06T18:10:54.000Z | 2022-03-04T11:47:39.000Z | rosetta/views.py | evrenesat/ganihomes | eece2d8d957989b176cc5a36d723f676862f8d17 | [
"BSD-2-Clause"
] | 1 | 2017-03-28T02:36:50.000Z | 2017-03-28T07:18:57.000Z | rosetta/views.py | evrenesat/ganihomes | eece2d8d957989b176cc5a36d723f676862f8d17 | [
"BSD-2-Clause"
] | 13 | 2017-03-28T02:35:32.000Z | 2022-02-21T23:36:15.000Z | from django.conf import settings
from django.contrib.auth.decorators import user_passes_test
from django.core.paginator import Paginator
from django.core.urlresolvers import reverse
from django.http import Http404, HttpResponseRedirect, HttpResponse
from django.shortcuts import render_to_response
from django.template i... | 46.190608 | 227 | 0.609832 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,721 | 0.16273 |
b457b3b9a529a0063b2e3929017b0f26c1b32684 | 937 | py | Python | examples/experiment_pulse.py | HySynth/HySynth | b33b34ff5db138b5d007d0dcd32d53c9f8964b62 | [
"MIT"
] | 4 | 2021-03-05T11:18:35.000Z | 2021-12-09T18:51:32.000Z | examples/experiment_pulse.py | HySynth/HySynth | b33b34ff5db138b5d007d0dcd32d53c9f8964b62 | [
"MIT"
] | null | null | null | examples/experiment_pulse.py | HySynth/HySynth | b33b34ff5db138b5d007d0dcd32d53c9f8964b62 | [
"MIT"
] | null | null | null | # to run this, add code from experiments_HSCC2021.py
def time_series_pulse():
path = Path(__file__).parent.parent / "data" / "real_data" / "datasets" / "basic_data"
filename1 = path / "pulse1-1.csv"
filename2 = path / "pulse1-2.csv"
filename3 = path / "pulse1-3.csv"
f1 = load_time_series(filename1,... | 32.310345 | 111 | 0.692636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.141942 |
b458e08685ebc8210a2ffae585d421bdf6eef379 | 13,813 | py | Python | ironic/drivers/modules/drac/management.py | Tehsmash/ironic | a34c351639e960af92a3608fbc9249dfce5c6057 | [
"Apache-2.0"
] | null | null | null | ironic/drivers/modules/drac/management.py | Tehsmash/ironic | a34c351639e960af92a3608fbc9249dfce5c6057 | [
"Apache-2.0"
] | null | null | null | ironic/drivers/modules/drac/management.py | Tehsmash/ironic | a34c351639e960af92a3608fbc9249dfce5c6057 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2014 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | 42.371166 | 79 | 0.625136 | 6,735 | 0.487584 | 0 | 0 | 0 | 0 | 0 | 0 | 6,619 | 0.479186 |
b45b0dfbed15df61de3d9471a3707d66d6c2d4b9 | 2,037 | py | Python | matrix_diagonalization/finite_barrier_square_well.py | coherent17/physics_calculation | cf94813778984f62b2c65174fb44bebb2e9c0d05 | [
"MIT"
] | 1 | 2021-12-30T01:11:30.000Z | 2021-12-30T01:11:30.000Z | matrix_diagonalization/finite_barrier_square_well.py | coherent17/physics_calculation | cf94813778984f62b2c65174fb44bebb2e9c0d05 | [
"MIT"
] | null | null | null | matrix_diagonalization/finite_barrier_square_well.py | coherent17/physics_calculation | cf94813778984f62b2c65174fb44bebb2e9c0d05 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
#grid number on half space (without the origin)
N=150
#total grid number = 2*N + 1 (with origin)
N_g=2*N+1
#finite barrier potential value = 300 (meV)
potential_value=300
#building potential:
def potential(potential_value):
V=np.zeros((1,N_g),dtype=float)
V[0... | 25.78481 | 64 | 0.661757 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 588 | 0.287531 |
b45b6c7e93b004510cd39ca579e1ae1a135f82e4 | 30 | py | Python | SVDD/__init__.py | SolidusAbi/SVDD-Python | ce2b834bf31cfdbbbebc08c8a1bac8c37b081d0e | [
"MIT"
] | null | null | null | SVDD/__init__.py | SolidusAbi/SVDD-Python | ce2b834bf31cfdbbbebc08c8a1bac8c37b081d0e | [
"MIT"
] | null | null | null | SVDD/__init__.py | SolidusAbi/SVDD-Python | ce2b834bf31cfdbbbebc08c8a1bac8c37b081d0e | [
"MIT"
] | null | null | null | from .BaseSVDD import BaseSVDD | 30 | 30 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b45bc4fbd6c30a7f20f9e98d80b94da630c9831f | 739 | py | Python | setup.py | SteveLTN/iex-api-python | f2c5c8f461ee22d7fc58bc335e397454de4cee7e | [
"MIT"
] | null | null | null | setup.py | SteveLTN/iex-api-python | f2c5c8f461ee22d7fc58bc335e397454de4cee7e | [
"MIT"
] | null | null | null | setup.py | SteveLTN/iex-api-python | f2c5c8f461ee22d7fc58bc335e397454de4cee7e | [
"MIT"
] | null | null | null | import setuptools
import glob
import os
required = [
"requests",
"pandas",
"arrow",
"socketIO-client-nexus"
]
setuptools.setup(name='iex-api-python',
version="0.0.5",
description='Fetch data from the IEX API',
long_description=open('README.md').read()... | 30.791667 | 86 | 0.525034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 265 | 0.358593 |
b45ee2f14f2b2080d0f96be546d04753ee6aacf6 | 3,825 | py | Python | src/models/train_model.py | 4c697361/e-commerce | ddf88ec2c3f020bce129195452dfa9b03fb285d4 | [
"MIT"
] | 3 | 2020-01-01T06:36:38.000Z | 2020-12-08T02:57:33.000Z | src/models/train_model.py | L2Data/e-commerce | ddf88ec2c3f020bce129195452dfa9b03fb285d4 | [
"MIT"
] | null | null | null | src/models/train_model.py | L2Data/e-commerce | ddf88ec2c3f020bce129195452dfa9b03fb285d4 | [
"MIT"
] | 3 | 2020-02-28T01:22:07.000Z | 2020-07-19T13:38:59.000Z | import os
import click
import logging
from pathlib import Path
from dotenv import find_dotenv, load_dotenv
from keras.callbacks import ModelCheckpoint, EarlyStopping
import src.utils.utils as ut
import src.utils.model_utils as mu
import src.models.model as md
import src.models.data_generator as dg
import src.data.da... | 39.43299 | 88 | 0.536209 | 0 | 0 | 0 | 0 | 1,118 | 0.292288 | 0 | 0 | 499 | 0.130458 |
b45f1b6d99b2cd670602d4dd9541964dcf882b2c | 3,412 | py | Python | Jobs/pm_match.py | Shantanu48114860/DPN-SA | 43ffedf26a950563e029954b7bb87ce5b4f7bc55 | [
"MIT"
] | 2 | 2021-02-18T04:21:34.000Z | 2022-03-09T11:16:17.000Z | Jobs/pm_match.py | Shantanu48114860/DPN-SA | 43ffedf26a950563e029954b7bb87ce5b4f7bc55 | [
"MIT"
] | null | null | null | Jobs/pm_match.py | Shantanu48114860/DPN-SA | 43ffedf26a950563e029954b7bb87ce5b4f7bc55 | [
"MIT"
] | 1 | 2020-12-13T08:32:04.000Z | 2020-12-13T08:32:04.000Z | """
MIT License
Copyright (c) 2020 Shantanu Ghosh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish... | 33.45098 | 96 | 0.750586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,592 | 0.466589 |
b45fb7ad9c5a50822623857ace28d82c3b6d8f02 | 15,182 | py | Python | varcode/effects/effect_prediction.py | openvax/varcode | a51a7dd0868ef05aee4962e66a9226ab70935a3d | [
"Apache-2.0"
] | 39 | 2018-01-12T20:58:43.000Z | 2022-03-18T04:54:16.000Z | varcode/effects/effect_prediction.py | hammerlab/varcode | a51a7dd0868ef05aee4962e66a9226ab70935a3d | [
"Apache-2.0"
] | 217 | 2015-01-02T19:04:02.000Z | 2017-09-09T23:21:15.000Z | varcode/effects/effect_prediction.py | openvax/varcode | a51a7dd0868ef05aee4962e66a9226ab70935a3d | [
"Apache-2.0"
] | 18 | 2018-02-06T13:32:44.000Z | 2022-02-28T04:49:20.000Z | # Copyright (c) 2016-2019. Mount Sinai School of Medicine
#
# 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 ... | 37.210784 | 85 | 0.652022 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,168 | 0.340403 |
b46021d4ffc65a61c7d142b7d9d9cca8ff758a1a | 8,244 | py | Python | configs.py | platonic-realm/UM-PDD | 747171ec3d87e54fb70a2cf4472b8da9fbd2f67b | [
"MIT"
] | null | null | null | configs.py | platonic-realm/UM-PDD | 747171ec3d87e54fb70a2cf4472b8da9fbd2f67b | [
"MIT"
] | null | null | null | configs.py | platonic-realm/UM-PDD | 747171ec3d87e54fb70a2cf4472b8da9fbd2f67b | [
"MIT"
] | 1 | 2021-06-13T22:41:23.000Z | 2021-06-13T22:41:23.000Z | # OS-Level Imports
import os
import sys
import multiprocessing
from multiprocessing import cpu_count
# Library Imports
import tensorflow as tf
from tensorflow.keras import mixed_precision
from tensorflow.python.distribute.distribute_lib import Strategy
# Internal Imports
from Utils.enums import Environme... | 36.96861 | 99 | 0.589034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,458 | 0.298156 |
b4605592d622fde2874b27f05a1e575beae84ca9 | 136 | py | Python | Legacy/Audit_Sweep/daily_audit_cron.py | QualiSystemsLab/Power-Management | f90f5971d80f17f45c8ac3f43ff93c0071572dd0 | [
"Apache-2.0"
] | null | null | null | Legacy/Audit_Sweep/daily_audit_cron.py | QualiSystemsLab/Power-Management | f90f5971d80f17f45c8ac3f43ff93c0071572dd0 | [
"Apache-2.0"
] | null | null | null | Legacy/Audit_Sweep/daily_audit_cron.py | QualiSystemsLab/Power-Management | f90f5971d80f17f45c8ac3f43ff93c0071572dd0 | [
"Apache-2.0"
] | null | null | null | from power_audit import PowerAudit
def main():
local = PowerAudit()
local.full_audit()
if __name__ == '__main__':
main()
| 13.6 | 34 | 0.661765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.073529 |
b4620451d250c59f2d44e900d7695fc1a4e00f84 | 258 | py | Python | python/hayate/store/actions.py | tao12345666333/Talk-Is-Cheap | 7b2c5959828b6d8bbbad8144b9b97f9b77c6b34c | [
"MIT"
] | 4 | 2016-04-14T02:11:35.000Z | 2019-05-30T10:18:41.000Z | python/hayate/store/actions.py | tao12345666333/Talk-Is-Cheap | 7b2c5959828b6d8bbbad8144b9b97f9b77c6b34c | [
"MIT"
] | 8 | 2016-07-21T16:02:17.000Z | 2021-09-23T02:49:34.000Z | python/hayate/store/actions.py | tao12345666333/Talk-Is-Cheap | 7b2c5959828b6d8bbbad8144b9b97f9b77c6b34c | [
"MIT"
] | 2 | 2017-02-17T05:02:02.000Z | 2017-11-08T12:22:09.000Z | from turbo.flux import Mutation, register, dispatch, register_dispatch
import mutation_types
@register_dispatch('user', mutation_types.INCREASE)
def increase(rank):
pass
def decrease(rank):
return dispatch('user', mutation_types.DECREASE, rank)
| 19.846154 | 70 | 0.77907 | 0 | 0 | 0 | 0 | 80 | 0.310078 | 0 | 0 | 12 | 0.046512 |