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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38a1aeec73b5c25381b82d560fdb3ca48a37c74c | 701 | py | Python | autoPyTorch/pipeline/components/setup/network_initializer/NoInit.py | ravinkohli/Auto-PyTorch | a1512d56d4db89133e895e85765e3b72afbfe157 | [
"Apache-2.0"
] | 1 | 2021-05-12T10:11:58.000Z | 2021-05-12T10:11:58.000Z | autoPyTorch/pipeline/components/setup/network_initializer/NoInit.py | maxpark/Auto-PyTorch | 06e67de5017b4cccad9398e24a3d9f0bd8176da3 | [
"Apache-2.0"
] | 34 | 2020-10-06T08:06:46.000Z | 2021-01-21T13:23:34.000Z | autoPyTorch/pipeline/components/setup/network_initializer/NoInit.py | maxpark/Auto-PyTorch | 06e67de5017b4cccad9398e24a3d9f0bd8176da3 | [
"Apache-2.0"
] | 1 | 2020-10-14T12:25:47.000Z | 2020-10-14T12:25:47.000Z | from typing import Callable
import torch
from autoPyTorch.pipeline.components.setup.network_initializer.base_network_initializer import (
BaseNetworkInitializerComponent
)
| 28.04 | 96 | 0.707561 |
38a2a7377367a5e064f25d1941e049967ce7ff47 | 747 | py | Python | NSI/Chapitre 6/TP6.py | S-c-r-a-t-c-h-y/coding-projects | cad33aedb72720c3e3a37c7529e55abd3edb291a | [
"MIT"
] | null | null | null | NSI/Chapitre 6/TP6.py | S-c-r-a-t-c-h-y/coding-projects | cad33aedb72720c3e3a37c7529e55abd3edb291a | [
"MIT"
] | null | null | null | NSI/Chapitre 6/TP6.py | S-c-r-a-t-c-h-y/coding-projects | cad33aedb72720c3e3a37c7529e55abd3edb291a | [
"MIT"
] | null | null | null | from arbre_binaire import AB
from dessiner_arbre import dessiner
def hauteur(arbre):
"""Fonction qui renvoie la hauteur d'un arbre binaire"""
# si l'arbre est vide
if arbre is None:
return 0
hg = hauteur(arbre.get_ag())
hd = hauteur(arbre.get_ad())
return max(hg, hd) + 1
def taille... | 18.675 | 60 | 0.637216 |
38a405bed7f1802e2da0c53ab45dbec45d5bdb40 | 5,441 | py | Python | benchmarks/ltl_timed_transition_system/f3/timed_extending_bound.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/ltl_timed_transition_system/f3/timed_extending_bound.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/ltl_timed_transition_system/f3/timed_extending_bound.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from collections import Iterable
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, \
msat_get_bool_type
from mathsat import msat_make_and, msat_make_not, msat_make_or, m... | 37.784722 | 82 | 0.64547 |
38a47549892bc58fb1a7bf130c9891fee8294b1b | 298 | py | Python | Python Examples/Example-FunctionWithNestedIFElse.py | crissyg/SCH-PRACTICE | 9f9042d26361a58c90e5d888e4bda30ada906bae | [
"MIT"
] | null | null | null | Python Examples/Example-FunctionWithNestedIFElse.py | crissyg/SCH-PRACTICE | 9f9042d26361a58c90e5d888e4bda30ada906bae | [
"MIT"
] | null | null | null | Python Examples/Example-FunctionWithNestedIFElse.py | crissyg/SCH-PRACTICE | 9f9042d26361a58c90e5d888e4bda30ada906bae | [
"MIT"
] | null | null | null | # Function with Nested IF Else
printColor('r') # call function
| 21.285714 | 33 | 0.510067 |
38a88169472e58b7b9fe7f0fe6d8780c412d1def | 299 | py | Python | estimators/__init__.py | eliberis/network-prop-estimator | 8a110652e11fa5484b715baf442f0efc4d281a15 | [
"MIT"
] | null | null | null | estimators/__init__.py | eliberis/network-prop-estimator | 8a110652e11fa5484b715baf442f0efc4d281a15 | [
"MIT"
] | null | null | null | estimators/__init__.py | eliberis/network-prop-estimator | 8a110652e11fa5484b715baf442f0efc4d281a15 | [
"MIT"
] | null | null | null | from estimators.weighted_edge_estimator import *
from estimators.weighted_node_estimator import *
from estimators.weighted_triangle_estimator import *
from estimators.formula_edge_estimator import *
from estimators.formula_node_estimator import *
from estimators.formula_triangle_estimator import *
| 42.714286 | 52 | 0.879599 |
38a9891c1ed5cf5b3c0c9127391a91763d0ff3d8 | 673 | py | Python | p3d/__init__.py | Derfies/p3d | 93ff52819d778643afe1dc1ccf296e99fc52c59d | [
"MIT"
] | null | null | null | p3d/__init__.py | Derfies/p3d | 93ff52819d778643afe1dc1ccf296e99fc52c59d | [
"MIT"
] | null | null | null | p3d/__init__.py | Derfies/p3d | 93ff52819d778643afe1dc1ccf296e99fc52c59d | [
"MIT"
] | null | null | null | from pandac.PandaModules import Vec3
P3D_VERSION = '0.1'
__version__ = P3D_VERSION
from constants import *
from functions import *
import commonUtils
from object import Object
from singleTask import SingleTask
from nodePathObject import NodePathObject
from pandaObject import *
from pandaBehaviour import PandaBeh... | 21.03125 | 41 | 0.827637 |
38abddcaea188dde02e036dee74516a15526f072 | 678 | py | Python | project/user/models/user.py | fv316/flask-template-project | 026459b299c7aa4d82c2b59b98e3c929b4786a78 | [
"MIT"
] | 9 | 2017-02-08T21:42:15.000Z | 2021-12-15T05:18:18.000Z | project/user/models/user.py | fv316/flask-template-project | 026459b299c7aa4d82c2b59b98e3c929b4786a78 | [
"MIT"
] | 10 | 2016-07-25T11:00:08.000Z | 2019-09-25T14:56:40.000Z | project/user/models/user.py | fv316/flask-template-project | 026459b299c7aa4d82c2b59b98e3c929b4786a78 | [
"MIT"
] | 7 | 2016-11-01T20:11:03.000Z | 2020-02-04T14:25:49.000Z | # !/usr/bin/python
# -*- coding: utf-8 -*-
from project.database import Base
from sqlalchemy.orm import relationship
from sqlalchemy import Column, Integer, String
from flask_login import UserMixin
from project.user.models.rbac_user_mixin import UserMixin as RBACUserMixin
| 29.478261 | 74 | 0.721239 |
38ad1f303439ed72643aaa239b597b2291139e70 | 1,477 | py | Python | test/convert_to_lemon.py | cltl/FrameNetNLTK | 96883447ff006a90becd24bcfdd96ac82d8ec677 | [
"Apache-2.0"
] | 1 | 2020-07-21T08:15:13.000Z | 2020-07-21T08:15:13.000Z | test/convert_to_lemon.py | cltl/FrameNetNLTK | 96883447ff006a90becd24bcfdd96ac82d8ec677 | [
"Apache-2.0"
] | 2 | 2020-07-14T09:15:34.000Z | 2021-03-31T20:00:29.000Z | test/convert_to_lemon.py | cltl/FrameNetNLTK | 96883447ff006a90becd24bcfdd96ac82d8ec677 | [
"Apache-2.0"
] | null | null | null | import sys
import os
sys.path.insert(0, '../..')
from nltk.corpus import framenet as fn
import FrameNetNLTK
from FrameNetNLTK import load, convert_to_lemon
my_fn = load(folder='test_lexicon',
verbose=2)
output_path = os.path.join(os.getcwd(),
'stats',
... | 32.822222 | 66 | 0.528775 |
38adf5ebd6f269f17c1fa14e7dbf39222e45d753 | 1,362 | py | Python | python/dataProcessing/generatePlots.py | Maplenormandy/list-62x | c1731d0610fdf9e58cb2792d706e8904c549fbd6 | [
"MIT"
] | 1 | 2020-11-07T12:40:59.000Z | 2020-11-07T12:40:59.000Z | python/dataProcessing/generatePlots.py | Maplenormandy/list-62x | c1731d0610fdf9e58cb2792d706e8904c549fbd6 | [
"MIT"
] | null | null | null | python/dataProcessing/generatePlots.py | Maplenormandy/list-62x | c1731d0610fdf9e58cb2792d706e8904c549fbd6 | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from statsmodels.stats.weightstats import ttost_paired
data = pd.read_csv(open('combined_data.csv'))
for t in data.index:
if int(data.loc[t, 'Baseline']) == 0:
data.loc[t, 'STF Baseline'] = data.loc[t, 'Succesfully Tracked Features 0... | 31.674419 | 93 | 0.696035 |
38af66085e0a385bb524dc4be264dbe2d898daba | 1,829 | py | Python | zunzun/app/app.py | aprezcuba24/zunzun | cc294d9dfb84695be0ed1425cf946a0f4ea644a9 | [
"MIT"
] | null | null | null | zunzun/app/app.py | aprezcuba24/zunzun | cc294d9dfb84695be0ed1425cf946a0f4ea644a9 | [
"MIT"
] | null | null | null | zunzun/app/app.py | aprezcuba24/zunzun | cc294d9dfb84695be0ed1425cf946a0f4ea644a9 | [
"MIT"
] | null | null | null | import importlib
from zunzun import CommandRegister
from injector import inject, singleton
from click.core import Group
from zunzun import ListenerConnector
from zunzun import inspect
from pathlib import Path
| 29.5 | 86 | 0.668671 |
38aff846c9fd73e215fb8964d1e02ff8c3aed61f | 775 | py | Python | scitbx/examples/principal_axes_of_inertia.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | scitbx/examples/principal_axes_of_inertia.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | scitbx/examples/principal_axes_of_inertia.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
from scitbx.math import principal_axes_of_inertia
from scitbx.array_family import flex
if (__name__ == "__main__"):
run()
| 26.724138 | 49 | 0.579355 |
38b0b6a64069394c466d60b288074902a86d98b8 | 8,071 | py | Python | ape.py | PhilRW/appdaemon-apps | 96d21f73d0cbb49a29799c1f7bf4c42d98b4be26 | [
"MIT"
] | 5 | 2019-01-30T17:23:30.000Z | 2021-12-27T20:46:13.000Z | ape.py | PhilRW/appdaemon-apps | 96d21f73d0cbb49a29799c1f7bf4c42d98b4be26 | [
"MIT"
] | 1 | 2019-10-02T20:52:45.000Z | 2019-10-02T20:52:45.000Z | ape.py | PhilRW/appdaemon-apps | 96d21f73d0cbb49a29799c1f7bf4c42d98b4be26 | [
"MIT"
] | null | null | null | import bisect
import calendar
import datetime
import pickle
import appdaemon.plugins.hass.hassapi as hass
| 37.365741 | 158 | 0.575022 |
38b116711be814607ed2866ab771fa7d05349727 | 807 | py | Python | main/migrations/0013_game.py | AyushHazard/Samskritam | c5db8e712afe24737cacc6e6f3f27e3fcbe83e26 | [
"MIT"
] | null | null | null | main/migrations/0013_game.py | AyushHazard/Samskritam | c5db8e712afe24737cacc6e6f3f27e3fcbe83e26 | [
"MIT"
] | null | null | null | main/migrations/0013_game.py | AyushHazard/Samskritam | c5db8e712afe24737cacc6e6f3f27e3fcbe83e26 | [
"MIT"
] | 3 | 2021-01-05T18:40:57.000Z | 2021-05-14T07:56:20.000Z | # Generated by Django 3.1.2 on 2021-01-01 05:54
from django.db import migrations, models
| 32.28 | 114 | 0.567534 |
38b351b78225843bd3597a610a0f89e29687ff5d | 2,224 | py | Python | genome_designer/debug/2014_08_05_de_novo_on_dep_data_with_intervals.py | churchlab/millstone | ddb5d003a5b8a7675e5a56bafd5c432d9642b473 | [
"MIT"
] | 45 | 2015-09-30T14:55:33.000Z | 2021-06-28T02:33:30.000Z | genome_designer/debug/2014_08_05_de_novo_on_dep_data_with_intervals.py | churchlab/millstone | ddb5d003a5b8a7675e5a56bafd5c432d9642b473 | [
"MIT"
] | 261 | 2015-06-03T20:41:56.000Z | 2022-03-07T08:46:10.000Z | genome_designer/debug/2014_08_05_de_novo_on_dep_data_with_intervals.py | churchlab/millstone | ddb5d003a5b8a7675e5a56bafd5c432d9642b473 | [
"MIT"
] | 22 | 2015-06-04T20:43:10.000Z | 2022-02-27T08:27:34.000Z | """
Re-running de novo assembly, this time including reads that map to mobile elements.
"""
import os
import sys
# Setup Django environment.
sys.path.append(
os.path.join(os.path.dirname(os.path.realpath(__file__)), '../'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from Bio import SeqIO
from experim... | 30.054054 | 83 | 0.659173 |
38b594515a9bd74963aec29f7d6581b2994b7f2f | 155 | py | Python | controle/admin.py | jeremyrodrigues/auto-ambient-music | a8f622334f921741e0011ef305ac8e991f361d35 | [
"MIT"
] | null | null | null | controle/admin.py | jeremyrodrigues/auto-ambient-music | a8f622334f921741e0011ef305ac8e991f361d35 | [
"MIT"
] | null | null | null | controle/admin.py | jeremyrodrigues/auto-ambient-music | a8f622334f921741e0011ef305ac8e991f361d35 | [
"MIT"
] | null | null | null | from django.contrib import admin
from controle.models import Time, Music
# Register your models here.
admin.site.register(Time)
admin.site.register(Music) | 25.833333 | 39 | 0.812903 |
38b68afd1f09515025017ea53a4f82fcb67e1ec1 | 3,802 | py | Python | src/fvm/scripts/Output.py | drm42/fvm-drm | c9b940e593034f1aa3020d63ff1e09ebef9c182a | [
"MIT"
] | null | null | null | src/fvm/scripts/Output.py | drm42/fvm-drm | c9b940e593034f1aa3020d63ff1e09ebef9c182a | [
"MIT"
] | null | null | null | src/fvm/scripts/Output.py | drm42/fvm-drm | c9b940e593034f1aa3020d63ff1e09ebef9c182a | [
"MIT"
] | null | null | null | import os
import pdb
import fvm.models_atyped_double as models
import fvm.exporters_atyped_double as exporters
| 38.795918 | 85 | 0.588638 |
38b765a30bc55c0417892d2304fc6cfeafcf844e | 2,663 | py | Python | forecasting/src/autogluon/forecasting/trainer/auto_trainer.py | sgdread/autogluon | fa95c72a07066dc5380fccf8bbce04b5c031fc68 | [
"Apache-2.0"
] | null | null | null | forecasting/src/autogluon/forecasting/trainer/auto_trainer.py | sgdread/autogluon | fa95c72a07066dc5380fccf8bbce04b5c031fc68 | [
"Apache-2.0"
] | null | null | null | forecasting/src/autogluon/forecasting/trainer/auto_trainer.py | sgdread/autogluon | fa95c72a07066dc5380fccf8bbce04b5c031fc68 | [
"Apache-2.0"
] | null | null | null | import logging
from typing import Dict, Union, Optional, Any
from ..models.presets import get_preset_models
from .abstract_trainer import AbstractForecastingTrainer, TimeSeriesDataFrame
logger = logging.getLogger(__name__)
| 39.746269 | 105 | 0.66917 |
38bc9b8fe1468f99ebc3819879722d06bb84ef06 | 3,895 | py | Python | snippet/example/python/sqlalchemy-orm-model.py | yp2800/snippet | 054af596655007cbec81340bd166489e706fffe6 | [
"MIT"
] | 94 | 2016-09-22T09:13:19.000Z | 2022-03-30T07:35:35.000Z | snippet/example/python/sqlalchemy-orm-model.py | yp2800/snippet | 054af596655007cbec81340bd166489e706fffe6 | [
"MIT"
] | 1 | 2020-11-22T03:05:05.000Z | 2020-11-22T03:05:05.000Z | snippet/example/python/sqlalchemy-orm-model.py | yp2800/snippet | 054af596655007cbec81340bd166489e706fffe6 | [
"MIT"
] | 38 | 2017-06-11T22:03:04.000Z | 2022-03-10T07:46:39.000Z | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# Copyright 2012 Cloudscaling Group, Inc.
# All Rights Reserved.
#
# Licens... | 33.577586 | 84 | 0.610013 |
38bd28fcad4376d276bb778bd1eda275fd9ee34f | 4,417 | py | Python | boofuzz/boofuzz/connections/raw_l3_socket_connection.py | mrTavas/owasp-fstm-auto | 6e9ff36e46d885701c7419db3eca15f12063a7f3 | [
"CC0-1.0"
] | 2 | 2021-05-05T12:03:01.000Z | 2021-06-04T14:27:15.000Z | boofuzz/boofuzz/connections/raw_l3_socket_connection.py | mrTavas/owasp-fstm-auto | 6e9ff36e46d885701c7419db3eca15f12063a7f3 | [
"CC0-1.0"
] | null | null | null | boofuzz/boofuzz/connections/raw_l3_socket_connection.py | mrTavas/owasp-fstm-auto | 6e9ff36e46d885701c7419db3eca15f12063a7f3 | [
"CC0-1.0"
] | 2 | 2021-05-05T12:03:09.000Z | 2021-06-04T14:27:21.000Z | from __future__ import absolute_import
import errno
import socket
import sys
from future.utils import raise_
from boofuzz import exception
from boofuzz.connections import base_socket_connection
ETH_P_ALL = 0x0003 # Ethernet protocol: Every packet, see Linux if_ether.h docs for more details.
ETH_P_IP = 0x0800 # Et... | 34.779528 | 118 | 0.617161 |
38bdb7392ff396c9dcaf7942ad720334e0d7365e | 4,143 | py | Python | django_google_dork/migrations/0001_initial.py | chgans/django-google-dork | c8735f2d2a9740844001cf4430263ea79827102f | [
"BSD-2-Clause"
] | 1 | 2019-07-21T02:32:03.000Z | 2019-07-21T02:32:03.000Z | django_google_dork/migrations/0001_initial.py | chgans/django-google-dork | c8735f2d2a9740844001cf4430263ea79827102f | [
"BSD-2-Clause"
] | null | null | null | django_google_dork/migrations/0001_initial.py | chgans/django-google-dork | c8735f2d2a9740844001cf4430263ea79827102f | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django_google_dork.models
import model_utils.fields
import django.utils.timezone
| 39.457143 | 149 | 0.567946 |
38be80c430f81bba9147dbcca0e967396cdc2c5c | 5,314 | py | Python | model2.py | incredible-vision/show-and-tell | 0a10c2064c34dbc4a4097976870922f723ee4d63 | [
"MIT"
] | 8 | 2018-04-25T11:07:36.000Z | 2020-07-14T09:17:58.000Z | model2.py | incredible-vision/show-and-tell | 0a10c2064c34dbc4a4097976870922f723ee4d63 | [
"MIT"
] | null | null | null | model2.py | incredible-vision/show-and-tell | 0a10c2064c34dbc4a4097976870922f723ee4d63 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
from torch.autograd import Variable
from torchvision.models import vgg16
from torch.nn.utils.rnn import pack_padded_sequence | 46.614035 | 173 | 0.652804 |
38be9241383135c31416fcbdb7bbbe1661a5308b | 770 | py | Python | src/fruit_castle/hadwin/hadwin.py | brownboycodes/common-api-server | a3cf92395de31a3dd0c927003e7919d3c74c300f | [
"MIT"
] | 2 | 2021-11-15T06:04:00.000Z | 2021-12-30T11:45:34.000Z | src/fruit_castle/hadwin/hadwin.py | brownboycodes/common-api-server | a3cf92395de31a3dd0c927003e7919d3c74c300f | [
"MIT"
] | null | null | null | src/fruit_castle/hadwin/hadwin.py | brownboycodes/common-api-server | a3cf92395de31a3dd0c927003e7919d3c74c300f | [
"MIT"
] | null | null | null | from flask import Blueprint, abort, jsonify, render_template
from src.fruit_castle.hadwin.utilities import get_json_data
from .v1.version_1 import v1
from .v2.version_2 import v2
from .v3.version_3 import v3
hadwin = Blueprint('hadwin', __name__, url_prefix='/hadwin',static_url_path='/dist',
static_folde... | 28.518519 | 85 | 0.755844 |
38bf08dd063a876b0519dcc7594eeaa4f9ce3eaf | 636 | py | Python | tests/formatting/catch_for_formatting_tests.py | friendly-traceback/friendly-traceback | 4f6785f14c271a4d6412ef19c140f9d380cdbcbf | [
"MIT"
] | 45 | 2021-07-06T03:30:20.000Z | 2022-03-16T17:30:58.000Z | tests/formatting/catch_for_formatting_tests.py | friendly-traceback/friendly-traceback | 4f6785f14c271a4d6412ef19c140f9d380cdbcbf | [
"MIT"
] | 110 | 2021-06-28T11:48:46.000Z | 2022-03-25T20:41:25.000Z | tests/formatting/catch_for_formatting_tests.py | friendly-traceback/friendly-traceback | 4f6785f14c271a4d6412ef19c140f9d380cdbcbf | [
"MIT"
] | 4 | 2021-07-05T20:56:39.000Z | 2021-11-11T20:24:34.000Z | import pytest
import friendly_traceback
from friendly_traceback.console_helpers import _get_info
from ..syntax_errors_formatting_cases import descriptions
friendly_traceback.set_lang("en")
where = "parsing_error_source"
cause = "cause"
| 27.652174 | 64 | 0.75 |
38bf528d15683cec4fc4c025265cae0fee582289 | 1,783 | py | Python | solutions/day17.py | rds504/AoC-2020 | 3901a22863ed4479a8cd02f2fa5ea55d5f1f5739 | [
"MIT"
] | null | null | null | solutions/day17.py | rds504/AoC-2020 | 3901a22863ed4479a8cd02f2fa5ea55d5f1f5739 | [
"MIT"
] | null | null | null | solutions/day17.py | rds504/AoC-2020 | 3901a22863ed4479a8cd02f2fa5ea55d5f1f5739 | [
"MIT"
] | null | null | null | from itertools import product
from tools.general import load_input_list
starting_grid = [list(row) for row in load_input_list("day17.txt")]
print(f"Part 1 => {iterate_grid(starting_grid, 3, 6)}")
print(f"Part 1 => {iterate_grid(starting_grid, 4, 6)}")
| 27.430769 | 81 | 0.637128 |
38bf5342401beda94ff276289636e79b34f8c426 | 1,318 | py | Python | app/endpoints/sillyusers/gen_user.py | kant/test-api | 2b2ab5b722dbf18cd99906b27fda356d02ae7a52 | [
"MIT"
] | 9 | 2019-05-22T08:46:01.000Z | 2021-12-10T06:44:56.000Z | app/endpoints/sillyusers/gen_user.py | kant/test-api | 2b2ab5b722dbf18cd99906b27fda356d02ae7a52 | [
"MIT"
] | 285 | 2019-09-03T00:52:39.000Z | 2022-02-13T02:13:59.000Z | app/endpoints/sillyusers/gen_user.py | kant/test-api | 2b2ab5b722dbf18cd99906b27fda356d02ae7a52 | [
"MIT"
] | 4 | 2019-09-19T18:14:09.000Z | 2020-12-15T18:35:07.000Z | # -*- coding: utf-8 -*-
import random
import uuid
import silly
| 28.652174 | 52 | 0.603187 |
38c35f6af1e202d4be9125e181898d11876f48c9 | 759 | py | Python | applications/Corpus/controllers/MI.py | jolivaresc/corpus | 1d2f3885778c29cb56dd1447140376e3e7cd5831 | [
"BSD-3-Clause"
] | 1 | 2017-07-25T20:15:56.000Z | 2017-07-25T20:15:56.000Z | applications/Corpus/controllers/MI.py | jolivaresc/corpus | 1d2f3885778c29cb56dd1447140376e3e7cd5831 | [
"BSD-3-Clause"
] | null | null | null | applications/Corpus/controllers/MI.py | jolivaresc/corpus | 1d2f3885778c29cb56dd1447140376e3e7cd5831 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from numpy import log2
from pickle import load
"""
* Clase que se encarga de ver la informacin mutua que hay entre dos tokens
* sirve para determinar si es colocacin o no
"""
| 22.323529 | 75 | 0.642951 |
38c367440c32df5c349c8e3577e4146c8b52d7fb | 15,762 | py | Python | tests/test_cli.py | chrahunt/quicken | 2dd00a5f024d7b114b211aad8a2618ec8f101956 | [
"MIT"
] | 3 | 2019-11-12T17:56:08.000Z | 2022-03-12T03:43:10.000Z | tests/test_cli.py | chrahunt/quicken | 2dd00a5f024d7b114b211aad8a2618ec8f101956 | [
"MIT"
] | 47 | 2018-12-10T04:08:58.000Z | 2022-03-20T14:54:36.000Z | tests/test_cli.py | chrahunt/quicken | 2dd00a5f024d7b114b211aad8a2618ec8f101956 | [
"MIT"
] | 1 | 2019-11-12T17:55:17.000Z | 2019-11-12T17:55:17.000Z | import logging
import os
import subprocess
import sys
from contextlib import contextmanager
from pathlib import Path
from textwrap import dedent
import pytest
from quicken._internal.cli.cli import get_arg_parser, parse_file
from quicken._internal.constants import (
DEFAULT_IDLE_TIMEOUT,
ENV_IDLE_TIMEOUT,
... | 28.815356 | 87 | 0.568646 |
38c660adbca3d15d5ca02084209f151a1d111447 | 19,353 | py | Python | bmtk/simulator/popnet/popsimulator.py | hernando/bmtk | 57e6924819a74f41ed94a34f55e6ebed0525d037 | [
"BSD-3-Clause"
] | 1 | 2019-03-27T12:23:09.000Z | 2019-03-27T12:23:09.000Z | bmtk/simulator/popnet/popsimulator.py | hernando/bmtk | 57e6924819a74f41ed94a34f55e6ebed0525d037 | [
"BSD-3-Clause"
] | null | null | null | bmtk/simulator/popnet/popsimulator.py | hernando/bmtk | 57e6924819a74f41ed94a34f55e6ebed0525d037 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017. Allen Institute. All rights reserved
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the follow... | 42.911308 | 131 | 0.644293 |
38c826bb3c6dbbd679effc96ae41e5e3bbce3014 | 4,899 | py | Python | magnrings.py | Qvapil/Electromagnetic_Fields_B_2020 | 9fe139ff6574582ef64861261b0ee8c98a481a63 | [
"MIT"
] | 3 | 2021-08-18T08:47:33.000Z | 2022-03-05T13:14:00.000Z | magnrings.py | Qvapil/Electromagnetic_Fields_B_2020 | 9fe139ff6574582ef64861261b0ee8c98a481a63 | [
"MIT"
] | null | null | null | magnrings.py | Qvapil/Electromagnetic_Fields_B_2020 | 9fe139ff6574582ef64861261b0ee8c98a481a63 | [
"MIT"
] | 1 | 2021-12-22T11:57:30.000Z | 2021-12-22T11:57:30.000Z | import matplotlib.pyplot as plt
import matplotlib.cm as cm
import numpy as np
import math
#constants
d=2
h=1
a=0.1
I=1
#Axes
N=100
xmin=0
xmax=4
xx=np.linspace(xmin,xmax,N)
ymin=0
ymax=4
yy=np.linspace(ymin,ymax,N)
zmin=-2
zmax=2
zz=np.linspace(zmin,zmax,N)
X,Z=np.meshgrid(xx,zz)
XX,Y=np.meshgrid(xx,yy)
YY,ZZ=np.... | 27.368715 | 131 | 0.611962 |
38ca028dcd1cdce17bd930dfa88dbdd8830ed96c | 1,151 | py | Python | examples/video.py | ankur09011/pycozmo | cd8492a141d61f6fd0119066d4e38528cef61fab | [
"MIT"
] | 1 | 2021-01-11T20:34:38.000Z | 2021-01-11T20:34:38.000Z | examples/video.py | ankur09011/pycozmo | cd8492a141d61f6fd0119066d4e38528cef61fab | [
"MIT"
] | null | null | null | examples/video.py | ankur09011/pycozmo | cd8492a141d61f6fd0119066d4e38528cef61fab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import time
import pycozmo
# Last image, received from the robot.
last_im = None
def on_camera_image(cli, new_im):
""" Handle new images, coming from the robot. """
del cli
global last_im
last_im = new_im
pycozmo.run_program(pycozmo_program, protocol_log_level="INFO", rob... | 20.927273 | 95 | 0.636838 |
38cabe0c4bced6b634c68a59cf4f8f5117b14f51 | 394 | py | Python | 2020/aoc6.py | lachtanek/advent-of-code | dc83d82d46392adc073191161c2767e684d776bd | [
"MIT"
] | null | null | null | 2020/aoc6.py | lachtanek/advent-of-code | dc83d82d46392adc073191161c2767e684d776bd | [
"MIT"
] | null | null | null | 2020/aoc6.py | lachtanek/advent-of-code | dc83d82d46392adc073191161c2767e684d776bd | [
"MIT"
] | null | null | null | from functools import reduce
data = []
with open("aoc6.inp") as rf:
sets = []
for l in rf:
if l == "\n":
data.append(sets)
sets = []
else:
sets.append(set([c for c in l.strip()]))
a1 = a2 = 0
for sets in data:
a1 += len(reduce(lambda s1, s2: s1 | s2, s... | 17.909091 | 52 | 0.5 |
38cae31a92a87d74ef017b14b1ce771550e7fc51 | 513 | py | Python | hello_tradera.py | ErikAndren/hello_tradera | d318bf1c187a91f81d8452d0466cc837befafe34 | [
"MIT"
] | null | null | null | hello_tradera.py | ErikAndren/hello_tradera | d318bf1c187a91f81d8452d0466cc837befafe34 | [
"MIT"
] | null | null | null | hello_tradera.py | ErikAndren/hello_tradera | d318bf1c187a91f81d8452d0466cc837befafe34 | [
"MIT"
] | null | null | null | import zeep
import logging
logging.getLogger('zeep').setLevel(logging.ERROR)
publicServiceUrl = 'https://api.tradera.com/v3/PublicService.asmx'
appId = 'REPLACE ME WITH TRADERA ID'
appKey = 'REPLACE ME WITH TRADERA KEY'
wsdl = 'https://api.tradera.com/v3/PublicService.asmx?WSDL'
client = zeep.Client(wsdl=wsdl)
au... | 20.52 | 66 | 0.699805 |
38caeb5a78603a7d077226028381762fc6c61e0d | 1,611 | py | Python | messungen/decrypt_trace.py | tihmstar/gido_public | dcc523603b9a27b37752211715a10e30b51ce812 | [
"Unlicense"
] | 16 | 2021-04-10T16:28:00.000Z | 2021-12-12T10:15:23.000Z | messungen/decrypt_trace.py | tihmstar/gido_public | dcc523603b9a27b37752211715a10e30b51ce812 | [
"Unlicense"
] | null | null | null | messungen/decrypt_trace.py | tihmstar/gido_public | dcc523603b9a27b37752211715a10e30b51ce812 | [
"Unlicense"
] | 2 | 2021-04-10T16:32:36.000Z | 2021-04-11T14:13:45.000Z | import struct
import sys
import binascii
import tarfile
import usb
import recovery
BLOCKS_CNT = 8
if len(sys.argv) < 2:
print("Usage: %s <path>"%sys.argv[0])
exit(0)
infile = sys.argv[1]
if infile[-len(".tar.gz"):] == ".tar.gz":
print("cant open compressed file!")
exit(1)
else:
f = open(infile,... | 19.409639 | 66 | 0.612042 |
38caf61d9a9e8681b2748236a9dabcabd645543a | 1,075 | py | Python | ghnotifier/menu.py | iamtalhaasghar/ghnotifier | 7bbcbc32abc8ad923bff64055cb19ac042a03764 | [
"MIT"
] | 1 | 2022-02-03T05:30:22.000Z | 2022-02-03T05:30:22.000Z | ghnotifier/menu.py | iamtalhaasghar/ghnotifier | 7bbcbc32abc8ad923bff64055cb19ac042a03764 | [
"MIT"
] | 5 | 2018-10-30T13:03:24.000Z | 2022-02-03T06:06:08.000Z | ghnotifier/menu.py | iamtalhaasghar/ghnotifier | 7bbcbc32abc8ad923bff64055cb19ac042a03764 | [
"MIT"
] | 1 | 2022-02-03T06:02:02.000Z | 2022-02-03T06:02:02.000Z | #!/usr/bin/env python3
import webbrowser
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from ghnotifier.notifier import Notifier
from ghnotifier.settings import Settings
| 21.5 | 61 | 0.655814 |
38cb1f29849026e4492f8972be47ed86aeea596c | 118 | py | Python | apps/enterprice/apps.py | jimforit/lagou | 165593a15597012092b5e0ba34158fbc1d1c213d | [
"MIT"
] | 2 | 2019-03-11T03:58:19.000Z | 2020-03-06T06:45:28.000Z | apps/enterprice/apps.py | jimforit/lagou | 165593a15597012092b5e0ba34158fbc1d1c213d | [
"MIT"
] | 5 | 2020-06-05T20:04:20.000Z | 2021-09-08T00:53:52.000Z | apps/enterprice/apps.py | jimforit/lagou | 165593a15597012092b5e0ba34158fbc1d1c213d | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 19.666667 | 34 | 0.737288 |
38cc7e10e59cc8a253d9de4a014ba672e471157d | 1,297 | py | Python | python/utils/LaplacianLoss.py | aytewari/GVV-Differentiable-CUDA-Renderer | 5da6bdab3fd44074ae752bd8192fc2aad9fb77e6 | [
"CC-BY-4.0"
] | 40 | 2020-10-09T06:13:32.000Z | 2021-04-09T21:48:29.000Z | python/utils/LaplacianLoss.py | ayushtewari/GVV-Differentiable-CUDA-Renderer | 5da6bdab3fd44074ae752bd8192fc2aad9fb77e6 | [
"CC-BY-4.0"
] | 2 | 2020-10-10T07:16:33.000Z | 2021-03-27T09:07:57.000Z | python/utils/LaplacianLoss.py | ayushtewari/GVV-Differentiable-CUDA-Renderer | 5da6bdab3fd44074ae752bd8192fc2aad9fb77e6 | [
"CC-BY-4.0"
] | 2 | 2021-06-29T15:40:03.000Z | 2022-01-31T16:09:44.000Z |
import tensorflow as tf
########################################################################################################################
# Isometry Loss
########################################################################################################################
###################################... | 37.057143 | 120 | 0.505783 |
38ccad75a3a0fee55c8afb6cdcb6e3fd50a68c98 | 1,571 | py | Python | scripts/logfetch/search.py | madhuri7112/Singularity | 11a533ecf2baaa1a4a74404b3de435e8d5b7d1a3 | [
"Apache-2.0"
] | 692 | 2015-01-02T02:30:23.000Z | 2022-03-18T08:16:05.000Z | scripts/logfetch/search.py | madhuri7112/Singularity | 11a533ecf2baaa1a4a74404b3de435e8d5b7d1a3 | [
"Apache-2.0"
] | 1,399 | 2015-01-01T10:52:44.000Z | 2022-03-17T18:27:23.000Z | scripts/logfetch/search.py | mikebell90/Singularity | 290d647ee3cd5ddfbf381d09d22fdce1896e3388 | [
"Apache-2.0"
] | 280 | 2015-01-02T02:30:33.000Z | 2022-03-03T21:08:33.000Z | import os
import re
import fnmatch
from logfetch_base import log, is_in_date_range
from termcolor import colored
| 38.317073 | 106 | 0.630172 |
38cd88d6a9d8806c77424757ca3b6620a2526f67 | 307 | py | Python | algorithms/in_order.py | AutuanLiu/LeetCode2019 | 8efc7c5475fd888f7d86c3b08a3c1c9e55c1ac30 | [
"MIT"
] | 1 | 2019-06-20T07:43:59.000Z | 2019-06-20T07:43:59.000Z | algorithms/in_order.py | AutuanLiu/Code-Storm2019 | 8efc7c5475fd888f7d86c3b08a3c1c9e55c1ac30 | [
"MIT"
] | null | null | null | algorithms/in_order.py | AutuanLiu/Code-Storm2019 | 8efc7c5475fd888f7d86c3b08a3c1c9e55c1ac30 | [
"MIT"
] | null | null | null | #
# Definition for a binary tree node.
| 21.928571 | 36 | 0.648208 |
38cee6d2267200542e95138691f1ada5ab2fedde | 1,485 | py | Python | predict_bw_lstm1.py | kyeongsoo/dash-simulation | ceccfee61d7102146e83b0a2d60d87693c871198 | [
"MIT"
] | null | null | null | predict_bw_lstm1.py | kyeongsoo/dash-simulation | ceccfee61d7102146e83b0a2d60d87693c871198 | [
"MIT"
] | null | null | null | predict_bw_lstm1.py | kyeongsoo/dash-simulation | ceccfee61d7102146e83b0a2d60d87693c871198 | [
"MIT"
] | 1 | 2020-06-06T14:02:35.000Z | 2020-06-06T14:02:35.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
##
# @file predict_bw_lstm1.py
# @author Kyeong Soo (Joseph) Kim <Kyeongsoo.Kim@xjtlu.edu.cn>
# @date 2019-04-22
# 2022-03-23 - updated for TensorFlow version 2.6
#
# @brief Predict channel bandwidth.
#
# @remarks This code is based on the nice samp... | 33.75 | 121 | 0.675421 |
38cf20797afd513c24dc827a849f4617f931df33 | 586 | py | Python | tests/integration/test_todo.py | nomilkinmyhome/todo-list | c596fa2003630de95e55ebe7d3420d9999270c97 | [
"WTFPL"
] | 3 | 2020-10-05T16:50:02.000Z | 2021-01-01T17:36:22.000Z | tests/integration/test_todo.py | nomilkinmyhome/todo-list | c596fa2003630de95e55ebe7d3420d9999270c97 | [
"WTFPL"
] | 8 | 2020-10-05T20:59:01.000Z | 2021-01-30T12:19:15.000Z | tests/integration/test_todo.py | nomilkinmyhome/todo-list | c596fa2003630de95e55ebe7d3420d9999270c97 | [
"WTFPL"
] | null | null | null | from src.use_cases.todo import create_todo, update_todo
| 25.478261 | 58 | 0.668942 |
38d140e56cdd3b97964478d31b7516e144cef25a | 4,818 | py | Python | src/loopHandler.py | jerryduan07/gametime | 43fbd6ae7f83c9ebf55dbedb4f98ce064c04514c | [
"BSD-3-Clause"
] | null | null | null | src/loopHandler.py | jerryduan07/gametime | 43fbd6ae7f83c9ebf55dbedb4f98ce064c04514c | [
"BSD-3-Clause"
] | null | null | null | src/loopHandler.py | jerryduan07/gametime | 43fbd6ae7f83c9ebf55dbedb4f98ce064c04514c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""Exposes functions to perform a source-to-source transformation
that detects and unrolls loops in the code being analyzed.
"""
"""See the LICENSE file, located in the root directory of
the source distribution and
at http://verifun.eecs.berkeley.edu/gametime/about/LICENSE,
for details on the Ga... | 37.061538 | 79 | 0.695724 |
38d24f0b77db0580d1f6a1183215410fe0692d65 | 859 | py | Python | Python/Maths/factorielle.py | GeneralNZR/maths-and-javascript | 8a0e638e59808b1d987269dddac0b99c96c78c4a | [
"MIT"
] | 3 | 2021-10-01T06:11:28.000Z | 2021-10-04T20:50:07.000Z | Python/Maths/factorielle.py | GeneralNZR/maths-and-javascript | 8a0e638e59808b1d987269dddac0b99c96c78c4a | [
"MIT"
] | null | null | null | Python/Maths/factorielle.py | GeneralNZR/maths-and-javascript | 8a0e638e59808b1d987269dddac0b99c96c78c4a | [
"MIT"
] | null | null | null | def factorielle_rec(n: int) -> int:
"""
Description:
Factorielle mthode rcursive
Paramtres:
n: {int} -- Nombre factorielle
Retourne:
{int} -- Factorielle de n
Exemple:
>>> factorielle_rec(100)
9.332622e+157
Pour l'criture scientifique:... | 21.475 | 65 | 0.549476 |
38d2a0a5641034d2ed2a1afa289cfad9836977ff | 8,928 | py | Python | Gui.py | LLCoolDave/ALttPEntranceRandomizer | 963ce00657321fb7eeee185fa4e8bb063bff30c5 | [
"MIT"
] | 17 | 2017-05-22T10:55:58.000Z | 2020-12-23T21:44:47.000Z | Gui.py | LLCoolDave/ALttPEntranceRandomizer | 963ce00657321fb7eeee185fa4e8bb063bff30c5 | [
"MIT"
] | 15 | 2017-05-22T12:14:55.000Z | 2019-07-19T21:00:28.000Z | Gui.py | LLCoolDave/ALttPEntranceRandomizer | 963ce00657321fb7eeee185fa4e8bb063bff30c5 | [
"MIT"
] | 15 | 2017-05-23T16:09:44.000Z | 2022-01-22T09:09:27.000Z | from Main import main, __version__ as ESVersion
from argparse import Namespace
import random
from tkinter import Checkbutton, OptionMenu, Tk, LEFT, RIGHT, BOTTOM, TOP, StringVar, IntVar, Frame, Label, W, E, Entry, Spinbox, Button, filedialog, messagebox
if __name__ == '__main__':
guiMain()
| 40.216216 | 160 | 0.701053 |
38d2f4460dbc9cd2bf0ff51a444458ddda0cea71 | 11,293 | py | Python | src/dmri/coregister.py | erramuzpe/ruber | cf510a4cf9b0b15d870b6506a1593c3b2b00a3b7 | [
"MIT"
] | 2 | 2018-11-07T07:54:34.000Z | 2022-01-13T13:06:06.000Z | src/dmri/coregister.py | erramuzpe/ruber | cf510a4cf9b0b15d870b6506a1593c3b2b00a3b7 | [
"MIT"
] | null | null | null | src/dmri/coregister.py | erramuzpe/ruber | cf510a4cf9b0b15d870b6506a1593c3b2b00a3b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Nipype workflows to co-register anatomical MRI to diffusion MRI.
"""
from src.env import DATA
import nipype.pipeline.engine as pe
from nipype.interfaces.fsl import MultiImageMaths
from nipype.interfaces.utility import IdentityInterface, Select, Split
from nipype.algorithms.misc import Gunzi... | 41.981413 | 130 | 0.595679 |
38d36df65b3ed1c6bdcd5d1855bfdf3aac9db033 | 14,536 | py | Python | huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/model/apply_individual_realname_auths_req.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/model/apply_individual_realname_auths_req.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/model/apply_individual_realname_auths_req.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
def to_str(self):
"""Returns the string representation of the model"""
import simplejson as json
if six.PY2:
import sys
reload(sys)
sys.se... | 45.003096 | 1,131 | 0.717735 |
38d42eb30da6ce6e341aef340a29b43528065a7b | 626 | py | Python | tests/test_pack_data.py | derekmerck/endpoint | 5b74f0b3303bbf419a6c9f71e9a4a156583bf51d | [
"MIT"
] | null | null | null | tests/test_pack_data.py | derekmerck/endpoint | 5b74f0b3303bbf419a6c9f71e9a4a156583bf51d | [
"MIT"
] | null | null | null | tests/test_pack_data.py | derekmerck/endpoint | 5b74f0b3303bbf419a6c9f71e9a4a156583bf51d | [
"MIT"
] | null | null | null | from datetime import datetime
from pprint import pprint
from cryptography.fernet import Fernet
from libsvc.utils import pack_data, unpack_data
if __name__ == "__main__":
pack_data_test()
| 21.586207 | 54 | 0.627796 |
38d4b485fb5c15efab7f549f01ad1328142294e2 | 361 | py | Python | threading/part6.py | kryvokhyzha/examples-and-courses | 477e82ee24e6abba8a6b6d92555f2ed549ca682c | [
"MIT"
] | 1 | 2021-12-13T15:41:48.000Z | 2021-12-13T15:41:48.000Z | threading/part6.py | kryvokhyzha/examples-and-courses | 477e82ee24e6abba8a6b6d92555f2ed549ca682c | [
"MIT"
] | 15 | 2021-09-12T15:06:13.000Z | 2022-03-31T19:02:08.000Z | threading/part6.py | kryvokhyzha/examples-and-courses | 477e82ee24e6abba8a6b6d92555f2ed549ca682c | [
"MIT"
] | 1 | 2022-01-29T00:37:52.000Z | 2022-01-29T00:37:52.000Z | import threading
import queue
import time
q = queue.Queue()
t = threading.Thread(target=putting_thread, args=(q,), daemon=True)
t.start()
q.put(0)
print(q.get(), 'first item')
print('----')
print(q.get(), 'finish')
| 15.695652 | 67 | 0.617729 |
38d56c4e68352399b46ecce8e483eb237d03b4c0 | 1,604 | py | Python | iris_sdk/models/portin.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/portin.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/portin.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from __future__ import division, absolute_import, print_function
from future.builtins import super
from iris_sdk.models.activation_status import ActivationStatus
from iris_sdk.models.base_resource import BaseResource
from iris_sdk.models.data.portin import PortInData
from iris_sdk.models.history... | 25.460317 | 64 | 0.703865 |
38d6262e5df4e8207a9017b092a7fbda44ff1889 | 9,109 | py | Python | lib/common_lib.py | JakubWS/imap-mailbox-backup-tool | 8576b9aa2a9f3392a6c657cd40247cd71a83af49 | [
"MIT"
] | null | null | null | lib/common_lib.py | JakubWS/imap-mailbox-backup-tool | 8576b9aa2a9f3392a6c657cd40247cd71a83af49 | [
"MIT"
] | null | null | null | lib/common_lib.py | JakubWS/imap-mailbox-backup-tool | 8576b9aa2a9f3392a6c657cd40247cd71a83af49 | [
"MIT"
] | null | null | null |
from __future__ import unicode_literals
from encodings import utf_8
import imaplib, datetime, time, re, requests, yaml, os, email, glob, shutil, mailbox, smtplib, ssl, hashlib
from zipfile import ZipFile
from email.header import decode_header
from os.path import exists as file_exists
from os.path import basename
from ... | 42.966981 | 142 | 0.545834 |
38d68c3be83a3f35ee2c9d807898670a1ff4278e | 575 | py | Python | test/helpers/pylint/findWarnings.py | drewrisinger/pyGSTi | dd4ad669931c7f75e026456470cf33ac5b682d0d | [
"Apache-2.0"
] | 1 | 2021-12-19T15:11:09.000Z | 2021-12-19T15:11:09.000Z | test/helpers/pylint/findWarnings.py | drewrisinger/pyGSTi | dd4ad669931c7f75e026456470cf33ac5b682d0d | [
"Apache-2.0"
] | null | null | null | test/helpers/pylint/findWarnings.py | drewrisinger/pyGSTi | dd4ad669931c7f75e026456470cf33ac5b682d0d | [
"Apache-2.0"
] | null | null | null | from .helpers import get_pylint_output, write_output
from ..automation_tools import read_json
| 44.230769 | 79 | 0.633043 |
38d7b65bf66287fe4e9a38e2e928310e83dfbed0 | 47,316 | py | Python | orangecontrib/esrf/syned/widgets/extension/ow_ebs.py | oasys-esrf-kit/OASYS1-ESRF-Extensions | 5df1ac01a1319d900380196c850504e09e36f9d6 | [
"MIT"
] | null | null | null | orangecontrib/esrf/syned/widgets/extension/ow_ebs.py | oasys-esrf-kit/OASYS1-ESRF-Extensions | 5df1ac01a1319d900380196c850504e09e36f9d6 | [
"MIT"
] | null | null | null | orangecontrib/esrf/syned/widgets/extension/ow_ebs.py | oasys-esrf-kit/OASYS1-ESRF-Extensions | 5df1ac01a1319d900380196c850504e09e36f9d6 | [
"MIT"
] | 1 | 2020-06-22T05:46:07.000Z | 2020-06-22T05:46:07.000Z | import os, sys
import numpy
import scipy.constants as codata
from syned.storage_ring.magnetic_structures.undulator import Undulator
from syned.storage_ring.magnetic_structures import insertion_device
from PyQt5.QtGui import QPalette, QColor, QFont
from PyQt5.QtWidgets import QMessageBox, QApplication
from PyQt5.QtC... | 45.715942 | 207 | 0.622897 |
38d929d0301c7b6e0ff15401a2613c1800d9088f | 139 | py | Python | test_project/test_app/urls.py | ninemoreminutes/django-trails | fabe179fc4b5829f8c73805faa027f5e866ade7c | [
"BSD-3-Clause"
] | 2 | 2018-10-18T19:34:40.000Z | 2019-11-13T16:00:53.000Z | test_project/test_app/urls.py | ninemoreminutes/django-trails | fabe179fc4b5829f8c73805faa027f5e866ade7c | [
"BSD-3-Clause"
] | 4 | 2020-02-11T23:21:07.000Z | 2020-06-05T19:21:05.000Z | test_project/test_app/urls.py | ninemoreminutes/django-trails | fabe179fc4b5829f8c73805faa027f5e866ade7c | [
"BSD-3-Clause"
] | null | null | null | # Django
from django.urls import re_path
# Test App
from .views import index
urlpatterns = [
re_path(r'^$', index, name='index'),
]
| 12.636364 | 40 | 0.669065 |
38da00d41601d677e1dec72d26270b4ae74fa86c | 5,927 | py | Python | bin/analysis/ipa/constraints/node.py | ncbray/pystream | 70bba5646d6512adb6803564c22268d3424c66d8 | [
"Apache-2.0"
] | 6 | 2015-09-19T18:22:33.000Z | 2020-11-29T15:21:17.000Z | bin/analysis/ipa/constraints/node.py | ncbray/pystream | 70bba5646d6512adb6803564c22268d3424c66d8 | [
"Apache-2.0"
] | 1 | 2015-08-04T08:03:46.000Z | 2015-08-04T08:03:46.000Z | bin/analysis/ipa/constraints/node.py | ncbray/pystream | 70bba5646d6512adb6803564c22268d3424c66d8 | [
"Apache-2.0"
] | 1 | 2019-12-09T08:27:09.000Z | 2019-12-09T08:27:09.000Z | # Copyright 2011 Nicholas Bray
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 26.698198 | 153 | 0.713683 |
38da46eb39dadf4a7638b1ed59d690feefc47f80 | 3,655 | py | Python | levels/7/initialize_db.py | industrydive/stripe-ctf-2-vm | 1987516471957a791ed02c70ac4ae6b7aeb72b69 | [
"Apache-2.0"
] | 36 | 2015-05-11T20:22:55.000Z | 2021-09-26T07:36:49.000Z | levels/7/initialize_db.py | industrydive/stripe-ctf-2-vm | 1987516471957a791ed02c70ac4ae6b7aeb72b69 | [
"Apache-2.0"
] | null | null | null | levels/7/initialize_db.py | industrydive/stripe-ctf-2-vm | 1987516471957a791ed02c70ac4ae6b7aeb72b69 | [
"Apache-2.0"
] | 16 | 2016-03-08T16:25:46.000Z | 2022-03-16T06:28:51.000Z | #!/usr/bin/env python
import sys
from datetime import datetime
from random import SystemRandom
import bcrypt
import sqlite3
import client
import db
import settings
conn = db.DB(settings.database)
conn.debug = True
c = conn.cursor
db.rewrite_entropy_file(settings.entropy_file)
rand = SystemRandom()
alphanum = 'abc... | 28.115385 | 75 | 0.631464 |
38dbca903f2a85d1301cee64efa4e83e79d5c1ce | 112 | py | Python | jp.atcoder/abc251/abc251_a/31673235.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc251/abc251_a/31673235.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc251/abc251_a/31673235.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
main()
| 14 | 29 | 0.446429 |
38dbed609de1a2695c5a854a2a4f693c2e1e7e38 | 286 | py | Python | day3/classwork/1.py | LencoDigitexer/AI | e22f5e63df46c56b57da5191d9536e00c5c50782 | [
"MIT"
] | null | null | null | day3/classwork/1.py | LencoDigitexer/AI | e22f5e63df46c56b57da5191d9536e00c5c50782 | [
"MIT"
] | null | null | null | day3/classwork/1.py | LencoDigitexer/AI | e22f5e63df46c56b57da5191d9536e00c5c50782 | [
"MIT"
] | null | null | null | '''
N .
'''
proizvedenie = 1
a = input().split(" ")
for i in range(0, len(a)):
proizvedenie *= int(a[i])
print(" " + str(proizvedenie))
print("- " + str(len(a))) | 28.6 | 60 | 0.695804 |
38dcfaea3f6eeb906d708162cee888578263698d | 553 | py | Python | Codes/Liam/001_two_sum.py | liuxiaohui1221/algorithm | d80e64185ceb4798ac5389bfbd226dc1d406f6b5 | [
"Apache-2.0"
] | 256 | 2017-10-25T13:02:15.000Z | 2022-02-25T13:47:59.000Z | Codes/Liam/001_two_sum.py | liuxiaohui1221/algorithm | d80e64185ceb4798ac5389bfbd226dc1d406f6b5 | [
"Apache-2.0"
] | 56 | 2017-10-27T01:34:20.000Z | 2022-03-01T00:20:55.000Z | Codes/Liam/001_two_sum.py | liuxiaohui1221/algorithm | d80e64185ceb4798ac5389bfbd226dc1d406f6b5 | [
"Apache-2.0"
] | 83 | 2017-10-25T12:51:53.000Z | 2022-02-15T08:27:03.000Z | # : 348 ms
# : 13 MB
#
| 23.041667 | 52 | 0.486438 |
38deced1bd0383a7623b3e0121291bf13f2bd046 | 9,939 | py | Python | ckanext/doi/lib/metadata.py | NINAnor/ckanext-doi | 2f93c03545885ae0795cea78f49aac66295df763 | [
"MIT"
] | 16 | 2015-01-15T17:20:33.000Z | 2021-04-28T04:26:02.000Z | ckanext/doi/lib/metadata.py | NINAnor/ckanext-doi | 2f93c03545885ae0795cea78f49aac66295df763 | [
"MIT"
] | 34 | 2015-02-18T16:44:06.000Z | 2022-03-03T19:05:11.000Z | ckanext/doi/lib/metadata.py | NINAnor/ckanext-doi | 2f93c03545885ae0795cea78f49aac66295df763 | [
"MIT"
] | 14 | 2015-04-17T10:36:42.000Z | 2022-03-01T08:13:55.000Z | #!/usr/bin/env python3
# encoding: utf-8
#
# This file is part of ckanext-doi
# Created by the Natural History Museum in London, UK
import logging
from ckan.lib.helpers import lang as ckan_lang
from ckan.model import Package
from ckan.plugins import PluginImplementations, toolkit
from ckanext.doi.interfaces import I... | 32.06129 | 100 | 0.598652 |
38e09a14bcf404479b71e05553e37caf4d388eb7 | 3,417 | py | Python | oo/carros.py | AdnirJunior/pythonbirds | bdc848291c3c6f22e6647768103bf7bd2863145b | [
"MIT"
] | null | null | null | oo/carros.py | AdnirJunior/pythonbirds | bdc848291c3c6f22e6647768103bf7bd2863145b | [
"MIT"
] | null | null | null | oo/carros.py | AdnirJunior/pythonbirds | bdc848291c3c6f22e6647768103bf7bd2863145b | [
"MIT"
] | null | null | null |
"""Voce deve criar uma classe carro que vai assumir dois atributos compostos por duas classes:
1) Motor
2) Direcao
O motor ter a responsabilidade de controlar a velocidade.
Ele Oferece os seguintes atributos:
1) Atribuo de dado velocidade
2) Mtodo acelerar, que dever incrementar 1 unidade
3) Mdoto freardecrementar a... | 21.903846 | 94 | 0.625988 |
38e2780c1d8295a2aa1e5df333294d92a0dd54a1 | 3,482 | py | Python | src/icon/exception.py | goldworm-icon/gw-iconsdk | b54722b0d19f286c0d0b8d751ff8cbcabd29f86a | [
"Apache-2.0"
] | 2 | 2019-05-28T22:37:49.000Z | 2020-01-07T11:40:15.000Z | src/icon/exception.py | goldworm-icon/gw-iconsdk | b54722b0d19f286c0d0b8d751ff8cbcabd29f86a | [
"Apache-2.0"
] | 1 | 2020-02-04T12:05:31.000Z | 2020-02-04T12:05:31.000Z | src/icon/exception.py | goldworm-icon/gw-iconsdk | b54722b0d19f286c0d0b8d751ff8cbcabd29f86a | [
"Apache-2.0"
] | 1 | 2019-08-01T08:42:15.000Z | 2019-08-01T08:42:15.000Z | # -*- coding: utf-8 -*-
from enum import IntEnum, unique
from typing import Optional, Any
class KeyStoreException(SDKException):
""""Error when making or loading a keystore file."""
class AddressException(SDKException):
"""Error when having an invalid address."""
class BalanceException(SDKException):
... | 30.017241 | 82 | 0.681505 |
38e34f16224fab03d0d16ac00cd37fd07c95962e | 528 | py | Python | test/test_add_movie.py | Dananas732/php4dvd_lyzlov | 9fa3deb51eda7406475fdc4cf8faec8eb84aa61e | [
"Apache-2.0"
] | null | null | null | test/test_add_movie.py | Dananas732/php4dvd_lyzlov | 9fa3deb51eda7406475fdc4cf8faec8eb84aa61e | [
"Apache-2.0"
] | null | null | null | test/test_add_movie.py | Dananas732/php4dvd_lyzlov | 9fa3deb51eda7406475fdc4cf8faec8eb84aa61e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from model.movie import Movie
from model.user import User
from fixture.selenium_fixture import app
| 26.4 | 66 | 0.721591 |
38e58db88d17dcc51ab2794712747a7a6f27aee6 | 3,752 | py | Python | main.py | dashdeckers/Wildfire-Control-Python | 8ace34e389b4d177b84efe964e8d327a82eb3ed6 | [
"MIT"
] | 2 | 2019-03-21T12:37:00.000Z | 2021-04-11T13:38:57.000Z | main.py | dashdeckers/Wildfire-Control-Python | 8ace34e389b4d177b84efe964e8d327a82eb3ed6 | [
"MIT"
] | 3 | 2020-01-28T22:37:00.000Z | 2022-02-10T00:15:14.000Z | main.py | dashdeckers/Wildfire-Control-Python | 8ace34e389b4d177b84efe964e8d327a82eb3ed6 | [
"MIT"
] | null | null | null | # Argument handling
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-r", "--run", action="store_true",
help="Start the learning process")
parser.add_argument("-m", "--memories", type=int, default=100,
help="Number of runs of demonstration data to... | 36.427184 | 88 | 0.61194 |
38e5c75c5a33d505486249e9804993dae69406b3 | 20,561 | py | Python | util/job_launching/procman.py | LauXy/accel-sim-framework | 4c2bf09a79d6b57bb10fe1898700930a5dd5531f | [
"BSD-2-Clause"
] | 88 | 2020-07-15T22:07:38.000Z | 2022-03-29T03:52:55.000Z | util/job_launching/procman.py | LauXy/accel-sim-framework | 4c2bf09a79d6b57bb10fe1898700930a5dd5531f | [
"BSD-2-Clause"
] | 68 | 2020-08-12T13:44:59.000Z | 2022-03-28T19:34:56.000Z | util/job_launching/procman.py | LauXy/accel-sim-framework | 4c2bf09a79d6b57bb10fe1898700930a5dd5531f | [
"BSD-2-Clause"
] | 54 | 2020-07-24T21:05:56.000Z | 2022-03-31T13:28:23.000Z | #!/usr/bin/env python
# 2020 (c) Tim Rogers, Purdue University
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the fo... | 41.453629 | 127 | 0.594961 |
38e6e2acda50235d67dfac9f5ec598d66c8ddcc1 | 2,005 | py | Python | nabu/processing/tfreaders/numpy_float_array_as_tfrecord_reader.py | Darleen2019/Nabu-MSSS | 5e862cbf846d45b8a317f87588533f3fde9f0726 | [
"MIT"
] | 18 | 2017-10-16T13:12:46.000Z | 2022-02-15T01:20:00.000Z | nabu/processing/tfreaders/numpy_float_array_as_tfrecord_reader.py | Darleen2019/Nabu-MSSS | 5e862cbf846d45b8a317f87588533f3fde9f0726 | [
"MIT"
] | null | null | null | nabu/processing/tfreaders/numpy_float_array_as_tfrecord_reader.py | Darleen2019/Nabu-MSSS | 5e862cbf846d45b8a317f87588533f3fde9f0726 | [
"MIT"
] | 9 | 2017-10-03T18:10:10.000Z | 2020-11-13T08:26:31.000Z | '''@file numpy_float_array_as_tfrecord_reader.py
contains the NumpyFloatArrayAsTfrecordReader class'''
import os
import numpy as np
import tensorflow as tf
import tfreader
import pdb
| 30.378788 | 78 | 0.613965 |
38e9981ca280b378dc3584ec5d46dac7194e4dbd | 643 | py | Python | apps/telegram_bot/bot/filters.py | alena-kono/bot-valley | e8403f75bcd4e4b3f84bbe8c00a53d763e7c9776 | [
"MIT"
] | null | null | null | apps/telegram_bot/bot/filters.py | alena-kono/bot-valley | e8403f75bcd4e4b3f84bbe8c00a53d763e7c9776 | [
"MIT"
] | 1 | 2022-03-01T12:18:11.000Z | 2022-03-01T12:18:11.000Z | apps/telegram_bot/bot/filters.py | alena-kono/bot-valley | e8403f75bcd4e4b3f84bbe8c00a53d763e7c9776 | [
"MIT"
] | null | null | null | import telegram
from telegram.ext.filters import MessageFilter
from apps.telegram_bot.preferences import global_preferences
| 33.842105 | 82 | 0.735614 |
c7f9c8239458c9257f86279f06d4314af6312cd7 | 2,664 | py | Python | functest/func_py_custom_renderer.py | mitsuba-rei/lightmetrica-v3 | db5b7d5a9a245fb7c0d25124433c38d09b62813e | [
"MIT"
] | null | null | null | functest/func_py_custom_renderer.py | mitsuba-rei/lightmetrica-v3 | db5b7d5a9a245fb7c0d25124433c38d09b62813e | [
"MIT"
] | null | null | null | functest/func_py_custom_renderer.py | mitsuba-rei/lightmetrica-v3 | db5b7d5a9a245fb7c0d25124433c38d09b62813e | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.4'
# jupytext_version: 1.2.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# ## Custom renderer in P... | 24.218182 | 93 | 0.582958 |
c7fa73d5a956f1ec56de8229d7e06f9ce5ec0668 | 668 | py | Python | Ingest/Reddit.py | andersonpaac/Credd | b22f86167d6a2ced080b159a5ab822eba5faa791 | [
"MIT"
] | null | null | null | Ingest/Reddit.py | andersonpaac/Credd | b22f86167d6a2ced080b159a5ab822eba5faa791 | [
"MIT"
] | 7 | 2020-03-24T17:05:52.000Z | 2022-03-11T23:47:42.000Z | Ingest/Reddit.py | andersonpaac/Creddit | b22f86167d6a2ced080b159a5ab822eba5faa791 | [
"MIT"
] | null | null | null | import json
import praw
from Analysis.Common import Constants
def get_reddit_instance(config_json_fname: str = Constants.CONFIG_FNAME):
"""
Given path to a file containing the credentials for reddit API's client_id, secret, user agent. This will return
the praw instance.
:param config_json_fname:
... | 33.4 | 116 | 0.684132 |
c7fbc823f8a546465b13ed0456c3ae2fd7b2cfaf | 3,249 | py | Python | botwinick_math/maths/aggregate.py | dbotwinick/python-botwinick-math | 52f038c277e27243f82aed2000137fb2ee6f1dae | [
"BSD-3-Clause"
] | null | null | null | botwinick_math/maths/aggregate.py | dbotwinick/python-botwinick-math | 52f038c277e27243f82aed2000137fb2ee6f1dae | [
"BSD-3-Clause"
] | null | null | null | botwinick_math/maths/aggregate.py | dbotwinick/python-botwinick-math | 52f038c277e27243f82aed2000137fb2ee6f1dae | [
"BSD-3-Clause"
] | null | null | null | # author: Drew Botwinick, Botwinick Innovations
# title: occasionally trivial support functions for aggregating data for python 2/3 [only numpy as dependency]
# NOTE: these functions are generally tested meant for 1D although they may apply or be easily extended to nd
# license: 3-clause BSD
import numpy as np
flat_m... | 39.144578 | 128 | 0.711296 |
c7fd3ba288c68945f082fd623cdb47c96e4e8977 | 1,485 | py | Python | leetcode-algorithms/107. Binary Tree Level Order Traversal II/107.binary-tree-level-order-traversal-ii.py | cnyy7/LeetCode_EY | 44e92f102b61f5e931e66081ed6636d7ecbdefd4 | [
"MIT"
] | null | null | null | leetcode-algorithms/107. Binary Tree Level Order Traversal II/107.binary-tree-level-order-traversal-ii.py | cnyy7/LeetCode_EY | 44e92f102b61f5e931e66081ed6636d7ecbdefd4 | [
"MIT"
] | null | null | null | leetcode-algorithms/107. Binary Tree Level Order Traversal II/107.binary-tree-level-order-traversal-ii.py | cnyy7/LeetCode_EY | 44e92f102b61f5e931e66081ed6636d7ecbdefd4 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=107 lang=python3
#
# [107] Binary Tree Level Order Traversal II
#
# https://leetcode.com/problems/binary-tree-level-order-traversal-ii/description/
#
# algorithms
# Easy (48.66%)
# Likes: 1105
# Dislikes: 201
# Total Accepted: 289.3K
# Total Submissions: 572.4K
# Testcase Example: '[3,9,2... | 21.521739 | 81 | 0.552862 |
c7feef185f3cd2a9de34cd9ca911002e06e8cf12 | 3,383 | py | Python | openrave/python/examples/tutorial_iklookat.py | jdsika/TUM_HOly | a2ac55fa1751a3a8038cf61d29b95005f36d6264 | [
"MIT"
] | 2 | 2015-11-13T16:40:57.000Z | 2017-09-15T15:37:19.000Z | openrave/python/examples/tutorial_iklookat.py | jdsika/holy | a2ac55fa1751a3a8038cf61d29b95005f36d6264 | [
"MIT"
] | 1 | 2016-06-13T01:29:51.000Z | 2016-06-14T00:38:27.000Z | openrave/python/examples/tutorial_iklookat.py | jdsika/holy | a2ac55fa1751a3a8038cf61d29b95005f36d6264 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2011 Rosen Diankov (rosen.diankov@gmail.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/li... | 42.2875 | 153 | 0.688738 |
c7ff80b02f36412b36398e9a909bcd286ba8d17e | 2,328 | py | Python | notebooks/calcs/rating.py | pcejrowski/iwi | 89111b589e7d9ccf0b60269fc98daf7e50f7d95f | [
"MIT"
] | null | null | null | notebooks/calcs/rating.py | pcejrowski/iwi | 89111b589e7d9ccf0b60269fc98daf7e50f7d95f | [
"MIT"
] | null | null | null | notebooks/calcs/rating.py | pcejrowski/iwi | 89111b589e7d9ccf0b60269fc98daf7e50f7d95f | [
"MIT"
] | null | null | null |
import metrics
| 35.815385 | 97 | 0.64433 |
2a029f302b32cd792495b8fa2cc70f93a578db3c | 1,241 | py | Python | test.py | OSSome01/ekalavya | 30933c94308afd86d2135ea9b131005c88042df4 | [
"MIT"
] | 2 | 2021-06-12T07:43:10.000Z | 2021-06-12T15:10:50.000Z | test.py | OSSome01/ekalavya | 30933c94308afd86d2135ea9b131005c88042df4 | [
"MIT"
] | null | null | null | test.py | OSSome01/ekalavya | 30933c94308afd86d2135ea9b131005c88042df4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import roslib
roslib.load_manifest('begineer_tutorial')
import sys
import rospy
import cv2
import numpy as np
from std_msgs.msg import String
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
if __name__ == '__main__':
main... | 25.326531 | 84 | 0.720387 |
2a0340d6bee8c182f82274f58caefa62290e5be1 | 461 | py | Python | configs/retinanet/retinanet_r50_fpn_1x_bdd100k.py | XDong18/mmdetection | 482ada168a644f350d51d85783d309677441eeb0 | [
"Apache-2.0"
] | null | null | null | configs/retinanet/retinanet_r50_fpn_1x_bdd100k.py | XDong18/mmdetection | 482ada168a644f350d51d85783d309677441eeb0 | [
"Apache-2.0"
] | null | null | null | configs/retinanet/retinanet_r50_fpn_1x_bdd100k.py | XDong18/mmdetection | 482ada168a644f350d51d85783d309677441eeb0 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/retinanet_r50_fpn.py',
'../_base_/datasets/bdd100k_detection.py',
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
]
# optimizer
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001)
# model
model = dict(
bbox_head=dict(
num_c... | 20.954545 | 72 | 0.665944 |
2a06d2484aaf8403e4a1aedc38951691db8afbda | 1,278 | py | Python | questions/max-number-of-k-sum-pairs/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 141 | 2017-12-12T21:45:53.000Z | 2022-03-25T07:03:39.000Z | questions/max-number-of-k-sum-pairs/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 32 | 2015-10-05T14:09:52.000Z | 2021-05-30T10:28:41.000Z | questions/max-number-of-k-sum-pairs/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 56 | 2015-09-30T05:23:28.000Z | 2022-03-08T07:57:11.000Z | """
You are given an integer array nums and an integer k.
In one operation, you can pick two numbers from the array whose sum equals k and remove them from the array.
Return the maximum number of operations you can perform on the array.
Example 1:
Input: nums = [1,2,3,4], k = 5
Output: 2
Explanation: Starting with n... | 25.56 | 108 | 0.544601 |
2a0c441daafd819f5e8b9d51026c63ee758e4a18 | 8,377 | py | Python | tests/core/service_test.py | dnephin/Tron | bd0f763421c6de50551e9a4b0e4a1c0c8ceb450a | [
"Apache-2.0"
] | null | null | null | tests/core/service_test.py | dnephin/Tron | bd0f763421c6de50551e9a4b0e4a1c0c8ceb450a | [
"Apache-2.0"
] | null | null | null | tests/core/service_test.py | dnephin/Tron | bd0f763421c6de50551e9a4b0e4a1c0c8ceb450a | [
"Apache-2.0"
] | null | null | null | import mock
from testify import setup, assert_equal, TestCase, run
from testify.assertions import assert_not_equal
from tests.assertions import assert_mock_calls
from tests.testingutils import autospec_method
from tron.core import service, serviceinstance
from tron import node, command_context, event, eventloop
from t... | 42.308081 | 83 | 0.718515 |
2a0c50108ad0d192b72ca77b3ab58cf9d7e8b047 | 113 | py | Python | constants.py | mattdeitke/allenact-1 | 70f106b32a38424e862399a76d84f607838063be | [
"MIT"
] | 1 | 2020-09-10T13:09:14.000Z | 2020-09-10T13:09:14.000Z | constants.py | mattdeitke/allenact-1 | 70f106b32a38424e862399a76d84f607838063be | [
"MIT"
] | null | null | null | constants.py | mattdeitke/allenact-1 | 70f106b32a38424e862399a76d84f607838063be | [
"MIT"
] | null | null | null | import os
from pathlib import Path
ABS_PATH_OF_TOP_LEVEL_DIR = os.path.abspath(os.path.dirname(Path(__file__)))
| 22.6 | 76 | 0.814159 |
2a0dc668b21a91832f8ec31e1a4ff4f191731611 | 4,558 | py | Python | Implementation/eshopee.py | AchuthaVVyas/259902_Ltts_StepIN- | 8dca06479a1c163e9bc971be97f34b09c9aa5aad | [
"Unlicense"
] | null | null | null | Implementation/eshopee.py | AchuthaVVyas/259902_Ltts_StepIN- | 8dca06479a1c163e9bc971be97f34b09c9aa5aad | [
"Unlicense"
] | null | null | null | Implementation/eshopee.py | AchuthaVVyas/259902_Ltts_StepIN- | 8dca06479a1c163e9bc971be97f34b09c9aa5aad | [
"Unlicense"
] | null | null | null | import tkinter as tk
from tkinter.font import Font
from tkinter import *
from tkinter import messagebox
from models.Store import Store
from models.ShoppingCart import ShoppingCart
import datetime
storeWindow = tk.Tk()
storeWindow.title("The Store")
viewStore()
cart = ShoppingCart()
storeWindow.mainloop()
| 34.793893 | 122 | 0.630759 |
2a0dc67bade2117bf57ad1386621e32344ab2ab8 | 15,919 | py | Python | atomate/vasp/database.py | Zhuoying/atomate | 067023f0f740d3abac47b7ae7743c1c31eff8a06 | [
"BSD-3-Clause-LBNL"
] | null | null | null | atomate/vasp/database.py | Zhuoying/atomate | 067023f0f740d3abac47b7ae7743c1c31eff8a06 | [
"BSD-3-Clause-LBNL"
] | null | null | null | atomate/vasp/database.py | Zhuoying/atomate | 067023f0f740d3abac47b7ae7743c1c31eff8a06 | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
This module defines the database classes.
"""
import json
import zlib
from typing import Any
import gridfs
from bson import ObjectId
from maggma.stores.aws import S3Store
from monty.dev import deprecated
from monty.json import MontyEncoder
from pymatgen.electronic_structure.bandstructure import (
BandStructur... | 36.179545 | 116 | 0.597839 |
2a0e1ca9345564e019c758529a1cb3634a3a9fae | 296 | py | Python | ergoservice/dashboard/models.py | damirmedakovic/ergoapp | 38dec32aa2dbdd3ec27a8e911fc233dff7c7c499 | [
"MIT"
] | null | null | null | ergoservice/dashboard/models.py | damirmedakovic/ergoapp | 38dec32aa2dbdd3ec27a8e911fc233dff7c7c499 | [
"MIT"
] | 5 | 2020-06-05T23:32:29.000Z | 2021-06-10T18:58:29.000Z | ergoservice/dashboard/models.py | damirmedakovic/ergoapp | 38dec32aa2dbdd3ec27a8e911fc233dff7c7c499 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
| 22.769231 | 55 | 0.773649 |
2a0fe0131e7b0ce2b0125eb0c7c09663dccc2793 | 3,032 | py | Python | BaseFeaturizer.py | dsbrown1331/HardRLWithYoutube | 33f72a5473c46841b77468b6902489c0fd812795 | [
"MIT"
] | 34 | 2018-10-16T16:09:07.000Z | 2021-10-19T06:21:03.000Z | BaseFeaturizer.py | dsbrown1331/HardRLWithYoutube | 33f72a5473c46841b77468b6902489c0fd812795 | [
"MIT"
] | 5 | 2019-01-31T16:31:13.000Z | 2019-06-26T01:13:04.000Z | BaseFeaturizer.py | dsbrown1331/HardRLWithYoutube | 33f72a5473c46841b77468b6902489c0fd812795 | [
"MIT"
] | 9 | 2018-12-04T11:39:43.000Z | 2021-04-02T19:17:11.000Z | from abc import ABCMeta, abstractmethod # Required to create an abstract class
import numpy as np
from scipy import spatial # For nearest neighbour lookup
import tensorflow as tf
def evaluate_cycle_consistency(self, data, sequence_length=1024):
'''Cycle-consistency evaluation as in "Playing hard exploratio... | 41.534247 | 101 | 0.685356 |
2a101d90d02ecf24ffa04bb3238bffdbcd08a712 | 897 | py | Python | 101-200/101-110/106-binaryTreeFromInPostOrder/binaryTreeFromInPostOrder.py | xuychen/Leetcode | c8bf33af30569177c5276ffcd72a8d93ba4c402a | [
"MIT"
] | null | null | null | 101-200/101-110/106-binaryTreeFromInPostOrder/binaryTreeFromInPostOrder.py | xuychen/Leetcode | c8bf33af30569177c5276ffcd72a8d93ba4c402a | [
"MIT"
] | null | null | null | 101-200/101-110/106-binaryTreeFromInPostOrder/binaryTreeFromInPostOrder.py | xuychen/Leetcode | c8bf33af30569177c5276ffcd72a8d93ba4c402a | [
"MIT"
] | null | null | null | # Definition for a binary tree node. | 32.035714 | 85 | 0.565217 |
2a108ae249c4fe5e282fb02c6ca69143383b433a | 477 | py | Python | csv2ofx/mappings/starling.py | mibanescu/csv2ofx | df9328bbf39348ebd6781701855c0b71592bb7ea | [
"MIT"
] | 153 | 2015-03-27T05:44:45.000Z | 2022-03-07T04:15:22.000Z | csv2ofx/mappings/starling.py | mibanescu/csv2ofx | df9328bbf39348ebd6781701855c0b71592bb7ea | [
"MIT"
] | 74 | 2015-11-29T13:03:05.000Z | 2022-01-23T20:00:24.000Z | csv2ofx/mappings/starling.py | mibanescu/csv2ofx | df9328bbf39348ebd6781701855c0b71592bb7ea | [
"MIT"
] | 94 | 2015-03-10T17:54:32.000Z | 2022-03-27T09:50:44.000Z | from __future__ import (
absolute_import, division, print_function, unicode_literals)
from operator import itemgetter
mapping = {
'has_header': True,
'date': lambda tr: fixdate(tr['Date']),
'amount': itemgetter('Amount (GBP)'),
'desc': itemgetter('Reference'),
'payee': itemgetter('Counter Par... | 25.105263 | 64 | 0.639413 |
2a112329bea0c737e5460d8489595b646350f0f7 | 732 | py | Python | logtf_analyser/tests/test_convert_id3_to_id64.py | cob16/logtf_analyzer | d7398da4fcf0dc64e2dfa7078e036a8189c81b77 | [
"MIT"
] | null | null | null | logtf_analyser/tests/test_convert_id3_to_id64.py | cob16/logtf_analyzer | d7398da4fcf0dc64e2dfa7078e036a8189c81b77 | [
"MIT"
] | null | null | null | logtf_analyser/tests/test_convert_id3_to_id64.py | cob16/logtf_analyzer | d7398da4fcf0dc64e2dfa7078e036a8189c81b77 | [
"MIT"
] | null | null | null | from unittest import TestCase
from parameterized import parameterized
from logtf_analyser.utils import convert_id3_to_id64
| 28.153846 | 52 | 0.693989 |
2a114ce8d5ef6e2e85c7b5e7e1ac2b3ca629ebdb | 14,191 | py | Python | aiida_lsmo/workchains/cp2k_binding_energy.py | mbercx/aiida-lsmo | 0999ccec3e445cfd0dfd37a65ab013299a5f7d51 | [
"MIT"
] | 2 | 2020-06-23T12:50:02.000Z | 2022-03-21T08:11:10.000Z | aiida_lsmo/workchains/cp2k_binding_energy.py | mbercx/aiida-lsmo | 0999ccec3e445cfd0dfd37a65ab013299a5f7d51 | [
"MIT"
] | 59 | 2019-11-26T15:25:36.000Z | 2022-02-22T12:37:18.000Z | aiida_lsmo/workchains/cp2k_binding_energy.py | mbercx/aiida-lsmo | 0999ccec3e445cfd0dfd37a65ab013299a5f7d51 | [
"MIT"
] | 6 | 2019-12-04T14:43:28.000Z | 2022-01-20T18:08:12.000Z | # -*- coding: utf-8 -*-
"""Binding energy workchain"""
from copy import deepcopy
from aiida.common import AttributeDict
from aiida.engine import append_, while_, WorkChain, ToContext
from aiida.engine import calcfunction
from aiida.orm import Dict, Int, SinglefileData, Str, StructureData, Bool
from aiida.plugins impo... | 50.682143 | 120 | 0.640758 |
2a11e07673a89b3a3b7bcf3915b416ec6d3dad8d | 5,716 | py | Python | apps/blog/editer_user.py | jhjguxin/blogserver | 7873e1a94d05859650ce88d50e241456f4ab43ed | [
"MIT"
] | 3 | 2015-11-17T16:16:41.000Z | 2018-07-07T13:34:18.000Z | apps/blog/editer_user.py | jhjguxin/blogserver | 7873e1a94d05859650ce88d50e241456f4ab43ed | [
"MIT"
] | null | null | null | apps/blog/editer_user.py | jhjguxin/blogserver | 7873e1a94d05859650ce88d50e241456f4ab43ed | [
"MIT"
] | 1 | 2020-06-08T02:46:07.000Z | 2020-06-08T02:46:07.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext as _
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestCont... | 33.426901 | 172 | 0.646956 |
2a145ab11f78cc5615c8d4ed402ea232a50a31a2 | 297 | py | Python | exercises/ja/solution_01_03_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/ja/solution_01_03_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/ja/solution_01_03_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | # spaCynlp
import spacy
nlp = spacy.blank("ja")
#
doc = nlp("")
#
tree_kangaroos = doc[2:4]
print(tree_kangaroos.text)
#
tree_kangaroos_and_narwhals = doc[2:6]
print(tree_kangaroos_and_narwhals.text)
| 18.5625 | 39 | 0.787879 |
2a186bff39afa1d9b54a01c7714b0ec21b096dfa | 10,757 | py | Python | setix/backends/b_numpy.py | dustymugs/python-setix | 1ea5e122c616abffcac64f770c5f6f5644240a28 | [
"MIT"
] | 3 | 2016-01-26T07:18:54.000Z | 2018-08-02T01:43:39.000Z | setix/backends/b_numpy.py | dustymugs/python-setix | 1ea5e122c616abffcac64f770c5f6f5644240a28 | [
"MIT"
] | null | null | null | setix/backends/b_numpy.py | dustymugs/python-setix | 1ea5e122c616abffcac64f770c5f6f5644240a28 | [
"MIT"
] | 1 | 2020-11-27T16:32:40.000Z | 2020-11-27T16:32:40.000Z | import numpy
import numbers
import math
import struct
from six.moves import zip
from .. import SetIntersectionIndexBase, SearchResults, EmptySearchResults
_check_numpy ()
| 32.59697 | 125 | 0.524217 |
2a1b32d6549e142ab87a8c6dd798f43bdbbe5e9f | 685 | py | Python | gitzer/director/migrations/0001_initial.py | IgnisDa/Gitzer | 6810ee7ca6b9d86d7d87745342850a8be58d1865 | [
"Apache-2.0"
] | 2 | 2021-01-24T07:44:28.000Z | 2021-01-30T22:12:43.000Z | gitzer/director/migrations/0001_initial.py | IgnisDa/Gitzer | 6810ee7ca6b9d86d7d87745342850a8be58d1865 | [
"Apache-2.0"
] | null | null | null | gitzer/director/migrations/0001_initial.py | IgnisDa/Gitzer | 6810ee7ca6b9d86d7d87745342850a8be58d1865 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-16 08:15
from django.db import migrations, models
| 29.782609 | 134 | 0.617518 |
2a1c70b9d1e40d06c382598343320ee23443054f | 2,668 | py | Python | model_based/svms/test_model_compression.py | vohoaiviet/tag-image-retrieval | 0a257560581f702cd394f3f28c9e0f6202827ce8 | [
"MIT"
] | 50 | 2015-11-04T15:53:09.000Z | 2022-01-03T14:46:17.000Z | model_based/svms/test_model_compression.py | vohoaiviet/tag-image-retrieval | 0a257560581f702cd394f3f28c9e0f6202827ce8 | [
"MIT"
] | 2 | 2018-03-07T09:51:50.000Z | 2018-10-13T11:05:13.000Z | model_based/svms/test_model_compression.py | vohoaiviet/tag-image-retrieval | 0a257560581f702cd394f3f28c9e0f6202827ce8 | [
"MIT"
] | 17 | 2015-10-26T03:41:49.000Z | 2021-08-23T08:11:05.000Z |
import sys
import os
import time
from basic.common import ROOT_PATH,checkToSkip,makedirsforfile
from basic.util import readImageSet
from simpleknn.bigfile import BigFile, StreamFile
from basic.annotationtable import readConcepts,readAnnotationsFrom
from basic.metric import getScorer
if __name__ == "__main__":
t... | 31.388235 | 141 | 0.687031 |
2a1e4ea3df7a438ae1d54be3a54f23a971889c67 | 24,369 | py | Python | tonnikala/languages/python/generator.py | tetframework/Tonnikala | d69e7c71d323221ad749082c4e653654bd63e819 | [
"Apache-2.0"
] | 13 | 2015-11-09T21:11:49.000Z | 2021-12-26T20:36:02.000Z | tonnikala/languages/python/generator.py | tetframework/Tonnikala | d69e7c71d323221ad749082c4e653654bd63e819 | [
"Apache-2.0"
] | 3 | 2016-10-04T19:51:38.000Z | 2017-08-28T05:58:39.000Z | tonnikala/languages/python/generator.py | tetframework/Tonnikala | d69e7c71d323221ad749082c4e653654bd63e819 | [
"Apache-2.0"
] | 3 | 2015-09-06T13:44:43.000Z | 2021-01-25T10:04:26.000Z | import ast
from ast import *
from collections.abc import Iterable
from .astalyzer import FreeVarFinder
from ..base import LanguageNode, ComplexNode, BaseGenerator
from ...helpers import StringWithLocation
from ...runtime.debug import TemplateSyntaxError
import sys
try: # pragma: no cover
import sysconfig
... | 28.369034 | 86 | 0.577414 |
2a1fc79d624fe31282ea8ff5726da6d9664343bd | 389 | py | Python | training_data.py | zestdoc/echoAI | 2ef96dbd156c94fff0c1d8ff90d0e1706864185e | [
"MIT"
] | null | null | null | training_data.py | zestdoc/echoAI | 2ef96dbd156c94fff0c1d8ff90d0e1706864185e | [
"MIT"
] | null | null | null | training_data.py | zestdoc/echoAI | 2ef96dbd156c94fff0c1d8ff90d0e1706864185e | [
"MIT"
] | null | null | null | # Format of training prompt
defaultPrompt = """I am a Cardiologist. My patient asked me what this means:
Input: Normal left ventricular size and systolic function. EF > 55 %. Normal right ventricular size and systolic function. Normal valve structure and function
Output: Normal pumping function of the left and right ... | 29.923077 | 158 | 0.766067 |
2a20c2f2ce75008bda8bbed62280c06d1b9e0a6b | 682 | py | Python | db/src/scrape/programs.py | tomquirk/uq-api | 1a856d8b8e5fe8a94986d6c687e885bae642067b | [
"MIT"
] | 8 | 2017-06-14T00:11:49.000Z | 2021-02-03T23:58:10.000Z | db/src/scrape/programs.py | tomquirk/uq-api | 1a856d8b8e5fe8a94986d6c687e885bae642067b | [
"MIT"
] | 2 | 2020-07-16T15:44:23.000Z | 2021-05-08T00:42:12.000Z | db/src/scrape/programs.py | tomquirk/uq-catalogue-api | 1a856d8b8e5fe8a94986d6c687e885bae642067b | [
"MIT"
] | 7 | 2017-05-11T05:25:16.000Z | 2021-02-02T15:57:57.000Z | """
Programs scraper
"""
import re
import src.scrape.util.helpers as helpers
import src.settings as settings
from src.logger import get_logger
_LOG = get_logger("programs_scraper")
def programs():
"""
Scrapes list of programs
:return: List, of program codes
"""
_LOG.debug("scraping list of progra... | 22.733333 | 85 | 0.695015 |
2a2228848cab06332324e3506158b74866879860 | 2,219 | py | Python | wagtail_review/forms.py | jacobtoppm/wagtail-review | 23b81d7e5699ecb843a99da1aa207775a8b85bd6 | [
"BSD-3-Clause"
] | 44 | 2018-12-17T16:37:16.000Z | 2022-03-06T15:09:23.000Z | wagtail_review/forms.py | jacobtoppm/wagtail-review | 23b81d7e5699ecb843a99da1aa207775a8b85bd6 | [
"BSD-3-Clause"
] | 33 | 2019-01-07T18:03:14.000Z | 2021-12-15T08:46:57.000Z | wagtail_review/forms.py | jacobtoppm/wagtail-review | 23b81d7e5699ecb843a99da1aa207775a8b85bd6 | [
"BSD-3-Clause"
] | 19 | 2019-01-08T14:08:15.000Z | 2021-10-19T03:16:30.000Z | from django import forms
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.forms.formsets import DELETION_FIELD_NAME
from django.utils.module_loading import import_string
from django.utils.translation import ugettext
import swapper
from wagtail_revie... | 30.39726 | 109 | 0.671924 |
2a2538f0dcb641072614c3ea490a7e3d7705aa5a | 20,466 | py | Python | metrics.py | giacoballoccu/Explanation-Quality-CPGPR | 3ec199d17e24154f8766e3af760b1e1486d135a6 | [
"MIT"
] | null | null | null | metrics.py | giacoballoccu/Explanation-Quality-CPGPR | 3ec199d17e24154f8766e3af760b1e1486d135a6 | [
"MIT"
] | null | null | null | metrics.py | giacoballoccu/Explanation-Quality-CPGPR | 3ec199d17e24154f8766e3af760b1e1486d135a6 | [
"MIT"
] | null | null | null | import numpy as np
from myutils import *
from easydict import EasyDict as edict
"""
Explanation metrics
"""
#Extract the value of LIR for the given user item path from the LIR_matrix
# Returns a dict where to every uid is associated a value of LIR calculated based on his topk
# Returns an avg value for the L... | 38.908745 | 153 | 0.664077 |
2a2632dc493ea2bda2dbffcc144253e2dd95b604 | 987 | py | Python | config/setting.py | SihongHo/Vehicles-Dispatch-Simulator | 3ad80fb25fdce10db46a2b3825e45a28d7f72891 | [
"MIT"
] | 19 | 2020-11-24T08:52:24.000Z | 2022-03-05T15:38:02.000Z | config/setting.py | SihongHo/Vehicles-Dispatch-Simulator | 3ad80fb25fdce10db46a2b3825e45a28d7f72891 | [
"MIT"
] | 4 | 2020-12-24T07:21:03.000Z | 2022-02-26T16:57:52.000Z | config/setting.py | SihongHo/Vehicles-Dispatch-Simulator | 3ad80fb25fdce10db46a2b3825e45a28d7f72891 | [
"MIT"
] | 15 | 2020-12-23T03:18:27.000Z | 2022-03-29T09:31:27.000Z | import numpy as np
#Simulater Setting
#------------------------------
MINUTES=60000000000
TIMESTEP = np.timedelta64(10*MINUTES)
PICKUPTIMEWINDOW = np.timedelta64(10*MINUTES)
#It can enable the neighbor car search system to determine the search range according to the set search distance and the size of the grid.
#It u... | 30.84375 | 138 | 0.763931 |
2a2702efe481d78052c5c978e6d0aa3a68bf3f5e | 4,716 | py | Python | samples/heksekraft.py | clayboone/ursina | 9aebd9403b924af260fbefbfd7cef5ad82feeff7 | [
"MIT"
] | 1 | 2020-09-04T14:32:33.000Z | 2020-09-04T14:32:33.000Z | samples/heksekraft.py | clayboone/ursina | 9aebd9403b924af260fbefbfd7cef5ad82feeff7 | [
"MIT"
] | null | null | null | samples/heksekraft.py | clayboone/ursina | 9aebd9403b924af260fbefbfd7cef5ad82feeff7 | [
"MIT"
] | 1 | 2020-09-04T14:32:41.000Z | 2020-09-04T14:32:41.000Z | from ursina import *
from copy import copy
Magician()
if __name__ == '__main__':
app = Ursina()
# window.size = (450, (450/window.aspect_ratio))
# window.center_on_screen()
MinecraftClone()
# vr = VideoRecorder(name='minecraft_clone', duration=6)
# invoke(setattr, vr, 'recording', True, dela... | 31.44 | 120 | 0.47201 |
2a291bb3879db1c009a0ad3fab6dd256c7e79e33 | 1,646 | py | Python | gemini/bin/gemini_python.py | codes1gn/gemini | 4b173ea583f2578244d1d0fb482ccb77818f7558 | [
"MIT"
] | null | null | null | gemini/bin/gemini_python.py | codes1gn/gemini | 4b173ea583f2578244d1d0fb482ccb77818f7558 | [
"MIT"
] | null | null | null | gemini/bin/gemini_python.py | codes1gn/gemini | 4b173ea583f2578244d1d0fb482ccb77818f7558 | [
"MIT"
] | null | null | null | import sys
import traceback
import copy
import importlib
from gemini.gemini_compiler import *
from gemini.utils import *
if __name__ == '__main__':
main()
| 27.433333 | 76 | 0.655529 |
2a29410e6bfdb975ab115a17e1c90cb3b363e11d | 4,513 | py | Python | modules/quiet-scan-threaded.py | ChristopherBilg/cse-545-PCTF-team-31 | 24061a26b1d239605720a5e31d3cb1bfc288317a | [
"MIT"
] | null | null | null | modules/quiet-scan-threaded.py | ChristopherBilg/cse-545-PCTF-team-31 | 24061a26b1d239605720a5e31d3cb1bfc288317a | [
"MIT"
] | 1 | 2021-02-07T19:51:32.000Z | 2021-02-07T19:51:32.000Z | modules/quiet-scan-threaded.py | ChristopherBilg/cse-545-PCTF-team-31 | 24061a26b1d239605720a5e31d3cb1bfc288317a | [
"MIT"
] | 3 | 2021-02-17T15:44:39.000Z | 2022-01-29T03:18:49.000Z | #!/usr/bin/env python3
import subprocess
import sys, getopt, os
import threading
import argparse
cwd = os.getcwd()
path = cwd + "/port_scanner_files/"
ip_list_file = path + "input/IP_list.txt"
nmap_output_file = path + "temp_output/nmap_output"
#the scorchedearth option runs every nmap scan that doesn't require an ad... | 35.535433 | 254 | 0.645025 |
2a2949f385ec93a057a10d2a09d0bd12596b5253 | 1,535 | py | Python | veselin-angelov-ekatte/create_database.py | veselin-angelov/training-projects | f02a29eed57d60720fe66e76af483d2b1f689bfd | [
"Apache-2.0"
] | null | null | null | veselin-angelov-ekatte/create_database.py | veselin-angelov/training-projects | f02a29eed57d60720fe66e76af483d2b1f689bfd | [
"Apache-2.0"
] | null | null | null | veselin-angelov-ekatte/create_database.py | veselin-angelov/training-projects | f02a29eed57d60720fe66e76af483d2b1f689bfd | [
"Apache-2.0"
] | null | null | null | from helpers import create_connection, execute_query
connection = create_connection(
"postgres", "postgres", "admin", "127.0.0.1", "5432"
)
create_database_query = "CREATE DATABASE ekatte"
execute_query(connection, create_database_query)
connection = create_connection(
"ekatte", "postgres", "admin", "127.0.0... | 31.326531 | 106 | 0.672964 |
2a294c8c332d0308530bc30b08c40aaea110d61c | 1,964 | py | Python | src/isaw.events/setup.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | null | null | null | src/isaw.events/setup.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | 405 | 2015-03-12T18:20:25.000Z | 2022-03-07T18:44:16.000Z | src/isaw.events/setup.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | 1 | 2016-11-07T21:18:49.000Z | 2016-11-07T21:18:49.000Z | # -*- coding: utf-8 -*-
"""
This module contains the tool of Events
"""
import os
from setuptools import setup, find_packages
version = '0.2'
long_description = (
read('README.txt')
+ '\n' +
'Change history\n'
'**************\n'
+ '\n' +
read('CHANGES.txt')
+ '\n' +
'Detailed Documenta... | 26.540541 | 83 | 0.571283 |