hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7620fcf40ca8ac2c72d7f34f2ed6b0553720f0af | 2,613 | py | Python | Start.py | nuti23/StudentsAssignmentsManagement | ca3cb8a6f38c31cd0544a63179691f139a02612d | [
"Apache-2.0"
] | null | null | null | Start.py | nuti23/StudentsAssignmentsManagement | ca3cb8a6f38c31cd0544a63179691f139a02612d | [
"Apache-2.0"
] | null | null | null | Start.py | nuti23/StudentsAssignmentsManagement | ca3cb8a6f38c31cd0544a63179691f139a02612d | [
"Apache-2.0"
] | null | null | null | from Domain.student import Student
from Repository.assignment_repository import AssignmentRepository
from Repository.grade_repository import GradeRepository
from Repository.student_repository import StudentRepository
from Repository_Binary_File.assignment_repository_binary_file import AssignmentRepositoryBinaryFile
fro... | 46.660714 | 117 | 0.867585 |
762189364ae8346baa62adb5a86bb79745cc8954 | 83 | py | Python | contrib/frontends/py/nntpchan/__init__.py | majestrate/nntpchan | f92f68c3cdce4b7ce6d4121ca4356b36ebcd933f | [
"MIT"
] | 233 | 2015-08-06T02:51:52.000Z | 2022-02-14T11:29:13.000Z | contrib/frontends/py/nntpchan/__init__.py | Revivify/nntpchan | 0d555bb88a2298dae9aacf11348e34c52befa3d8 | [
"MIT"
] | 98 | 2015-09-19T22:29:00.000Z | 2021-06-12T09:43:13.000Z | contrib/frontends/py/nntpchan/__init__.py | Revivify/nntpchan | 0d555bb88a2298dae9aacf11348e34c52befa3d8 | [
"MIT"
] | 49 | 2015-08-06T02:51:55.000Z | 2020-03-11T04:23:56.000Z | #
# entry for gunicorn
#
from nntpchan.app import app
from nntpchan import viewsp
| 11.857143 | 28 | 0.771084 |
76239cf65a40116502dab08045c558ccfa503910 | 6,997 | py | Python | _unittests/ut_profiling/test_event_profiler.py | sdpython/cpyquickhelper | c2bdebad2201c7e10a5999a836bbf53e27b963c7 | [
"MIT"
] | 2 | 2017-10-03T20:39:13.000Z | 2019-02-06T15:24:04.000Z | _unittests/ut_profiling/test_event_profiler.py | sdpython/cpyquickhelper | c2bdebad2201c7e10a5999a836bbf53e27b963c7 | [
"MIT"
] | 21 | 2017-09-17T11:14:04.000Z | 2021-01-01T13:24:20.000Z | _unittests/ut_profiling/test_event_profiler.py | sdpython/cpyquickhelper | c2bdebad2201c7e10a5999a836bbf53e27b963c7 | [
"MIT"
] | null | null | null | """
@brief test log(time=3s)
"""
import unittest
import inspect
import logging
from time import sleep, perf_counter
from pyquickhelper.pycode import ExtTestCase
from cpyquickhelper.profiling import (
EventProfiler, WithEventProfiler)
from cpyquickhelper.profiling.event_profiler import EventProfilerDebug
if ... | 28.100402 | 70 | 0.523653 |
7623c8878768af2e85f14e1d898fd32819bd4a04 | 4,572 | py | Python | ionoscloud/models/s3_key_properties.py | ionos-cloud/ionos-cloud-sdk-python | 3c5804697c262898e6f6a438dc40e1b45a4bb5c9 | [
"Apache-2.0"
] | null | null | null | ionoscloud/models/s3_key_properties.py | ionos-cloud/ionos-cloud-sdk-python | 3c5804697c262898e6f6a438dc40e1b45a4bb5c9 | [
"Apache-2.0"
] | null | null | null | ionoscloud/models/s3_key_properties.py | ionos-cloud/ionos-cloud-sdk-python | 3c5804697c262898e6f6a438dc40e1b45a4bb5c9 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
CLOUD API
IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and ... | 29.496774 | 438 | 0.595801 |
76243510a1536cc8eb0c0666f32e3fd946357134 | 5,503 | py | Python | setup.py | ProjexSoftware/orb | 575be2689cb269e65a0a2678232ff940acc19e5a | [
"MIT"
] | 7 | 2016-03-30T18:15:46.000Z | 2021-02-19T14:55:01.000Z | setup.py | orb-framework/orb | 575be2689cb269e65a0a2678232ff940acc19e5a | [
"MIT"
] | 25 | 2016-02-02T20:52:35.000Z | 2017-12-12T06:14:21.000Z | setup.py | orb-framework/orb | 575be2689cb269e65a0a2678232ff940acc19e5a | [
"MIT"
] | 3 | 2015-12-30T22:27:02.000Z | 2016-08-24T22:33:42.000Z | import os
import re
import subprocess
from setuptools import setup, find_packages, Command
from setuptools.command.test import test as TestCommand
__author__ = 'Eric Hulser'
__email__ = 'eric.hulser@gmail.com'
__license__ = 'MIT'
INSTALL_REQUIRES = []
DEPENDENCY_LINKS = []
TESTS_REQUIRE = []
LONG_DESCRIPTION = ''
... | 31.445714 | 100 | 0.590405 |
762657929c6d46d8a16c4ce28a8f5a45ac78e34b | 265 | py | Python | forms.py | tecoholic/student_score_graph | d95d40953c1a93c3948db4d4f54591833e259daf | [
"MIT"
] | null | null | null | forms.py | tecoholic/student_score_graph | d95d40953c1a93c3948db4d4f54591833e259daf | [
"MIT"
] | null | null | null | forms.py | tecoholic/student_score_graph | d95d40953c1a93c3948db4d4f54591833e259daf | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired, FileAllowed
| 26.5 | 77 | 0.701887 |
7626eb1109f2f23d20860751d2db0d2df24120d5 | 6,298 | py | Python | recommendation-api/models/next_song_prediction/retrain.py | Kabeers-Network/yebrmusic | f97528fe79b4fb1c52f1c779599f67edefb3895c | [
"MIT"
] | 1 | 2021-04-28T13:23:19.000Z | 2021-04-28T13:23:19.000Z | recommendation-api/models/next_song_prediction/retrain.py | Kabeers-Network/yebrmusic | f97528fe79b4fb1c52f1c779599f67edefb3895c | [
"MIT"
] | 2 | 2021-09-07T18:12:20.000Z | 2021-09-07T18:13:35.000Z | recommendation-api/models/next_song_prediction/retrain.py | Kabeers-Network/yebrmusic | f97528fe79b4fb1c52f1c779599f67edefb3895c | [
"MIT"
] | null | null | null | import pandas as pd
from tensorflow import keras, reduce_sum, ragged, function, math, nn, reduce_mean
from os import environ
def get_data(corpus_path):
corpus = pd.read_json(environ.get("DATA_COLLECTION_HOST") + "/api/details/get-indexed-songs")
""" Save Corpus """
corpus.to_pickle(corpus_path)
prin... | 37.939759 | 119 | 0.695459 |
762736c3af383f7a5e7c51cd44492ea53e1dcb42 | 818 | py | Python | examples/example_plugin/example_plugin/tables.py | susanhooks/nautobot | bc3ef5958f0d5decb0be763342c790f26ff1e20e | [
"Apache-2.0"
] | null | null | null | examples/example_plugin/example_plugin/tables.py | susanhooks/nautobot | bc3ef5958f0d5decb0be763342c790f26ff1e20e | [
"Apache-2.0"
] | null | null | null | examples/example_plugin/example_plugin/tables.py | susanhooks/nautobot | bc3ef5958f0d5decb0be763342c790f26ff1e20e | [
"Apache-2.0"
] | null | null | null | import django_tables2 as tables
from nautobot.utilities.tables import (
BaseTable,
ButtonsColumn,
ToggleColumn,
)
from example_plugin.models import AnotherExampleModel, ExampleModel
| 24.058824 | 67 | 0.691932 |
762af3d64f2b43064fe67ca5b5b25e3229f256a7 | 555 | py | Python | pyfacebook/utils/reformat_response.py | Socian-Ltd/python-facebook-1 | e9a4f626b37541103c9534a29342ef6033c09c06 | [
"Apache-2.0"
] | null | null | null | pyfacebook/utils/reformat_response.py | Socian-Ltd/python-facebook-1 | e9a4f626b37541103c9534a29342ef6033c09c06 | [
"Apache-2.0"
] | null | null | null | pyfacebook/utils/reformat_response.py | Socian-Ltd/python-facebook-1 | e9a4f626b37541103c9534a29342ef6033c09c06 | [
"Apache-2.0"
] | 1 | 2021-08-25T05:34:14.000Z | 2021-08-25T05:34:14.000Z | import json
from typing import Optional, Union, Dict
def replace_from_keyword_in_json(
data, # type: Optional[Dict]
):
# type: (...) -> Dict
"""
Rename the 'from' field coming from the Graph API. As 'from' is a Python keyword, we cannot use this as an
attribute with 'attrs' package. So renamin... | 32.647059 | 110 | 0.688288 |
762b4b39b1252f1872ea955f30e2d93f46a6eb06 | 1,224 | py | Python | tests/test_ctparse.py | bharathi-srini/ctparse | f3b7ef1045fbbc566dc838c66d4a47de160cb38f | [
"MIT"
] | null | null | null | tests/test_ctparse.py | bharathi-srini/ctparse | f3b7ef1045fbbc566dc838c66d4a47de160cb38f | [
"MIT"
] | null | null | null | tests/test_ctparse.py | bharathi-srini/ctparse | f3b7ef1045fbbc566dc838c66d4a47de160cb38f | [
"MIT"
] | null | null | null | from unittest import TestCase
from datetime import datetime
from ctparse.ctparse import ctparse, _match_rule
from ctparse.types import Time
| 38.25 | 81 | 0.655229 |
762ecaaa1aa4b6aacfa3ef56be0e34fa5e92bb98 | 5,841 | py | Python | src/data/preprocessing/rescale_videos.py | HochulHwang/gc_test | c42e9ec3392bc02eef5e3943ec3bf79456e91bf9 | [
"MIT"
] | null | null | null | src/data/preprocessing/rescale_videos.py | HochulHwang/gc_test | c42e9ec3392bc02eef5e3943ec3bf79456e91bf9 | [
"MIT"
] | null | null | null | src/data/preprocessing/rescale_videos.py | HochulHwang/gc_test | c42e9ec3392bc02eef5e3943ec3bf79456e91bf9 | [
"MIT"
] | null | null | null | import argparse
import os
import subprocess
import time
import sys
import ipdb
import pickle
from utils.meter import *
def get_duration(file):
"""Get the duration of a super_video using ffprobe. -> https://stackoverflow.com/questions/31024968/using-ffmpeg-to-obtain-super_video-durations-in-python"""
cmd = 'f... | 38.176471 | 161 | 0.610854 |
57ff0de84d2c52561ef644349243f41fda37acf1 | 251 | py | Python | sample_linear.py | Oleg-Krivosheev/Sample-Gamma-small-alpha | 05988f8532b471305e31d8b5d0b3e027fb5d0b80 | [
"MIT"
] | null | null | null | sample_linear.py | Oleg-Krivosheev/Sample-Gamma-small-alpha | 05988f8532b471305e31d8b5d0b3e027fb5d0b80 | [
"MIT"
] | null | null | null | sample_linear.py | Oleg-Krivosheev/Sample-Gamma-small-alpha | 05988f8532b471305e31d8b5d0b3e027fb5d0b80 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import math
import random
import matplotlib.pyplot as plt
# sample from linear distribution and plot it
bins = [0.1 * i for i in range(12)]
plt.hist([(1.0 - math.sqrt(random.random())) for k in range(10000)], bins)
plt.show()
| 20.916667 | 74 | 0.705179 |
52018879c474772597c77f6c11266040f80f9146 | 43,183 | py | Python | tests/extension/thread_/mutex_try_lock/test_thread_mutex_try_lock.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | tests/extension/thread_/mutex_try_lock/test_thread_mutex_try_lock.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | tests/extension/thread_/mutex_try_lock/test_thread_mutex_try_lock.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import veriloggen
import thread_mutex_try_lock
expected_verilog = """
module test;
reg CLK;
reg RST;
blinkled
uut
(
.CLK(CLK),
.RST(RST)
);
initial begin
$dumpfile("uut.vcd");
$dumpvars(0, uut);
end
ini... | 30.889127 | 99 | 0.611931 |
5203375f63e49c0f7197865189dc9b2c34c83189 | 926 | py | Python | CardiaT/idea/models.py | nikitasingh01/CardiaT | 5e9af8d24b75e248776a102075bcd327bf7d04c9 | [
"CC0-1.0"
] | null | null | null | CardiaT/idea/models.py | nikitasingh01/CardiaT | 5e9af8d24b75e248776a102075bcd327bf7d04c9 | [
"CC0-1.0"
] | null | null | null | CardiaT/idea/models.py | nikitasingh01/CardiaT | 5e9af8d24b75e248776a102075bcd327bf7d04c9 | [
"CC0-1.0"
] | null | null | null |
from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
# class Tags(models.Model):
# tag_name= models.CharField(max_length=20)
# idea=models.ForeignKey(Idea, on_delete=models.CASCADE, related_name='tags')
# Create your models here.
| 33.071429 | 83 | 0.75378 |
5204c058c4d33af2eac0352bcb292f208d16b5bb | 416 | py | Python | sample_problems/problems_with_solution31.py | adi01trip01/adi_workspace | f493b3ba84645eec3a57607243760a826880d1a3 | [
"MIT"
] | null | null | null | sample_problems/problems_with_solution31.py | adi01trip01/adi_workspace | f493b3ba84645eec3a57607243760a826880d1a3 | [
"MIT"
] | null | null | null | sample_problems/problems_with_solution31.py | adi01trip01/adi_workspace | f493b3ba84645eec3a57607243760a826880d1a3 | [
"MIT"
] | null | null | null | # Write a Python program to compute the greatest common divisor (GCD) of two positive integers.
n1 = int(input("Enter the first number: "))
n2 = int(input("Enter the second number: "))
a1 = []
a2 = []
a3 = []
for i in range(1, n1 + 1):
if n1 % i == 0:
a1.append(i)
for i in range(1, n2 + 1):
if n2 % ... | 18.086957 | 95 | 0.564904 |
5205f2274c544946c12588cc59616bb5d26c16a2 | 2,110 | py | Python | Biological_Questions/Cell_Cycle_Duration/SuperOutliers_Plot_LinTrees.py | The-Kristina/CellComp | 29ec7690e0d9adb1a6214937ca41fd1dadce18c6 | [
"CNRI-Python",
"RSA-MD",
"Xnet",
"Net-SNMP",
"X11"
] | 7 | 2019-05-13T10:07:44.000Z | 2022-03-01T16:20:48.000Z | Biological_Questions/Cell_Cycle_Duration/SuperOutliers_Plot_LinTrees.py | The-Kristina/CellComp | 29ec7690e0d9adb1a6214937ca41fd1dadce18c6 | [
"CNRI-Python",
"RSA-MD",
"Xnet",
"Net-SNMP",
"X11"
] | null | null | null | Biological_Questions/Cell_Cycle_Duration/SuperOutliers_Plot_LinTrees.py | The-Kristina/CellComp | 29ec7690e0d9adb1a6214937ca41fd1dadce18c6 | [
"CNRI-Python",
"RSA-MD",
"Xnet",
"Net-SNMP",
"X11"
] | 3 | 2020-04-23T18:13:20.000Z | 2020-11-11T18:46:48.000Z | import time
start_time = time.process_time()
import sys
sys.path.append("../")
from Biological_Questions.Cell_Cycle_Duration.Shortlist_Outliers import ShortlistOutliers
from Movie_Analysis_Pipeline.Merging_Movie_Datasets.Find_Family_Class import FindFamily
from Cell_IDs_Analysis.Plotter_Lineage_Trees import PlotLinea... | 42.2 | 116 | 0.754976 |
52060668ae2c9acef042ae7790ea3da70b6ba176 | 13,283 | py | Python | keras_contrib/utils/kito.py | ZFTurbo/keras-contrib | 7eca212ab29a620463514223b9efd2198cd910d8 | [
"MIT"
] | null | null | null | keras_contrib/utils/kito.py | ZFTurbo/keras-contrib | 7eca212ab29a620463514223b9efd2198cd910d8 | [
"MIT"
] | null | null | null | keras_contrib/utils/kito.py | ZFTurbo/keras-contrib | 7eca212ab29a620463514223b9efd2198cd910d8 | [
"MIT"
] | null | null | null | """
Reduce neural net structure (Conv + BN -> Conv)
Also works:
DepthwiseConv2D + BN -> DepthwiseConv2D
SeparableConv2D + BN -> SeparableConv2D
This code takes on input trained Keras model and optimize layer structure and weights in such a way
that model became much faster (~30%), but works identically to initi... | 38.390173 | 146 | 0.623654 |
5208c24361058b62ce6e108305cf7e8045d2eb9a | 2,031 | py | Python | alipay/aop/api/domain/TopicItemVo.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/TopicItemVo.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/TopicItemVo.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
| 23.616279 | 63 | 0.514525 |
52095086bb446dc1b08b9d315803c1b73ef88590 | 541 | py | Python | project/api/views/bank_list.py | Rafiatu/cinch | 05f3927363a9f75598611e3f152b90464a588de2 | [
"MIT"
] | null | null | null | project/api/views/bank_list.py | Rafiatu/cinch | 05f3927363a9f75598611e3f152b90464a588de2 | [
"MIT"
] | null | null | null | project/api/views/bank_list.py | Rafiatu/cinch | 05f3927363a9f75598611e3f152b90464a588de2 | [
"MIT"
] | null | null | null | from rest_framework import status
from rest_framework.viewsets import ViewSet
from rest_framework.decorators import action
from rest_framework.permissions import AllowAny, IsAuthenticated
from api.lib.response import Response
from payment.get_bank_list import BankList
| 41.615385 | 94 | 0.791128 |
5209b7eaee6151a55b670766ca8043416e38ee6c | 290 | py | Python | Pipeline/4_R0_ARRP/Executable/r0_arrp_make.py | johnlspouge/R0_Unstratified_Case_Data | 696b4f45265904de04213bb4bd21390684ad00a6 | [
"Unlicense"
] | null | null | null | Pipeline/4_R0_ARRP/Executable/r0_arrp_make.py | johnlspouge/R0_Unstratified_Case_Data | 696b4f45265904de04213bb4bd21390684ad00a6 | [
"Unlicense"
] | null | null | null | Pipeline/4_R0_ARRP/Executable/r0_arrp_make.py | johnlspouge/R0_Unstratified_Case_Data | 696b4f45265904de04213bb4bd21390684ad00a6 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
from os import system
log = f'r0_arrp.log'
C = ' -c ../../1_Prem_Matrices_to_df/Data/UNSDMethodology.csv'
E = ' -e ../../3_Prem_Matrices_to_PF_Eigenvalue/Output/pf_eigenvalue.csv'
S = ' -s ../../2_ARRP/Output/slope.csv'
system( f'r0_arrp.py {C} {E} {S} > {log}' )
| 24.166667 | 73 | 0.662069 |
520aeb88ed49552d97150bdb774d3492dbf483cc | 2,816 | py | Python | cloudkitty-9.0.0/cloudkitty/rating/pyscripts/db/api.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | cloudkitty-9.0.0/cloudkitty/rating/pyscripts/db/api.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | cloudkitty-9.0.0/cloudkitty/rating/pyscripts/db/api.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # -*- coding: utf-8 -*-
# Copyright 2015 Objectif Libre
#
# 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 ... | 27.339806 | 78 | 0.631392 |
520b330c590fe9003700958a5e2e871eb51d0cd7 | 3,739 | py | Python | scripts/src/communication/power_consumption.py | GLO3013-E4/COViRondelle2021 | f8d23903d0a906e93a7698a555d90ebecdf83969 | [
"MIT"
] | null | null | null | scripts/src/communication/power_consumption.py | GLO3013-E4/COViRondelle2021 | f8d23903d0a906e93a7698a555d90ebecdf83969 | [
"MIT"
] | null | null | null | scripts/src/communication/power_consumption.py | GLO3013-E4/COViRondelle2021 | f8d23903d0a906e93a7698a555d90ebecdf83969 | [
"MIT"
] | null | null | null | import time
from ina219 import INA219
SHUNT_OHMS = 0.1
MAX_EXPECTED_AMPS = 0.2
if __name__ == "__main__":
timedTest(100)
| 28.984496 | 64 | 0.612196 |
520bda3f1eb7c2a6497554e137fb84ac3cc5ae35 | 3,646 | py | Python | pyrobolearn/robots/littledog.py | Pandinosaurus/pyrobolearn | 9cd7c060723fda7d2779fa255ac998c2c82b8436 | [
"Apache-2.0"
] | 2 | 2021-01-21T21:08:30.000Z | 2022-03-29T16:45:49.000Z | pyrobolearn/robots/littledog.py | Pandinosaurus/pyrobolearn | 9cd7c060723fda7d2779fa255ac998c2c82b8436 | [
"Apache-2.0"
] | null | null | null | pyrobolearn/robots/littledog.py | Pandinosaurus/pyrobolearn | 9cd7c060723fda7d2779fa255ac998c2c82b8436 | [
"Apache-2.0"
] | 1 | 2020-09-29T21:25:39.000Z | 2020-09-29T21:25:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Provide the Little Dog robotic platform.
"""
import os
import numpy as np
from pyrobolearn.robots.legged_robot import QuadrupedRobot
__author__ = "Brian Delhaisse"
__copyright__ = "Copyright 2018, PyRoboLearn"
__license__ = "GNU GPLv3"
__version__ = "1.0.0"
__maintain... | 36.46 | 110 | 0.611629 |
520c123c3cc2054e4fcd79af635f3285abb8eea2 | 3,818 | py | Python | Scripts/simulation/business/advertising_manager.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/business/advertising_manager.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/business/advertising_manager.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\business\advertising_manager.py
# Compiled at: 2017-04-27 01:01:18
# Size of source mod 2**32: 6129 ... | 43.885057 | 120 | 0.76087 |
520d7cb39f32defc0f55c008264ebcf3b5b045f7 | 8,603 | py | Python | app.py | ansokolov/28days | 98c3bd093dd716aa38a67ad03b7457c5b83220bc | [
"MIT"
] | null | null | null | app.py | ansokolov/28days | 98c3bd093dd716aa38a67ad03b7457c5b83220bc | [
"MIT"
] | null | null | null | app.py | ansokolov/28days | 98c3bd093dd716aa38a67ad03b7457c5b83220bc | [
"MIT"
] | null | null | null | import os
import datetime
import csv
import json
i = 0
print("Welcome to 28 days words learning app. \n")
initial_menu() | 34.550201 | 97 | 0.535511 |
520f3837a1ca983b092354bd55ad5a67b59b1069 | 8,598 | py | Python | tests/integration_tests/test_shell_plate_rbe2.py | tchin-divergent/tacs | 34743b370da4ab6ea16d24de7c574c3fec9d333a | [
"Apache-2.0"
] | null | null | null | tests/integration_tests/test_shell_plate_rbe2.py | tchin-divergent/tacs | 34743b370da4ab6ea16d24de7c574c3fec9d333a | [
"Apache-2.0"
] | null | null | null | tests/integration_tests/test_shell_plate_rbe2.py | tchin-divergent/tacs | 34743b370da4ab6ea16d24de7c574c3fec9d333a | [
"Apache-2.0"
] | null | null | null | import numpy as np
from mpi4py import MPI
from tacs import TACS, elements, constitutive, functions
from static_analysis_base_test import StaticTestCase
'''
Create a two separate cantilevered plates connected by an RBE3 element.
Apply a load at the RBE2 center node and test KSFailure, StructuralMass,
and Compliance fu... | 39.62212 | 108 | 0.581996 |
5214b68870ece3123bc4f5d2a4c1da7549fb6608 | 31,649 | py | Python | src/conntact/assembly_algorithm_blocks.py | swri-robotics/ConnTact | 3b31a6107403acebefc91616455f6d73c4181db1 | [
"Apache-2.0"
] | 9 | 2021-10-08T18:57:05.000Z | 2022-03-29T06:07:53.000Z | src/conntact/assembly_algorithm_blocks.py | swri-robotics/ConnTact | 3b31a6107403acebefc91616455f6d73c4181db1 | [
"Apache-2.0"
] | 4 | 2021-10-12T15:35:59.000Z | 2022-01-12T21:36:40.000Z | src/conntact/assembly_algorithm_blocks.py | swri-robotics/ConnTact | 3b31a6107403acebefc91616455f6d73c4181db1 | [
"Apache-2.0"
] | 1 | 2021-12-28T13:11:01.000Z | 2021-12-28T13:11:01.000Z | # Copyright 2021 Southwest Research Institute
# Licensed under the Apache License, Version 2.0
#UR IP Address is now 175.31.1.137
#Computer has to be 175.31.1.150
# Imports for ros
# from _typeshed import StrPath
from builtins import staticmethod
from operator import truediv
from pickle import STRING, TRUE
import st... | 53.642373 | 570 | 0.678378 |
52161f02cf931a0b27e36147101430c4098e9222 | 989 | py | Python | 2017/misc/ncme/server.py | HackGT/ctf-problems | a9608eb431af887d764f9ff2d8919e418a051c3d | [
"MIT"
] | 2 | 2019-01-28T03:37:32.000Z | 2020-06-09T15:40:14.000Z | 2017/misc/ncme/server.py | HackGT/ctf-problems | a9608eb431af887d764f9ff2d8919e418a051c3d | [
"MIT"
] | null | null | null | 2017/misc/ncme/server.py | HackGT/ctf-problems | a9608eb431af887d764f9ff2d8919e418a051c3d | [
"MIT"
] | null | null | null | '''
Simple socket server using threads
'''
import socket
import sys
from thread import *
HOST = '' # Symbolic name, meaning all available interfaces
PORT = 9000 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print('Socket created')
#Bind socket to local host and p... | 24.121951 | 76 | 0.659252 |
5216612398027c08af99299f71aba5216ea6eb3e | 563 | bzl | Python | tools/build_defs/buck_helpers.bzl | YifanShenSZ/pytorch | b4232f7cbe407909f9d95b91304c73fdc4c66a50 | [
"Intel"
] | null | null | null | tools/build_defs/buck_helpers.bzl | YifanShenSZ/pytorch | b4232f7cbe407909f9d95b91304c73fdc4c66a50 | [
"Intel"
] | null | null | null | tools/build_defs/buck_helpers.bzl | YifanShenSZ/pytorch | b4232f7cbe407909f9d95b91304c73fdc4c66a50 | [
"Intel"
] | null | null | null | # Only used for PyTorch open source BUCK build
IGNORED_ATTRIBUTE_PREFIX = [
"apple",
"fbobjc",
"windows",
"fbandroid",
"macosx",
]
IGNORED_ATTRIBUTES = [
"feature",
"platforms",
]
| 20.107143 | 59 | 0.595027 |
52169f9fb1131b55d0003765e76973d7f4ef98f8 | 1,901 | py | Python | Chapter8/datacurator.py | PacktPublishing/Testing-Time-Machines | fa85c5cb5252bf3dc83cad5d8ef3d3d425295df1 | [
"MIT"
] | 1 | 2022-01-02T16:38:29.000Z | 2022-01-02T16:38:29.000Z | Chapter8/datacurator.py | PacktPublishing/Testing-Time-Machines | fa85c5cb5252bf3dc83cad5d8ef3d3d425295df1 | [
"MIT"
] | null | null | null | Chapter8/datacurator.py | PacktPublishing/Testing-Time-Machines | fa85c5cb5252bf3dc83cad5d8ef3d3d425295df1 | [
"MIT"
] | 1 | 2022-01-02T16:38:31.000Z | 2022-01-02T16:38:31.000Z | import datetime
import pandas as pd
# Retrieve the test cases from the csv into a dictionary
dataFile = open('testcases.csv', 'r')
dataFrame = pd.read_csv('testcases.csv', index_col=0)
dataDictionary = dataFrame.transpose().to_dict()
# Create a new dictionary to save the results
result = {}
# Data optimization -> get ... | 41.326087 | 83 | 0.680168 |
5217f39046ec32e0713bd16621436917f0adb823 | 9,403 | py | Python | src/rumour_dnn_evaluator.py | jerrygaoLondon/RPDNN | ace69bda190f74a1a66f8bf06b7d86b4bd5579e7 | [
"MIT"
] | 17 | 2020-03-15T12:06:25.000Z | 2021-12-16T15:34:50.000Z | src/rumour_dnn_evaluator.py | skykisl/jerrygaoLondon0 | 6af65e0b1e2c2bbb1fd67b5f9fa26e4f447288ba | [
"MIT"
] | 1 | 2021-08-13T10:22:20.000Z | 2021-08-18T23:53:11.000Z | src/rumour_dnn_evaluator.py | skykisl/jerrygaoLondon0 | 6af65e0b1e2c2bbb1fd67b5f9fa26e4f447288ba | [
"MIT"
] | 12 | 2020-04-01T16:20:06.000Z | 2021-11-24T09:52:56.000Z | import os
from datetime import timedelta
from allennlp.data.iterators import BucketIterator
from allennlp.data.token_indexers import ELMoTokenCharactersIndexer
from allennlp_rumor_classifier import load_classifier_from_archive, RumorTweetsDataReader
from allennlp_rumor_classifier import timestamped_print
if __name__... | 52.530726 | 130 | 0.610443 |
5217f9c7a2fa74aac7a50560f523fcdec28bd266 | 511 | py | Python | 1528_shuffle_string.py | kannan5/LeetCode | 2523f5aed7fd8f087004d711597a966088c12db7 | [
"MIT"
] | null | null | null | 1528_shuffle_string.py | kannan5/LeetCode | 2523f5aed7fd8f087004d711597a966088c12db7 | [
"MIT"
] | null | null | null | 1528_shuffle_string.py | kannan5/LeetCode | 2523f5aed7fd8f087004d711597a966088c12db7 | [
"MIT"
] | null | null | null | import math
if __name__ == '__main__':
a = Solution()
print(a.restoreString("codeleet", [4, 5, 6, 7, 0, 2, 1, 3]))
print(a.restoreString("aiohn", [3, 1, 4, 2, 0]))
| 24.333333 | 64 | 0.542074 |
5219024973c615e90068876e93ddceda320d7c3a | 2,218 | py | Python | python2.7/site-packages/cpyrit/config.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | 4 | 2020-10-31T19:52:05.000Z | 2021-09-22T11:39:27.000Z | python2.7/site-packages/cpyrit/config.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | null | null | null | python2.7/site-packages/cpyrit/config.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | 2 | 2020-02-27T08:28:35.000Z | 2020-09-13T12:39:26.000Z | # -*- coding: UTF-8 -*-
#
# Copyright 2008-2011, Lukas Lueg, lukas.lueg@gmail.com
#
# This file is part of Pyrit.
#
# Pyrit is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of th... | 32.617647 | 77 | 0.618124 |
521945c5bd364091ce442a30df0c8df3c6864883 | 12,982 | py | Python | run_project.py | suryamp97/CSE_535_Project2_Boolean_Query_and_Inverted_Index | 9986805c61a7f70fceca554a73bbbc7306b47be6 | [
"MIT"
] | 1 | 2021-10-14T23:43:34.000Z | 2021-10-14T23:43:34.000Z | run_project.py | suryamp97/CSE_535_Project2_Boolean_Query_and_Inverted_Index | 9986805c61a7f70fceca554a73bbbc7306b47be6 | [
"MIT"
] | null | null | null | run_project.py | suryamp97/CSE_535_Project2_Boolean_Query_and_Inverted_Index | 9986805c61a7f70fceca554a73bbbc7306b47be6 | [
"MIT"
] | null | null | null | '''
@author: Sougata Saha
Institute: University at Buffalo
'''
from tqdm import tqdm
from preprocessor import Preprocessor
from indexer import Indexer
from collections import OrderedDict
from linkedlist import LinkedList
import inspect as inspector
import sys
import argparse
import json
import time
import random
impor... | 40.952681 | 145 | 0.58558 |
521955dfd92712ad98f507c7f4f176ac63438b6c | 16,234 | py | Python | app/home/views.py | 1IllI1/BBS_MIGRATE | b99d3521529ac6b5c039c8d5aa7cb5782ae899a9 | [
"MIT"
] | null | null | null | app/home/views.py | 1IllI1/BBS_MIGRATE | b99d3521529ac6b5c039c8d5aa7cb5782ae899a9 | [
"MIT"
] | null | null | null | app/home/views.py | 1IllI1/BBS_MIGRATE | b99d3521529ac6b5c039c8d5aa7cb5782ae899a9 | [
"MIT"
] | null | null | null | # coding:utf8
#
from . import home
from flask import render_template, redirect, url_for, flash, session, request,current_app
from app.home.forms import RegistForm, LoginForm, UserdetailForm, PwdForm, CommentForm, PostForm
from app.models import User, UserLoginLog, Comment, Post,Col
from werkzeug.security import genera... | 33.334702 | 188 | 0.644512 |
521ab16042032bc33c8f25cd62fd25ddff343b15 | 3,797 | py | Python | NASA SPACEAPPS CHALLENGE/Solution/Software part/Astronomical Data and Python Libraries/Astropy/astropy-1.1.2/astropy/units/cgs.py | sahirsharma/Martian | 062e9b47849512863c16713811f347ad7e121b56 | [
"MIT"
] | null | null | null | NASA SPACEAPPS CHALLENGE/Solution/Software part/Astronomical Data and Python Libraries/Astropy/astropy-1.1.2/astropy/units/cgs.py | sahirsharma/Martian | 062e9b47849512863c16713811f347ad7e121b56 | [
"MIT"
] | null | null | null | NASA SPACEAPPS CHALLENGE/Solution/Software part/Astronomical Data and Python Libraries/Astropy/astropy-1.1.2/astropy/units/cgs.py | sahirsharma/Martian | 062e9b47849512863c16713811f347ad7e121b56 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This package defines the CGS units. They are also available in the
top-level `astropy.units` namespace.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from ..utils.compat.fractions impo... | 27.715328 | 82 | 0.475112 |
521b98e3d1cb73025b648a7809467100f6409c97 | 5,164 | py | Python | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/kube_version.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-02-07T18:57:44.000Z | 2021-09-11T10:29:34.000Z | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/kube_version.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 1 | 2021-01-14T12:01:55.000Z | 2021-01-14T12:01:55.000Z | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/kube_version.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-10-13T08:37:46.000Z | 2022-02-09T00:21:25.000Z | #
# Copyright (c) 2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
import pecan
from pecan import rest
from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan
from sysinv.api.controllers.v1 import base
from sysinv.api.controllers.v1 import collection
from sysinv.common import except... | 34.198675 | 77 | 0.678737 |
521bf34ea08938ba109cb9382937e70cd9798623 | 1,699 | py | Python | starter.py | michaelStettler/unsup2 | 741df1585eb49c4f5f9e41849140a91419b49179 | [
"Apache-2.0"
] | null | null | null | starter.py | michaelStettler/unsup2 | 741df1585eb49c4f5f9e41849140a91419b49179 | [
"Apache-2.0"
] | null | null | null | starter.py | michaelStettler/unsup2 | 741df1585eb49c4f5f9e41849140a91419b49179 | [
"Apache-2.0"
] | null | null | null | import sys
import pylab as plb
import numpy as np
import mountaincar
if __name__ == "__main__":
d = DummyAgent()
d.visualize_trial()
plb.show()
| 26.138462 | 71 | 0.557975 |
521cb4608b60e2e11c8bc3b079b7fd0fe6924d2c | 2,260 | py | Python | grove/alpha/jordan_gradient/jordan_gradient.py | mkeshita/grove | dc6bf6ec63e8c435fe52b1e00f707d5ce4cdb9b3 | [
"Apache-2.0"
] | 229 | 2017-01-10T03:11:54.000Z | 2018-11-26T10:57:49.000Z | grove/alpha/jordan_gradient/jordan_gradient.py | mkeshita/grove | dc6bf6ec63e8c435fe52b1e00f707d5ce4cdb9b3 | [
"Apache-2.0"
] | 123 | 2017-01-10T21:06:51.000Z | 2018-11-27T19:38:22.000Z | grove/alpha/jordan_gradient/jordan_gradient.py | mkeshita/grove | dc6bf6ec63e8c435fe52b1e00f707d5ce4cdb9b3 | [
"Apache-2.0"
] | 95 | 2017-01-10T03:03:45.000Z | 2018-11-28T00:42:28.000Z | import numpy as np
from pyquil import Program
from pyquil.api import QuantumComputer, get_qc
from grove.alpha.jordan_gradient.gradient_utils import (binary_float_to_decimal_float,
measurements_to_bf)
from grove.alpha.phaseestimation.phase_estimation import phase_... | 33.731343 | 86 | 0.684513 |
521f46f810658251a27b571cb4480e27cd10089c | 732 | py | Python | test/benchmark/jvp_conv2d.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 395 | 2019-10-04T09:37:52.000Z | 2022-03-29T18:00:56.000Z | test/benchmark/jvp_conv2d.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 78 | 2019-10-11T18:56:43.000Z | 2022-03-23T01:49:54.000Z | test/benchmark/jvp_conv2d.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 50 | 2019-10-03T16:31:10.000Z | 2022-03-15T19:36:14.000Z | from torch import randn
from torch.nn import Conv2d
from backpack import extend
| 25.241379 | 76 | 0.568306 |
521fcaa4ac03261f5d66136190c373388bc3f18a | 5,229 | py | Python | BSVega_vs_Upsilon.py | JanObloj/Robust-uncertainty-sensitivity-analysis | b6da9889171e8d5c4b676ca33a3748d7c4b884c7 | [
"CC0-1.0"
] | null | null | null | BSVega_vs_Upsilon.py | JanObloj/Robust-uncertainty-sensitivity-analysis | b6da9889171e8d5c4b676ca33a3748d7c4b884c7 | [
"CC0-1.0"
] | null | null | null | BSVega_vs_Upsilon.py | JanObloj/Robust-uncertainty-sensitivity-analysis | b6da9889171e8d5c4b676ca33a3748d7c4b884c7 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Spyder Editor
Code written by Samuel Drapeau with modifications by Johannes Wiesel and Jan Obloj
This file produces plots comparing our first order sensitivity with BS vega.
"""
# %%
# To run the stuff, you need the package plotly in your anaconda "conda install plotly"
import plotly.g... | 27.376963 | 113 | 0.649455 |
522390db2778845f2c2d845e756b665082e86b09 | 4,360 | py | Python | lib/python/archive/cplexTest11.py | craigmax-dev/Mixed-Integer-Linear-Programming-for-Spacecraft-Maneuvers | d14bda5f0dca2bf6b7e25b58e36d10e096b7612f | [
"MIT"
] | null | null | null | lib/python/archive/cplexTest11.py | craigmax-dev/Mixed-Integer-Linear-Programming-for-Spacecraft-Maneuvers | d14bda5f0dca2bf6b7e25b58e36d10e096b7612f | [
"MIT"
] | 3 | 2020-09-30T09:22:50.000Z | 2020-10-20T19:10:53.000Z | lib/python/archive/cplexTest11.py | craigmax-dev/Mixed-Integer-Linear-Programming-for-Spacecraft-Maneuvers | d14bda5f0dca2bf6b7e25b58e36d10e096b7612f | [
"MIT"
] | null | null | null | import sys
import docplex.mp
import cplex
# Teams in 1st division
team_div1 = ["Baltimore Ravens","Cincinnati Bengals", "Cleveland Browns","Pittsburgh Steelers","Houston Texans",
"Indianapolis Colts","Jacksonville Jaguars","Tennessee Titans","Buffalo Bills","Miami Dolphins",
"New Englan... | 29.659864 | 115 | 0.666743 |
52240c1143495c764743a4c98d2bd58e20e4257a | 1,995 | py | Python | DeepLearningExamples/TensorFlow2/Recommendation/WideAndDeep/data/outbrain/nvtabular/preproc.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | DeepLearningExamples/TensorFlow2/Recommendation/WideAndDeep/data/outbrain/nvtabular/preproc.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | DeepLearningExamples/TensorFlow2/Recommendation/WideAndDeep/data/outbrain/nvtabular/preproc.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 38.365385 | 103 | 0.732331 |
5224ab7c6a4faffec5a38c6d30530aaf66d6c24c | 3,596 | py | Python | sfzlint/lint.py | kmturley/sfzlint | e92189301d798d00f3919cccd1ce29da2c7fa361 | [
"MIT"
] | null | null | null | sfzlint/lint.py | kmturley/sfzlint | e92189301d798d00f3919cccd1ce29da2c7fa361 | [
"MIT"
] | null | null | null | sfzlint/lint.py | kmturley/sfzlint | e92189301d798d00f3919cccd1ce29da2c7fa361 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import re
import sys
import xml.etree.ElementTree as ET
from argparse import ArgumentParser
from pathlib import Path
from lark.exceptions import UnexpectedCharacters, UnexpectedToken
from .parser import validate, SFZ, SFZValidatorConfig
from . import spec, settings
formats = {
'default': ... | 30.474576 | 79 | 0.618187 |
5227a62aa3a0d8203233b6c9c2725988f35970a3 | 2,809 | py | Python | utils/GeneralUtils.py | nanohedra/nanohedra | 3921b7f5ce10e0e3393c3b675bb97ccbecb96663 | [
"MIT"
] | 2 | 2020-12-07T00:38:32.000Z | 2021-05-13T19:36:17.000Z | utils/GeneralUtils.py | nanohedra/nanohedra | 3921b7f5ce10e0e3393c3b675bb97ccbecb96663 | [
"MIT"
] | null | null | null | utils/GeneralUtils.py | nanohedra/nanohedra | 3921b7f5ce10e0e3393c3b675bb97ccbecb96663 | [
"MIT"
] | 1 | 2021-05-13T19:36:18.000Z | 2021-05-13T19:36:18.000Z | import numpy as np
# Copyright 2020 Joshua Laniado and Todd O. Yeates.
__author__ = "Joshua Laniado and Todd O. Yeates"
__copyright__ = "Copyright 2020, Nanohedra"
__version__ = "1.0"
| 33.047059 | 119 | 0.655393 |
5228ebf5dbffc66cea1495a066ef36fc82add276 | 1,187 | py | Python | vscode/app.py | abdennour/samples | b4661b15bf003416c368f90e4ee3181a20c80313 | [
"Apache-2.0"
] | null | null | null | vscode/app.py | abdennour/samples | b4661b15bf003416c368f90e4ee3181a20c80313 | [
"Apache-2.0"
] | null | null | null | vscode/app.py | abdennour/samples | b4661b15bf003416c368f90e4ee3181a20c80313 | [
"Apache-2.0"
] | 2 | 2021-02-01T16:55:10.000Z | 2021-06-17T01:49:18.000Z | from flask import Flask, render_template, request, make_response, g
import os
import socket
import random
import json
import collections
hostname = socket.gethostname()
votes = collections.defaultdict(int)
app = Flask(__name__)
if __name__ == "__main__":
extra_files = []
if "development" == os.getenv("FLASK... | 23.27451 | 67 | 0.620051 |
5229cb40a928e00a2ff0016043a6e3c37305c288 | 4,959 | py | Python | src/NumericLettersParsers.py | shaigoldman/YotzerHaMafteach | e457de2fc56e9cb372133b4bc61b7d5deca0c67a | [
"MIT"
] | null | null | null | src/NumericLettersParsers.py | shaigoldman/YotzerHaMafteach | e457de2fc56e9cb372133b4bc61b7d5deca0c67a | [
"MIT"
] | null | null | null | src/NumericLettersParsers.py | shaigoldman/YotzerHaMafteach | e457de2fc56e9cb372133b4bc61b7d5deca0c67a | [
"MIT"
] | null | null | null | """Hebrew Letter-Based Numering Identifiers and Quantifiers"""
def remove_chucks(hebrew_word) -> str:
""" Hebrew numbering systems use 'chuck-chucks' (aka quotation
marks that aren't being used to signify a quotation)
in between letters that are meant as numerics rather
than words. To mak... | 31.993548 | 71 | 0.589635 |
522aa2be9a82dc1012b8fc44e2804018f597f455 | 1,024 | py | Python | tests/test_add.py | OwenMcDonnell/pglet-python | 1f7d72c6e5d34536f8ee03fac64b9dd34e465656 | [
"MIT"
] | null | null | null | tests/test_add.py | OwenMcDonnell/pglet-python | 1f7d72c6e5d34536f8ee03fac64b9dd34e465656 | [
"MIT"
] | null | null | null | tests/test_add.py | OwenMcDonnell/pglet-python | 1f7d72c6e5d34536f8ee03fac64b9dd34e465656 | [
"MIT"
] | null | null | null | import pytest
import pglet
from pglet import Textbox, Stack | 32 | 63 | 0.655273 |
522af989e057c103ede689708f11a25f3ff8af2c | 2,197 | py | Python | src/collector/utils.py | baboon-king/2c | 2b1093c9f15c713dac51aec5c1244ec285e49782 | [
"Apache-2.0"
] | null | null | null | src/collector/utils.py | baboon-king/2c | 2b1093c9f15c713dac51aec5c1244ec285e49782 | [
"Apache-2.0"
] | null | null | null | src/collector/utils.py | baboon-king/2c | 2b1093c9f15c713dac51aec5c1244ec285e49782 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Created by howie.hu at 2021/04/29.
Description:
Changelog: all notable changes to this file will be documented
"""
import os
import html2text
import requests
from gne import GeneralNewsExtractor
from readability import Document
from textrank4zh import TextRank4Keyword
from src... | 22.649485 | 87 | 0.645881 |
522b2b0fa12d2a1dd5f454984652774d2801eebd | 1,886 | py | Python | Middleware.py | huobingli/fpyd | b64f3369a3603b61310e57f5fc3d7c5de994dec1 | [
"MIT"
] | null | null | null | Middleware.py | huobingli/fpyd | b64f3369a3603b61310e57f5fc3d7c5de994dec1 | [
"MIT"
] | null | null | null | Middleware.py | huobingli/fpyd | b64f3369a3603b61310e57f5fc3d7c5de994dec1 | [
"MIT"
] | null | null | null | from mysql_comm.mysql_comm import *
from redis_comm.redis_comm import *
if __name__ == '__main__':
pass | 30.918033 | 148 | 0.629905 |
522c1f35038d5aefaffebc5bc1b3302ffd6f58fe | 61,881 | py | Python | tests/llist_test.py | kata198/python-cllist | 2d8c0acffd23e7438883759c0abff6fe5425e7c9 | [
"MIT"
] | 2 | 2017-04-16T02:09:58.000Z | 2018-07-21T21:43:10.000Z | tests/llist_test.py | kata198/python-cllist | 2d8c0acffd23e7438883759c0abff6fe5425e7c9 | [
"MIT"
] | 1 | 2017-11-29T16:25:53.000Z | 2017-11-29T16:25:53.000Z | tests/llist_test.py | kata198/python-cllist | 2d8c0acffd23e7438883759c0abff6fe5425e7c9 | [
"MIT"
] | 1 | 2017-11-29T20:33:46.000Z | 2017-11-29T20:33:46.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import gc
import sys
import random
import unittest
from cllist import sllist
from cllist import sllistnode
from cllist import dllist
from cllist import dllistnode
gc.set_debug(gc.DEBUG_UNCOLLECTABLE | gc.DEBUG_STATS)
if sys.hexversion >= 0x03000000:
# python 3 compat... | 33.814754 | 209 | 0.566022 |
522ddb7104f425240015b2b3379e3dbe907a6b3f | 1,240 | py | Python | trio/_highlevel_open_unix_stream.py | monobot/trio | 0fc81827093ebb7eb524e1c14464bb0dfd8641e8 | [
"Apache-2.0",
"MIT"
] | null | null | null | trio/_highlevel_open_unix_stream.py | monobot/trio | 0fc81827093ebb7eb524e1c14464bb0dfd8641e8 | [
"Apache-2.0",
"MIT"
] | null | null | null | trio/_highlevel_open_unix_stream.py | monobot/trio | 0fc81827093ebb7eb524e1c14464bb0dfd8641e8 | [
"Apache-2.0",
"MIT"
] | null | null | null | import trio
from trio._highlevel_open_tcp_stream import close_on_error
from trio.socket import socket, SOCK_STREAM
try:
from trio.socket import AF_UNIX
has_unix = True
except ImportError:
has_unix = False
__all__ = ["open_unix_socket"]
| 28.837209 | 78 | 0.715323 |
522e672d6d314c9e22db7c2f836733d64e4b7dec | 6,854 | py | Python | mod_setup_nftables.py | surarim/nifard | 78744b3cb17a7152a3bf32e7d07c258be033220e | [
"MIT"
] | null | null | null | mod_setup_nftables.py | surarim/nifard | 78744b3cb17a7152a3bf32e7d07c258be033220e | [
"MIT"
] | null | null | null | mod_setup_nftables.py | surarim/nifard | 78744b3cb17a7152a3bf32e7d07c258be033220e | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
# -*- coding: utf-8 -*-
#
import time, sys, subprocess
from threading import Thread
#
try:
import psycopg2
except ModuleNotFoundError as err:
print(err)
sys.exit(1)
#
try:
from mod_common import *
except ModuleNotFoundError as err:
print(err)
sys.exit(1)
# nftables
| 41.792683 | 151 | 0.591625 |
522e8268e27cc0e4ac1467fdf1229c4f9a633e0c | 731 | py | Python | dlapp/forms.py | tavershimafx/E-library | 861b8aeba82e4bf0b63f5cb1421ca8f9f9cd1d96 | [
"Apache-2.0"
] | null | null | null | dlapp/forms.py | tavershimafx/E-library | 861b8aeba82e4bf0b63f5cb1421ca8f9f9cd1d96 | [
"Apache-2.0"
] | null | null | null | dlapp/forms.py | tavershimafx/E-library | 861b8aeba82e4bf0b63f5cb1421ca8f9f9cd1d96 | [
"Apache-2.0"
] | null | null | null | from django import forms
from . models import Holdings
| 34.809524 | 72 | 0.578659 |
522ec8665cdc06a15413dd19e0ca4b2d4864dbdc | 2,805 | py | Python | tests/aircraft/deploys/ubuntu/models/v1beta3/storage_config_data_test.py | relaxdiego/aircraft | ce9a6724fe33be38777991fbb1cd731e197fa468 | [
"Apache-2.0"
] | 9 | 2021-01-15T18:26:44.000Z | 2021-07-29T07:40:15.000Z | tests/aircraft/deploys/ubuntu/models/v1beta3/storage_config_data_test.py | relaxdiego/aircraft | ce9a6724fe33be38777991fbb1cd731e197fa468 | [
"Apache-2.0"
] | null | null | null | tests/aircraft/deploys/ubuntu/models/v1beta3/storage_config_data_test.py | relaxdiego/aircraft | ce9a6724fe33be38777991fbb1cd731e197fa468 | [
"Apache-2.0"
] | 1 | 2021-04-26T01:39:26.000Z | 2021-04-26T01:39:26.000Z | import pytest
from aircraft.deploys.ubuntu.models.v1beta3 import StorageConfigData
def test__does_not_error_out_when_lvm_volgroups_is_empty(no_lvm_volgroups):
assert StorageConfigData(**no_lvm_volgroups).export_lvm_logical_volumes() == []
| 29.526316 | 83 | 0.370053 |
522faca411638c4c5ca4e0265ac3ec446d4b7425 | 1,009 | py | Python | tests/tests_core/test_definitions.py | markuswiertarkus/simbatch | c0e21abdee9f3475a01779d35cbe19e607a2c502 | [
"MIT"
] | 1 | 2017-11-28T01:10:09.000Z | 2017-11-28T01:10:09.000Z | tests/tests_core/test_definitions.py | markuswiertarkus/simbatch | c0e21abdee9f3475a01779d35cbe19e607a2c502 | [
"MIT"
] | null | null | null | tests/tests_core/test_definitions.py | markuswiertarkus/simbatch | c0e21abdee9f3475a01779d35cbe19e607a2c502 | [
"MIT"
] | null | null | null | from simbatch.core import core
from simbatch.core.definitions import SingleAction
import pytest
# TODO check dir on prepare tests
TESTING_AREA_DIR = "S:\\simbatch\\data\\"
# def test_load_definitions(sib):
# assert sib.dfn.load_definitions() is True
# def test_clear_all_definion_data
# def test_action_c... | 25.225 | 103 | 0.75223 |
523074ecbb7f919e6c2ee41fb3a77f7a0bc837a7 | 304 | py | Python | creational/singleton/singleton_main.py | Kozak24/Patterns | 351d5c11f7c64ce5d58db37b6715fc8f7d31945a | [
"MIT"
] | null | null | null | creational/singleton/singleton_main.py | Kozak24/Patterns | 351d5c11f7c64ce5d58db37b6715fc8f7d31945a | [
"MIT"
] | null | null | null | creational/singleton/singleton_main.py | Kozak24/Patterns | 351d5c11f7c64ce5d58db37b6715fc8f7d31945a | [
"MIT"
] | null | null | null | from creational.singleton.logic import God
if __name__ == "__main__":
main() | 16.888889 | 53 | 0.618421 |
5231e6bd87f94e0063595e79c3086076e75fc714 | 31 | py | Python | src/awss3/__init__.py | ZhiruiFeng/CarsMemory | 658afb98b1b8a667ae45e599ceb56f51759fdfce | [
"MIT"
] | 9 | 2019-01-26T21:57:38.000Z | 2021-08-13T11:55:56.000Z | src/awss3/__init__.py | ZhiruiFeng/CarsMemory | 658afb98b1b8a667ae45e599ceb56f51759fdfce | [
"MIT"
] | 6 | 2019-02-03T05:42:50.000Z | 2021-06-01T23:24:35.000Z | src/awss3/__init__.py | ZhiruiFeng/CarsMemory | 658afb98b1b8a667ae45e599ceb56f51759fdfce | [
"MIT"
] | 5 | 2019-03-06T04:33:57.000Z | 2021-05-31T17:43:57.000Z | #!/usr/bin/env python
# aws s3
| 10.333333 | 21 | 0.645161 |
5232c89174d7545d58073dde916fe3b501931f46 | 277 | py | Python | rsa_demo/stubs/pyasn1/type/univ.py | jlinoff/rsa_demo | 8babffab271bf58ca944ab9ff8743af26dc3c9b1 | [
"MIT"
] | 2 | 2019-12-04T22:38:44.000Z | 2020-04-11T06:47:06.000Z | rsa_demo/stubs/pyasn1/type/univ.py | jlinoff/rsa_demo | 8babffab271bf58ca944ab9ff8743af26dc3c9b1 | [
"MIT"
] | null | null | null | rsa_demo/stubs/pyasn1/type/univ.py | jlinoff/rsa_demo | 8babffab271bf58ca944ab9ff8743af26dc3c9b1 | [
"MIT"
] | null | null | null | # Really hackey stubs, not suitable for typeshed.
from typing import Any
| 27.7 | 71 | 0.649819 |
5233405403bf14c4dfbcafd95285eeecc8a3a127 | 4,730 | py | Python | 2021/python/tests/test_day25.py | shalgrim/advent-of-code | d3bd1c9f7eeaebff4153f6fd73ef8fc32d2b1ea8 | [
"MIT"
] | null | null | null | 2021/python/tests/test_day25.py | shalgrim/advent-of-code | d3bd1c9f7eeaebff4153f6fd73ef8fc32d2b1ea8 | [
"MIT"
] | null | null | null | 2021/python/tests/test_day25.py | shalgrim/advent-of-code | d3bd1c9f7eeaebff4153f6fd73ef8fc32d2b1ea8 | [
"MIT"
] | null | null | null | import pytest
from day25_1 import map_step, map_step_n
from day25_1 import main as main1
example_1_0 = [
list('...>...'),
list('.......'),
list('......>'),
list('v.....>'),
list('......>'),
list('.......'),
list('..vvv..'),
]
example_1_1 = [
list('..vv>..'),
list('.......'),
... | 16.596491 | 88 | 0.443552 |
5233dbb8a07ced44676748858d28ade2ed2e5328 | 7,504 | py | Python | solver.py | satyenrajpal/speed-prediction-challenge | 0ac46419c5e2288d5d27ad66348d7a2c47705342 | [
"MIT"
] | 5 | 2019-07-11T08:38:53.000Z | 2020-04-11T19:07:11.000Z | solver.py | satyenrajpal/speed-prediction-challenge | 0ac46419c5e2288d5d27ad66348d7a2c47705342 | [
"MIT"
] | null | null | null | solver.py | satyenrajpal/speed-prediction-challenge | 0ac46419c5e2288d5d27ad66348d7a2c47705342 | [
"MIT"
] | 6 | 2019-04-21T13:39:37.000Z | 2021-09-15T09:35:51.000Z | import cv2, os
import numpy as np
import sys
from utils import movingAverage, plot, computeAverage
import queue
from sklearn import linear_model
| 29.660079 | 149 | 0.6883 |
52345b669557250e37a229c365510c22c77e0d88 | 4,035 | py | Python | status/trajectories.py | ioos/glider-dac-status | 03fcf9561ed11905235885a7557a58bdc2815d65 | [
"MIT"
] | null | null | null | status/trajectories.py | ioos/glider-dac-status | 03fcf9561ed11905235885a7557a58bdc2815d65 | [
"MIT"
] | 16 | 2016-05-16T13:40:56.000Z | 2020-07-21T21:39:21.000Z | status/trajectories.py | ioos/glider-dac-status | 03fcf9561ed11905235885a7557a58bdc2815d65 | [
"MIT"
] | 8 | 2015-02-20T16:39:30.000Z | 2020-10-12T20:33:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import requests
import os
import sys
from app import app
from shapely.geometry import LineString
from status.profile_plots import iter_deployments, is_recent_data, is_recent_update
def get_trajectory(erddap_url):
'''
Reads the trajectory information fr... | 31.771654 | 113 | 0.677076 |
52345fa930bdb9bec3252111f3c27febc14ab5da | 663 | py | Python | game/client/view/pad/pad.py | AntonYermilov/progue | 7f382208c9efc904cff9d8df4750606039801d45 | [
"MIT"
] | null | null | null | game/client/view/pad/pad.py | AntonYermilov/progue | 7f382208c9efc904cff9d8df4750606039801d45 | [
"MIT"
] | 6 | 2019-03-25T21:11:28.000Z | 2019-06-21T16:21:47.000Z | game/client/view/pad/pad.py | AntonYermilov/progue | 7f382208c9efc904cff9d8df4750606039801d45 | [
"MIT"
] | 1 | 2021-12-22T22:03:47.000Z | 2021-12-22T22:03:47.000Z | from abc import ABC, abstractmethod
| 30.136364 | 65 | 0.597285 |
523460bd80c3461cd9638039533ab16a8632b269 | 269 | py | Python | urls.py | audacious-software/Passive-Data-Kit-Codebook | 84533014f6f3aaa6b7cdb1bcf095633c65c94d01 | [
"Apache-2.0"
] | null | null | null | urls.py | audacious-software/Passive-Data-Kit-Codebook | 84533014f6f3aaa6b7cdb1bcf095633c65c94d01 | [
"Apache-2.0"
] | null | null | null | urls.py | audacious-software/Passive-Data-Kit-Codebook | 84533014f6f3aaa6b7cdb1bcf095633c65c94d01 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from .views import pdk_codebook_page, pdk_codebook_sitemap
urlpatterns = [
url(r'^(?P<generator>.+)/$', pdk_codebook_page, name='pdk_codebook_page'),
url(r'^sitemap.json$', pdk_codebook_sitemap, name='pdk_codebook_sitemap')
]
| 29.888889 | 78 | 0.747212 |
5234684154dd0faf0b6bcb6ee4c3aed702f78dd5 | 934 | py | Python | model_evaluation/test_data.py | huawenbo/ERSW-project | 105c692234357a0de58bfa067f379b83ea8259b6 | [
"MIT"
] | 5 | 2021-07-04T15:13:55.000Z | 2021-09-05T14:55:51.000Z | model_evaluation/test_data.py | huawenbo/ERSW-project | 105c692234357a0de58bfa067f379b83ea8259b6 | [
"MIT"
] | null | null | null | model_evaluation/test_data.py | huawenbo/ERSW-project | 105c692234357a0de58bfa067f379b83ea8259b6 | [
"MIT"
] | 1 | 2021-07-06T11:54:39.000Z | 2021-07-06T11:54:39.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat May 8 09:54:36 2021
@author: Administrator
"""
import torch
from torch.utils.tensorboard import SummaryWriter
from sklearn.metrics import roc_auc_score
import numpy as np
# %%
data = torch.load('dataset/dic_3_1_7878.pt')
print(len(data))
print(data[0][2].shape... | 17.961538 | 50 | 0.594218 |
5235f4900f956a3bbd70a475b7a93639e781aab5 | 2,087 | py | Python | jdcloud_sdk/services/iotcore/models/ThingTypeInfoVO.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | jdcloud_sdk/services/iotcore/models/ThingTypeInfoVO.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | jdcloud_sdk/services/iotcore/models/ThingTypeInfoVO.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 40.134615 | 241 | 0.700048 |
52366585374893c5a5d4f9892985aa180f39b4ce | 198 | py | Python | cars/admin.py | rngallen/signals | a27c2b1e307a3a25eb83afe38df137cf836ed8c9 | [
"MIT"
] | null | null | null | cars/admin.py | rngallen/signals | a27c2b1e307a3a25eb83afe38df137cf836ed8c9 | [
"MIT"
] | null | null | null | cars/admin.py | rngallen/signals | a27c2b1e307a3a25eb83afe38df137cf836ed8c9 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Car
# Register your models here.
| 19.8 | 53 | 0.722222 |
5236e1e1d04488927330339167dbb5ca72dd2f1c | 5,683 | py | Python | backend/forum/utils/djtools/query_cache.py | karolyi/forum-django | a498be3123deb836e0108258c493b88c645b2163 | [
"MIT"
] | 7 | 2016-09-20T11:49:49.000Z | 2017-06-24T23:51:56.000Z | backend/forum/utils/djtools/query_cache.py | karolyi/forum-django | a498be3123deb836e0108258c493b88c645b2163 | [
"MIT"
] | 17 | 2019-12-22T10:41:48.000Z | 2021-11-17T10:58:50.000Z | backend/forum/utils/djtools/query_cache.py | karolyi/forum-django | a498be3123deb836e0108258c493b88c645b2163 | [
"MIT"
] | 1 | 2016-09-20T11:50:57.000Z | 2016-09-20T11:50:57.000Z | from typing import Iterable, Optional
from django import VERSION
from django.db.models.base import Model
from django.db.models.fields.related import ManyToManyField
from django.db.models.fields.reverse_related import ManyToOneRel
from django.db.models.manager import Manager
from django.db.models.query import QuerySet
... | 34.652439 | 78 | 0.655464 |
52371790ddfcd8b2c7d4c68f5e7cb458249f7867 | 16,914 | py | Python | web/poisson_web.py | DreadyBear/codereview | 9e3072ca79f97a067599c762cdea73da7607f671 | [
"Unlicense"
] | 60 | 2015-01-06T16:19:01.000Z | 2021-04-21T12:41:35.000Z | web/poisson_web.py | DreadyBear/codereview | 9e3072ca79f97a067599c762cdea73da7607f671 | [
"Unlicense"
] | 2 | 2015-02-18T19:59:37.000Z | 2015-03-25T20:10:59.000Z | web/poisson_web.py | DreadyBear/codereview | 9e3072ca79f97a067599c762cdea73da7607f671 | [
"Unlicense"
] | 27 | 2015-02-23T03:29:04.000Z | 2021-04-25T21:06:42.000Z | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
import os
import psycopg2
import numpy as np
import pandas as pd
import patsy
import statsmodels.api as sm
import pickle
import random
from math import floor, exp
from datetime import *
import pytz
from dateutil.relativedelta import *
import calendar
fro... | 38.008989 | 303 | 0.691853 |
5238a965f3751d579b65ce010c9f63ebfac434c8 | 67,494 | py | Python | genericScreener.py | rsandx/generic-stocks-screener | e717623052cae5ff382604f142ad308ee85e6368 | [
"MIT"
] | null | null | null | genericScreener.py | rsandx/generic-stocks-screener | e717623052cae5ff382604f142ad308ee85e6368 | [
"MIT"
] | null | null | null | genericScreener.py | rsandx/generic-stocks-screener | e717623052cae5ff382604f142ad308ee85e6368 | [
"MIT"
] | null | null | null | #! python3
import pandas as pd
import numpy as np
import re, json
from ta import *
import sys, os, logging, logging.config, traceback, concurrent_log_handler, getopt
import multiprocessing as mp
import contextlib
import heapq
import talib
from datetime import datetime, timedelta
#import numba as nb
#fro... | 47.665254 | 308 | 0.503497 |
523acdc06c5b11e96565a7004e5899f7f30e9391 | 1,075 | py | Python | VideoReaders.py | aegissystems/yolact | 29ee13f41a83b62a8946a86cb01e49d8fce0676c | [
"MIT"
] | 1 | 2022-03-25T11:15:44.000Z | 2022-03-25T11:15:44.000Z | VideoReaders.py | aegissystems/yolact | 29ee13f41a83b62a8946a86cb01e49d8fce0676c | [
"MIT"
] | null | null | null | VideoReaders.py | aegissystems/yolact | 29ee13f41a83b62a8946a86cb01e49d8fce0676c | [
"MIT"
] | null | null | null | import cv2 | 34.677419 | 159 | 0.63907 |
523c83b7a7286c3f75b98ba50343d40590b2e580 | 4,041 | py | Python | OrderBookContainer.py | sturex/pyOrderbookTrading | 2020fe3760dbbd7c32570d000a44fc7b229101c7 | [
"MIT"
] | 19 | 2019-11-07T13:55:38.000Z | 2022-03-12T22:34:50.000Z | OrderBookContainer.py | nomad5am/pyOrderbookTrading | e902165231b8b986062c7c3e4657d888c5f8511c | [
"MIT"
] | 6 | 2019-10-26T04:29:03.000Z | 2022-02-10T01:38:39.000Z | OrderBookContainer.py | nomad5am/pyOrderbookTrading | e902165231b8b986062c7c3e4657d888c5f8511c | [
"MIT"
] | 8 | 2019-11-07T13:55:39.000Z | 2021-11-11T15:24:45.000Z | import os
import json
from contextlib import suppress
from OrderBook import *
from Signal import Signal
| 37.073394 | 102 | 0.565702 |
523c8dafc13dd0a3971afa922c463435db38e743 | 979 | py | Python | leetcode/0753_cracking_the_safe.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | 3 | 2018-05-10T09:56:49.000Z | 2020-11-07T18:09:42.000Z | leetcode/0753_cracking_the_safe.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | null | null | null | leetcode/0753_cracking_the_safe.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
if __name__ == '__main__':
solution = Solution()
assert '01' == solution.crackSafe(1, 2)
assert '00110' == solution.crackSafe(2, 2)
assert '0' == solution.crackSafe(1, 1)
assert '00' == solution.crackSafe(2, 1)
| 26.459459 | 77 | 0.447395 |
523e0d5b10bb021e5fa2c2938ba1171583eee803 | 94 | py | Python | estimators/apps.py | bearroast/django-estimators | 5dd72694dab6725335214543a59104c4de504037 | [
"MIT"
] | 46 | 2016-09-13T06:33:30.000Z | 2022-01-08T00:55:37.000Z | estimators/apps.py | bearroast/django-estimators | 5dd72694dab6725335214543a59104c4de504037 | [
"MIT"
] | 14 | 2016-09-10T04:56:30.000Z | 2017-11-28T04:12:43.000Z | estimators/apps.py | bearroast/django-estimators | 5dd72694dab6725335214543a59104c4de504037 | [
"MIT"
] | 19 | 2016-09-20T23:53:26.000Z | 2022-01-08T00:55:39.000Z | from django.apps import AppConfig
| 15.666667 | 33 | 0.765957 |
523e14b2179a0494e84de917951c121e0f704e85 | 4,507 | py | Python | pwny/transfer.py | EntySec/Pwny | d6a8a5edee171dcd3bf3ea1ec49b0ffb03d38531 | [
"MIT"
] | 7 | 2021-11-12T23:14:19.000Z | 2022-01-16T21:27:42.000Z | pwny/transfer.py | enty8080/Pwny | 0723ab9fc03b812e21e4b7cef885ec13e84364ee | [
"MIT"
] | null | null | null | pwny/transfer.py | enty8080/Pwny | 0723ab9fc03b812e21e4b7cef885ec13e84364ee | [
"MIT"
] | 7 | 2021-11-10T16:52:57.000Z | 2022-02-09T17:11:57.000Z | #!/usr/bin/env python3
#
# MIT License
#
# Copyright (c) 2020-2022 EntySec
#
# 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... | 34.143939 | 103 | 0.567783 |
523e7d0d568c08c8105bcd658164afdaec967f10 | 7,146 | py | Python | clorm/util/wrapper.py | potassco/clorm | e46c50a052f37a083f3884a9c2a79c7c5412bf54 | [
"MIT"
] | 21 | 2020-01-07T15:55:54.000Z | 2022-02-13T13:07:49.000Z | clorm/util/wrapper.py | potassco/clorm | e46c50a052f37a083f3884a9c2a79c7c5412bf54 | [
"MIT"
] | 66 | 2020-01-07T16:08:08.000Z | 2022-03-31T07:51:35.000Z | clorm/util/wrapper.py | potassco/clorm | e46c50a052f37a083f3884a9c2a79c7c5412bf54 | [
"MIT"
] | 5 | 2020-07-06T17:36:28.000Z | 2021-11-01T09:32:05.000Z | '''Functions and classes to wrap existing classes. Provides a wrapper metaclass
and also a function that returns a wrapped class. The function is more flexible
as a metaclass has multiple inheritence limitations.
A wrapper metaclass for building wrapper objects. It is instantiated by
specifying a class to be to be wra... | 39.7 | 90 | 0.606913 |
523ea1126520b1080283acf8904ed417d13b271d | 1,558 | py | Python | hotel.py | youmitsu/tdr-reservation-clawler | e0c2f806b7ce897ff5d4bad5f1d768cf4a43e4bf | [
"MIT"
] | null | null | null | hotel.py | youmitsu/tdr-reservation-clawler | e0c2f806b7ce897ff5d4bad5f1d768cf4a43e4bf | [
"MIT"
] | null | null | null | hotel.py | youmitsu/tdr-reservation-clawler | e0c2f806b7ce897ff5d4bad5f1d768cf4a43e4bf | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
import time
import os
import json
import sys
from lib import setupDriver, setupMode, access, stopUntilLoading, stopUntilSpinnerLoading
from loginModule import loginSection
from notification import notifySystem, notifySlackF... | 27.333333 | 127 | 0.689345 |
523f0a8ff5e73981f7f55509044d942b0dbc3daa | 862 | py | Python | traceback_test.py | tor4z/python_test | 6b18110b4e82ad00a065b03d0ee8f7f331b2f874 | [
"Unlicense"
] | null | null | null | traceback_test.py | tor4z/python_test | 6b18110b4e82ad00a065b03d0ee8f7f331b2f874 | [
"Unlicense"
] | null | null | null | traceback_test.py | tor4z/python_test | 6b18110b4e82ad00a065b03d0ee8f7f331b2f874 | [
"Unlicense"
] | null | null | null | import traceback
another_function()
"""
[<FrameSummary file traceback_test.py, line 23 in <module>>,
<FrameSummary file traceback_test.py, line 16 in another_function>,
<FrameSummary file traceback_test.py, line 21 in lumberstack>,
<FrameSummary file traceback_test.py, line 9 in tb>]
lumberstack
None
[<FrameSummar... | 22.102564 | 67 | 0.700696 |
524047780d99a0102c1623f0dbd8a969e54512fc | 4,577 | py | Python | dev/cpp/cpptarget.py | bowlofstew/client | 0d5ae42aaf9863e3871828b6df06170aad17c560 | [
"MIT"
] | 40 | 2015-04-15T09:40:23.000Z | 2022-02-11T11:07:24.000Z | dev/cpp/cpptarget.py | bowlofstew/client | 0d5ae42aaf9863e3871828b6df06170aad17c560 | [
"MIT"
] | 19 | 2015-04-15T18:34:53.000Z | 2018-11-17T00:11:05.000Z | dev/cpp/cpptarget.py | bowlofstew/client | 0d5ae42aaf9863e3871828b6df06170aad17c560 | [
"MIT"
] | 22 | 2015-04-15T09:45:46.000Z | 2020-09-29T17:04:19.000Z | import os
from biicode.common.model.brl.block_cell_name import BlockCellName
from biicode.common.model.bii_type import BiiType
| 36.91129 | 93 | 0.592528 |
52408c78b60c7bc5958da33b916643304a15847c | 20,554 | py | Python | monk/tf_keras_1/finetune/level_11_optimizers_main.py | Sanskar329/monk_v1 | 51a497a925ec1fb2c8fef1d51245ea7040a5a65a | [
"Apache-2.0"
] | 7 | 2020-07-26T08:37:29.000Z | 2020-10-30T10:23:11.000Z | monk/tf_keras_1/finetune/level_11_optimizers_main.py | mursalfk/monk_v1 | 62f34a52f242772186ffff7e56764e958fbcd920 | [
"Apache-2.0"
] | null | null | null | monk/tf_keras_1/finetune/level_11_optimizers_main.py | mursalfk/monk_v1 | 62f34a52f242772186ffff7e56764e958fbcd920 | [
"Apache-2.0"
] | null | null | null | from tf_keras_1.finetune.imports import *
from system.imports import *
from tf_keras_1.finetune.level_10_schedulers_main import prototype_schedulers
| 58.062147 | 151 | 0.579352 |
524200af22407131ff0b4d610415254327069f0f | 1,078 | py | Python | test/com/facebook/buck/core/module/impl/test_app.py | Unknoob/buck | 2dfc734354b326f2f66896dde7746a11965d5a13 | [
"Apache-2.0"
] | 8,027 | 2015-01-02T05:31:44.000Z | 2022-03-31T07:08:09.000Z | test/com/facebook/buck/core/module/impl/test_app.py | Unknoob/buck | 2dfc734354b326f2f66896dde7746a11965d5a13 | [
"Apache-2.0"
] | 2,355 | 2015-01-01T15:30:53.000Z | 2022-03-30T20:21:16.000Z | test/com/facebook/buck/core/module/impl/test_app.py | Unknoob/buck | 2dfc734354b326f2f66896dde7746a11965d5a13 | [
"Apache-2.0"
] | 1,280 | 2015-01-09T03:29:04.000Z | 2022-03-30T15:14:14.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 ... | 33.6875 | 92 | 0.737477 |
524335c52fc4efb7aa6390e9a66eced8d1cd6c0e | 1,488 | py | Python | models/FastNeuralStyleTransferModel.py | taivu1998/GANime | a1d1569a1797f3fc50159475de2e3d47697abfed | [
"MIT"
] | 24 | 2020-03-20T05:43:16.000Z | 2022-03-23T22:09:35.000Z | models/FastNeuralStyleTransferModel.py | bobyang9/GANime | c4e98274cc8ecddda0d6273c5d2670a8d356648f | [
"MIT"
] | null | null | null | models/FastNeuralStyleTransferModel.py | bobyang9/GANime | c4e98274cc8ecddda0d6273c5d2670a8d356648f | [
"MIT"
] | 2 | 2020-05-24T23:07:08.000Z | 2021-04-02T11:33:35.000Z | '''
This program implements a Fast Neural Style Transfer model.
References:
https://www.tensorflow.org/tutorials/generative/style_transfer
'''
from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow as tf
import tensorflow_hub as hub
import os, sys
import time
import... | 29.76 | 102 | 0.672043 |
5243ca3160b48deb0f80a4363230359abdd1c1a8 | 322 | py | Python | editor/urls.py | AndersonBY/p5py | f002caf94df800e29173f78931f5db90003cf4ae | [
"MIT"
] | 15 | 2019-12-13T04:25:23.000Z | 2021-11-21T06:32:25.000Z | editor/urls.py | AndersonHJB/p5py_update | 95b6bdf5353e70443b3e7444e6a698c0fb96aa2a | [
"MIT"
] | 8 | 2020-01-07T22:30:55.000Z | 2021-08-20T00:32:42.000Z | editor/urls.py | AndersonHJB/p5py_update | 95b6bdf5353e70443b3e7444e6a698c0fb96aa2a | [
"MIT"
] | 4 | 2020-01-03T19:18:40.000Z | 2021-06-26T14:10:55.000Z | # -*- coding: utf-8 -*-
# @Author: Anderson
# @Date: 2019-04-25 00:30:09
# @Last Modified by: ander
# @Last Modified time: 2019-12-07 01:14:16
from django.urls import path
from . import views
urlpatterns = [
path("", views.editor, name="editor"),
path("upload_code", views.upload_code, name="upload_code")
... | 23 | 62 | 0.658385 |
524438036b4836d23308da7e1f4538ef603e1930 | 47 | py | Python | Data Science Bootcamp for Beginners/4.py | yuto-moriizumi/Python | 2de2903179f187c3c7105e8cf2f9600dded21f25 | [
"MIT"
] | null | null | null | Data Science Bootcamp for Beginners/4.py | yuto-moriizumi/Python | 2de2903179f187c3c7105e8cf2f9600dded21f25 | [
"MIT"
] | null | null | null | Data Science Bootcamp for Beginners/4.py | yuto-moriizumi/Python | 2de2903179f187c3c7105e8cf2f9600dded21f25 | [
"MIT"
] | null | null | null | s = "Rats live on no evil star"
print(s[::-1])
| 15.666667 | 31 | 0.595745 |
52469f8ecb67d529ba2fdbe487fcda4b777dab68 | 4,168 | py | Python | models/get_train_stats.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | null | null | null | models/get_train_stats.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | 20 | 2019-07-15T21:49:29.000Z | 2020-01-09T14:35:03.000Z | models/get_train_stats.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | null | null | null | import numpy as np
import torchvision.datasets as datasets
from pathlib import Path
import libs.dirs as dirs
import libs.utils as utils
import libs.dataset_utils as dutils
import models.utils as mutils
import libs.commons as commons
from libs.vis_fun... | 37.890909 | 107 | 0.608205 |
524714f34c51c5c8dec83ff3feb40db05c434676 | 6,851 | py | Python | pre_processing.py | ziyuanli17/Vessel-Segmentation | 9954050b6f30a8da370ee8948083a2ab38b3580b | [
"MIT"
] | null | null | null | pre_processing.py | ziyuanli17/Vessel-Segmentation | 9954050b6f30a8da370ee8948083a2ab38b3580b | [
"MIT"
] | null | null | null | pre_processing.py | ziyuanli17/Vessel-Segmentation | 9954050b6f30a8da370ee8948083a2ab38b3580b | [
"MIT"
] | null | null | null | import cv2 as cv
import sys
import numpy as np
import tifffile as ti
import argparse
import itertools
max_lowThreshold = 100
window_name = 'Edge Map'
title_trackbar = 'Min Threshold:'
ratio = 3
kernel_size = 3
# Sort grey image colors by frequency of appearance
# Remove colors of selection ranked ... | 35.314433 | 125 | 0.564297 |
5247c15213add12bf9a354a74ea71714c77c8312 | 1,179 | py | Python | tests/hpp/tests/test_generation_utils.py | javisenberg/addonpayments-Python-SDK | 8c7b60fd4d245dd588d9f230c17ffde4e8ed33ac | [
"MIT"
] | 2 | 2018-04-11T13:53:38.000Z | 2018-12-09T13:10:18.000Z | tests/hpp/tests/test_generation_utils.py | javisenberg/addonpayments-Python-SDK | 8c7b60fd4d245dd588d9f230c17ffde4e8ed33ac | [
"MIT"
] | 2 | 2019-03-28T12:49:16.000Z | 2019-03-28T12:52:09.000Z | tests/hpp/tests/test_generation_utils.py | javisenberg/addonpayments-Python-SDK | 8c7b60fd4d245dd588d9f230c17ffde4e8ed33ac | [
"MIT"
] | 8 | 2017-07-10T13:32:23.000Z | 2021-08-23T10:55:52.000Z | # -*- encoding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import re
from addonpayments.utils import GenerationUtils
| 32.75 | 111 | 0.667515 |
5249be72adb028ad77088154fc0b99be75fc8ca2 | 5,276 | py | Python | tcellmatch/models/layers/layer_conv.py | theislab/tcellmatch | ddd344e44147f97f35d6a4e7c3c7677981fd177e | [
"BSD-3-Clause"
] | 25 | 2019-08-14T22:39:40.000Z | 2022-03-02T15:42:35.000Z | tcellmatch/models/layers/layer_conv.py | theislab/tcellmatch | ddd344e44147f97f35d6a4e7c3c7677981fd177e | [
"BSD-3-Clause"
] | 2 | 2021-07-13T23:40:14.000Z | 2021-12-18T10:08:37.000Z | tcellmatch/models/layers/layer_conv.py | theislab/tcellmatch | ddd344e44147f97f35d6a4e7c3c7677981fd177e | [
"BSD-3-Clause"
] | 4 | 2020-02-21T20:43:41.000Z | 2022-03-21T14:38:58.000Z | import tensorflow as tf
from typing import Union, Tuple
| 38.510949 | 112 | 0.608795 |
524c410c76a43bc48198d2c0eb692d37c913c273 | 1,207 | py | Python | form-ex2/main.py | acandreani/ads_web_exercicios | a97ee7ebd0dba9e308b8e2d2318e577903f83f72 | [
"MIT"
] | 1 | 2019-03-13T14:33:28.000Z | 2019-03-13T14:33:28.000Z | form-ex2/main.py | acandreani/ads_web_exercicios | a97ee7ebd0dba9e308b8e2d2318e577903f83f72 | [
"MIT"
] | 1 | 2021-06-23T20:56:49.000Z | 2021-06-23T20:56:49.000Z | form-ex2/main.py | acandreani/ads_web_exercicios | a97ee7ebd0dba9e308b8e2d2318e577903f83f72 | [
"MIT"
] | 1 | 2019-04-24T13:10:58.000Z | 2019-04-24T13:10:58.000Z | from flask import Flask, render_template, request
app = Flask(__name__)
bd={"usuario":"alexandre.c.andreani@gmail.com","senha":"12345"}
if __name__== "__main__":
app.run(host="0.0.0.0",debug= True)
| 21.553571 | 64 | 0.659486 |
524ce4f455e80acda735bd673cc6b8d4d9fa0738 | 2,883 | py | Python | raspberry/camera/get_number_faces_opencv.py | Dangaran/home_station_project | 890b342e79e3dd493a8f418ed9283f0d444e5073 | [
"CC0-1.0"
] | null | null | null | raspberry/camera/get_number_faces_opencv.py | Dangaran/home_station_project | 890b342e79e3dd493a8f418ed9283f0d444e5073 | [
"CC0-1.0"
] | null | null | null | raspberry/camera/get_number_faces_opencv.py | Dangaran/home_station_project | 890b342e79e3dd493a8f418ed9283f0d444e5073 | [
"CC0-1.0"
] | null | null | null | import picamera
from time import sleep
from time import time
import os
import numpy as np
import cv2
import imutils
import argparse
import face_recognition
from camera.check_rectangle_overlap import check_rectangle_overlap
# https://picamera.readthedocs.io/en/release-1.0/api.html
| 36.493671 | 157 | 0.687825 |
525064b1ed219ef71b739ece262ba4a5a5c4ba31 | 609 | py | Python | ejercicios_basicos/poo/poo10/test_figura_geo.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | ejercicios_basicos/poo/poo10/test_figura_geo.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | ejercicios_basicos/poo/poo10/test_figura_geo.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | from Cuadrado import Cuadrado
from Rectangulo import Rectangulo
print("Creacion objeto Cuadrado".center(50, "-"))
cuadrado1 = Cuadrado(lado=10, color='azul')
print(cuadrado1)
print(cuadrado1.color)
print(cuadrado1.ancho)
print(cuadrado1.alto)
print(cuadrado1.area())
# trabajando con el metodo MRO - Method Resolution... | 26.478261 | 59 | 0.784893 |
52518f3004b12037b13338b1f21cd61da818f5e7 | 1,399 | py | Python | Gems/AWSCore/Code/Tools/ResourceMappingTool/multithread/worker.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-07-20T12:39:24.000Z | 2021-07-20T12:39:24.000Z | Gems/AWSCore/Code/Tools/ResourceMappingTool/multithread/worker.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | null | null | null | Gems/AWSCore/Code/Tools/ResourceMappingTool/multithread/worker.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-07-20T11:07:25.000Z | 2021-07-20T11:07:25.000Z | """
Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
import sys
import traceback
from PySide2.QtCore import (QObject, QRunnable, Signal, Slot)
| 31.088889 | 155 | 0.64975 |
5253378a89fcd0af689b45bb751a44315a891df5 | 1,252 | py | Python | loopchain/blockchain/blocks/v0_5/block_builder.py | windies21/loopchain | 6e96c8a7e006747af04187155678f2fae59e1389 | [
"Apache-2.0"
] | 105 | 2018-04-03T05:29:08.000Z | 2022-01-28T17:33:20.000Z | loopchain/blockchain/blocks/v0_5/block_builder.py | laurenceyoon/loopchain | e87032779be4715c135c2c91d2757d9c63bf4e31 | [
"Apache-2.0"
] | 135 | 2018-09-04T07:11:02.000Z | 2021-12-15T06:25:47.000Z | loopchain/blockchain/blocks/v0_5/block_builder.py | laurenceyoon/loopchain | e87032779be4715c135c2c91d2757d9c63bf4e31 | [
"Apache-2.0"
] | 46 | 2018-05-07T09:12:07.000Z | 2022-02-23T09:58:37.000Z | # Copyright 2018-current ICON Foundation
#
# 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 ... | 37.939394 | 89 | 0.769968 |
5254529e53215160bd673270bfca00a24d873a10 | 788 | py | Python | calculadora.py | rheimon1/Calculadora | 70e32d3f1e35df4f33b24a3a14255e48864d653d | [
"MIT"
] | null | null | null | calculadora.py | rheimon1/Calculadora | 70e32d3f1e35df4f33b24a3a14255e48864d653d | [
"MIT"
] | null | null | null | calculadora.py | rheimon1/Calculadora | 70e32d3f1e35df4f33b24a3a14255e48864d653d | [
"MIT"
] | null | null | null |
notasProva = []
notasTrabalho = []
quantidadeProva = int(input("Quantidade de provas: "))
for item in range(quantidadeProva):
n = float(input("Nota da prova {}: ".format(item + 1)))
notasProva.append(n)
quantidadeTrabalho = int(input("Quantidade de trabalhos: "))
for item in range(quantidadeTrabalho):
... | 30.307692 | 74 | 0.713198 |
52545d8fefcc154ae114cece82d9ea67a6e8c4b1 | 1,832 | py | Python | lstm-lm/encoder.py | helloMLWo/daga | 88c7a1776ff36bd1abe1026103454e23ec77b552 | [
"MIT"
] | 46 | 2021-02-21T23:19:14.000Z | 2022-03-30T09:40:48.000Z | lstm-lm/encoder.py | helloMLWo/daga | 88c7a1776ff36bd1abe1026103454e23ec77b552 | [
"MIT"
] | 11 | 2021-06-08T11:58:24.000Z | 2022-03-31T10:07:42.000Z | lstm-lm/encoder.py | helloMLWo/daga | 88c7a1776ff36bd1abe1026103454e23ec77b552 | [
"MIT"
] | 6 | 2021-03-29T03:53:12.000Z | 2022-03-01T03:17:06.000Z |
"""Encoder module"""
from __future__ import division
import torch
import torch.nn as nn
from torch.nn.utils.rnn import pack_padded_sequence as pack
from torch.nn.utils.rnn import pad_packed_sequence as unpack
| 32.714286 | 83 | 0.628821 |
52567cbfeeb66ea4c851b3e38405f2786a1b6cc1 | 4,239 | py | Python | StataLovers/StataLovers/main_func.py | Kolpashnikova/StataLoversSource | 34f8f6113680ae0952004ce6fffb1efcb828eca9 | [
"MIT"
] | null | null | null | StataLovers/StataLovers/main_func.py | Kolpashnikova/StataLoversSource | 34f8f6113680ae0952004ce6fffb1efcb828eca9 | [
"MIT"
] | null | null | null | StataLovers/StataLovers/main_func.py | Kolpashnikova/StataLoversSource | 34f8f6113680ae0952004ce6fffb1efcb828eca9 | [
"MIT"
] | null | null | null | import pandas as pd
def summarize(vars, df):
'''
this function prints out descriptive statistics in the similar way that Stata function sum does.
Args:
pandas column of a df
Output: None (print out)
'''
num = max([len(i) for i in vars])
if num < 13:
num = 13
print("{} |... | 51.072289 | 117 | 0.476056 |
5256f8c0d04ee6af4a341be08c61fb9e7dcd7730 | 165 | py | Python | study_notes/proga_mod.py | chicolucio/python_useful_tips | 3a17a77f0f89923ba087188d4acfaadd1d1bfeea | [
"MIT"
] | null | null | null | study_notes/proga_mod.py | chicolucio/python_useful_tips | 3a17a77f0f89923ba087188d4acfaadd1d1bfeea | [
"MIT"
] | null | null | null | study_notes/proga_mod.py | chicolucio/python_useful_tips | 3a17a77f0f89923ba087188d4acfaadd1d1bfeea | [
"MIT"
] | null | null | null | print('Begin', __name__)
print('Defines fA')
if __name__ == "__main__":
print('Calls fA')
fA()
print('End', __name__)
| 11 | 26 | 0.593939 |
52575caa64a642674717cd72e3bc72c2b83b3b27 | 2,238 | py | Python | wdae/wdae/common_reports_api/tests/test_common_reports_api.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | wdae/wdae/common_reports_api/tests/test_common_reports_api.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | 82 | 2019-07-22T11:44:23.000Z | 2022-01-13T15:27:33.000Z | wdae/wdae/common_reports_api/tests/test_common_reports_api.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | import pytest
from rest_framework import status
pytestmark = pytest.mark.usefixtures(
"wdae_gpf_instance", "dae_calc_gene_sets", "use_common_reports"
)
| 26.329412 | 74 | 0.7042 |
5257bb106f5486659c2e12b6df0c6a213ab4a9ac | 8,000 | py | Python | ckan/tests/logic/action/test_create.py | rossjones/ckan-mini | cb39b3de7dcc9d12a64c5f37bcafe6306e9e3412 | [
"Apache-2.0"
] | 3 | 2015-09-30T20:07:52.000Z | 2015-10-01T04:16:31.000Z | ckan/tests/logic/action/test_create.py | rossjones/ckan-mini | cb39b3de7dcc9d12a64c5f37bcafe6306e9e3412 | [
"Apache-2.0"
] | 4 | 2015-09-29T18:29:56.000Z | 2015-10-04T14:55:22.000Z | ckan/tests/logic/action/test_create.py | rossjones/ckan-mini | cb39b3de7dcc9d12a64c5f37bcafe6306e9e3412 | [
"Apache-2.0"
] | null | null | null | '''Unit tests for ckan/logic/auth/create.py.
'''
from pylons import config
import mock
import nose.tools
import ckan.tests.helpers as helpers
import ckan.tests.factories as factories
import ckan.model as model
import ckan.logic as logic
import ckan.plugins as p
assert_equals = nose.tools.assert_equals
assert_raises... | 26.40264 | 75 | 0.550375 |
5258259e0cc916706a7010aa6cabfb31332042c1 | 4,075 | py | Python | Topsis_Samarth_102083050/t_102083050.py | Samarth-Gupta-2909/Topsis_Samarth_102083050 | 1cd91125108bc4887ec0aebf5041ae2763cc4a31 | [
"MIT"
] | null | null | null | Topsis_Samarth_102083050/t_102083050.py | Samarth-Gupta-2909/Topsis_Samarth_102083050 | 1cd91125108bc4887ec0aebf5041ae2763cc4a31 | [
"MIT"
] | null | null | null | Topsis_Samarth_102083050/t_102083050.py | Samarth-Gupta-2909/Topsis_Samarth_102083050 | 1cd91125108bc4887ec0aebf5041ae2763cc4a31 | [
"MIT"
] | null | null | null | import pandas as pd
import os
import sys
if __name__ == "__main__":
main() | 34.82906 | 95 | 0.561963 |