hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a01762ca3e759a9a379ad71578ccb40a1edcad3d | 738 | py | Python | contests_atcoder/abc153/abc153_f.py | takelifetime/competitive-programming | e7cf8ef923ccefad39a1727ca94c610d650fcb76 | [
"BSD-2-Clause"
] | null | null | null | contests_atcoder/abc153/abc153_f.py | takelifetime/competitive-programming | e7cf8ef923ccefad39a1727ca94c610d650fcb76 | [
"BSD-2-Clause"
] | 1 | 2021-01-02T06:36:51.000Z | 2021-01-02T06:36:51.000Z | contests_atcoder/abc153/abc153_f.py | takelifetime/competitive-programming | e7cf8ef923ccefad39a1727ca94c610d650fcb76 | [
"BSD-2-Clause"
] | null | null | null | from bisect import bisect_left, bisect_right
from collections import deque, Counter
from itertools import combinations, permutations
from math import gcd, sin, cos, tan, degrees, radians
import sys
input = lambda: sys.stdin.readline().rstrip()
MOD = 10 ** 9 + 7
INF = float("inf")
n, d, a = map(int, input().split())
mo... | 23.0625 | 63 | 0.624661 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.006775 |
a017a1ab05231fbc634e10328c46e53e752448d8 | 16,532 | py | Python | sistema_experto.py | Erubeyy/SistemaExperto- | 6194f798fad684eb83635fe85bf3f1a7d70ed2a2 | [
"MIT"
] | null | null | null | sistema_experto.py | Erubeyy/SistemaExperto- | 6194f798fad684eb83635fe85bf3f1a7d70ed2a2 | [
"MIT"
] | null | null | null | sistema_experto.py | Erubeyy/SistemaExperto- | 6194f798fad684eb83635fe85bf3f1a7d70ed2a2 | [
"MIT"
] | null | null | null | from tkinter import*
from tkinter import font
from experta import *
raiz = Tk()
raiz.title("Sistema experto- Tipos de covid")
raiz.config(bg="#f4f7fa")
#raiz.resizable(0,0)
mi0Frame = Frame(raiz)#, width="1200", height="700")
mi0Frame.grid(row=1, column=0)
mi0Frame.config(bg="#f4f7fa")
mi3Frame = Frame(raiz)#, width=... | 43.851459 | 335 | 0.687576 | 6,638 | 0.401233 | 64 | 0.003868 | 6,534 | 0.394947 | 0 | 0 | 3,466 | 0.209502 |
a017aa5f81d90682eeec3d31e4bdb2e999666f4b | 6,105 | py | Python | socket_temperature_connect.py | MeowMeowZi/PPLTestTool | 576f28fb20680b1ed33520d92c552ccafc93d716 | [
"MIT"
] | null | null | null | socket_temperature_connect.py | MeowMeowZi/PPLTestTool | 576f28fb20680b1ed33520d92c552ccafc93d716 | [
"MIT"
] | null | null | null | socket_temperature_connect.py | MeowMeowZi/PPLTestTool | 576f28fb20680b1ed33520d92c552ccafc93d716 | [
"MIT"
] | null | null | null | import socket
import time
import shelve
preset_command = {
1: ['MB0023,1', 'MI0695,'],
2: ['MB0024,1', 'MI0696,'],
3: ['MB0076,1', 'MI0697,'],
4: ['MB0026,1', 'MI0698,'],
}
force_command = 'MB0336,1'
start_command = 'MB0020,0'
stop_command = 'MB0020,1'
class Temperature:
def __init__(self):
... | 30.678392 | 110 | 0.552826 | 6,068 | 0.947385 | 0 | 0 | 0 | 0 | 0 | 0 | 1,658 | 0.25886 |
a0187e302825ea7cb1c14461fb74435494c1cd4b | 12,938 | py | Python | wwwdccn/chair_mail/models.py | marvinxu99/dccnsys | 8f53728d06b859cace42cc84bc190bc89950d252 | [
"MIT"
] | 16 | 2020-03-15T15:33:30.000Z | 2021-11-26T21:57:27.000Z | wwwdccn/chair_mail/models.py | marvinxu99/dccnsys | 8f53728d06b859cace42cc84bc190bc89950d252 | [
"MIT"
] | 11 | 2019-04-27T19:15:43.000Z | 2022-03-11T23:43:08.000Z | wwwdccn/chair_mail/models.py | marvinxu99/dccnsys | 8f53728d06b859cace42cc84bc190bc89950d252 | [
"MIT"
] | 10 | 2020-03-14T09:25:39.000Z | 2022-02-21T16:46:33.000Z | from django.conf import settings
from django.core.mail import send_mail
from django.db import models
from django.db.models import ForeignKey, OneToOneField, TextField, CharField, \
SET_NULL, CASCADE, BooleanField, UniqueConstraint
from django.db.models.signals import post_save
from django.dispatch import receiver
f... | 35.157609 | 83 | 0.659762 | 9,205 | 0.71147 | 0 | 0 | 1,618 | 0.125058 | 0 | 0 | 3,311 | 0.255913 |
a01a6cd80a71c68a6da168b3758e9d7078688990 | 100 | py | Python | Pruebas.py | MacoChave/Server-Iniciales | 035d98793a1c20738b7af885d455fd62197988bd | [
"Apache-2.0"
] | null | null | null | Pruebas.py | MacoChave/Server-Iniciales | 035d98793a1c20738b7af885d455fd62197988bd | [
"Apache-2.0"
] | null | null | null | Pruebas.py | MacoChave/Server-Iniciales | 035d98793a1c20738b7af885d455fd62197988bd | [
"Apache-2.0"
] | null | null | null | from datetime import date
from datetime import datetime
dateToday = date.today()
print(dateToday) | 14.285714 | 29 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a01dc69fc961ecf3abcdcc4efc76fa8f20eeb48a | 1,753 | py | Python | translator/model.py | marco-nicola/python-translator | 6a559874c9899e52a4cac9c2954dcca6b638f002 | [
"Apache-2.0"
] | null | null | null | translator/model.py | marco-nicola/python-translator | 6a559874c9899e52a4cac9c2954dcca6b638f002 | [
"Apache-2.0"
] | null | null | null | translator/model.py | marco-nicola/python-translator | 6a559874c9899e52a4cac9c2954dcca6b638f002 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Marco Nicola
#
# 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, ... | 38.108696 | 79 | 0.718768 | 989 | 0.564176 | 0 | 0 | 0 | 0 | 0 | 0 | 687 | 0.3919 |
a01f36af66f5f536cdcfeccc977f7396f86e0837 | 15,082 | py | Python | home/.local/share/tkthemes/clearlooks/create_imgs.py | ssokolow/profile | 09f2a842077909d883a08b546659516deec7d719 | [
"MIT"
] | 9 | 2015-04-14T22:27:40.000Z | 2022-02-23T05:33:00.000Z | home/.local/share/tkthemes/clearlooks/create_imgs.py | ssokolow/profile | 09f2a842077909d883a08b546659516deec7d719 | [
"MIT"
] | 10 | 2018-06-18T07:57:56.000Z | 2021-10-04T06:47:19.000Z | home/.local/share/tkthemes/clearlooks/create_imgs.py | ssokolow/profile | 09f2a842077909d883a08b546659516deec7d719 | [
"MIT"
] | 9 | 2015-04-14T22:27:42.000Z | 2017-11-21T11:34:23.000Z | #!/usr/bin/env python
# -*- mode: python; coding: koi8-r; -*-
import os
import gtk, gobject
imdir = 'images'
imtype = 'png'
background = '#efebe7'
#fill_color = 0xff000000 # red
fill_color = int('ff000000', 16)
if not os.path.exists(imdir):
os.mkdir(imdir)
gc = None
def draw_rect():
global ... | 34.045147 | 79 | 0.579631 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,493 | 0.165296 |
a01fef4f0de34d121af8b1cbdb955d6acb92f36a | 4,687 | py | Python | coil_COMdistance.py | Johanu/MDAnalysis_scripts | f44d2b32bb916daa3bd61e9f3ad636db503293bf | [
"MIT"
] | null | null | null | coil_COMdistance.py | Johanu/MDAnalysis_scripts | f44d2b32bb916daa3bd61e9f3ad636db503293bf | [
"MIT"
] | null | null | null | coil_COMdistance.py | Johanu/MDAnalysis_scripts | f44d2b32bb916daa3bd61e9f3ad636db503293bf | [
"MIT"
] | null | null | null | from __future__ import division
import matplotlib.pyplot as plt
import MDAnalysis as md
import numpy as np
def calculate_dists(gro_file, xtc_file):
u = md.Universe(gro_file, xtc_file)
select_group1 = u.selectAtoms("backbone and (resnum 50 or resnum 51)")
select_group2 = u.selectAtoms("backbone and (resnum ... | 39.058333 | 103 | 0.667164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,039 | 0.221677 |
a021e7c81cd72a8cb8466d95bea774bd4667239f | 1,692 | py | Python | src/api/content_flag.py | Viewly/alpha-2 | 6b6d827197489164d8c4bde4f4d591dcec5a2163 | [
"MIT"
] | null | null | null | src/api/content_flag.py | Viewly/alpha-2 | 6b6d827197489164d8c4bde4f4d591dcec5a2163 | [
"MIT"
] | 1 | 2021-05-07T06:26:16.000Z | 2021-05-07T06:26:16.000Z | src/api/content_flag.py | Viewly/alpha-2 | 6b6d827197489164d8c4bde4f4d591dcec5a2163 | [
"MIT"
] | null | null | null | import datetime as dt
import json
from flask_restful import (
Resource,
reqparse,
)
from flask_security import current_user
from marshmallow_sqlalchemy import ModelSchema
from .utils import auth_required
from .. import db
from ..core.utils import log_exception
from ..models import ContentFlag
class FlagSch... | 26.030769 | 77 | 0.60461 | 1,217 | 0.719267 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.066194 |
a0220e4b4dae9e864bc6a43965e05ecf1eb56be9 | 13,231 | py | Python | cgmodsel/utils.py | franknu/cgmodsel | b008ed88e4f10205ee0ff5e9433d5426c1d5ff6a | [
"MIT"
] | 1 | 2020-09-01T08:39:14.000Z | 2020-09-01T08:39:14.000Z | cgmodsel/utils.py | franknu/cgmodsel | b008ed88e4f10205ee0ff5e9433d5426c1d5ff6a | [
"MIT"
] | null | null | null | cgmodsel/utils.py | franknu/cgmodsel | b008ed88e4f10205ee0ff5e9433d5426c1d5ff6a | [
"MIT"
] | 1 | 2020-09-04T13:35:41.000Z | 2020-09-04T13:35:41.000Z | # -*- coding: utf-8 -*-
"""
Copyright: Frank Nussbaum ([email protected])
This file contains various functions used in the module including
- sparse norms and shrinkage operators
- a stable logsumexp implementation
- array printing-method that allows pasting the output into Python code
"""
import... | 33.752551 | 90 | 0.542438 | 0 | 0 | 136 | 0.010279 | 0 | 0 | 0 | 0 | 5,923 | 0.447661 |
4e41eecc288939d5378c49ce5811a41875918b72 | 1,091 | py | Python | authorization/migrations/0002_auto_20200207_2011.py | KariSpace/CRM_Sedicomm | cb19e90ca99c7a50a1841afbfb878191f62dec5c | [
"MIT"
] | null | null | null | authorization/migrations/0002_auto_20200207_2011.py | KariSpace/CRM_Sedicomm | cb19e90ca99c7a50a1841afbfb878191f62dec5c | [
"MIT"
] | null | null | null | authorization/migrations/0002_auto_20200207_2011.py | KariSpace/CRM_Sedicomm | cb19e90ca99c7a50a1841afbfb878191f62dec5c | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2020-02-07 18:11
from django.db import migrations, models
import django.db.models.deletion
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('authorization', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 32.088235 | 122 | 0.604033 | 941 | 0.862511 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.16407 |
4e428e1c353f9ae16acebfc45bfab7a9a4bd2704 | 2,081 | py | Python | ssd/modeling/head/ssd_head.py | tkhe/ssd-family | a797ec36fda59549aff54419c105813c33d8cdd3 | [
"MIT"
] | 1 | 2019-07-12T02:21:24.000Z | 2019-07-12T02:21:24.000Z | ssd/modeling/head/ssd_head.py | tkhe/ssd-family | a797ec36fda59549aff54419c105813c33d8cdd3 | [
"MIT"
] | null | null | null | ssd/modeling/head/ssd_head.py | tkhe/ssd-family | a797ec36fda59549aff54419c105813c33d8cdd3 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.nn.functional as F
from ssd.modeling.anchor import make_anchor_generator
from ssd.utils import bbox
from .inference import make_post_processor
from .loss import make_loss_evaluator
from .predictor import make_ssd_predictor
class SSDHead(nn.Module):
def __init__(self, cfg, in_ch... | 35.87931 | 96 | 0.675156 | 1,819 | 0.874099 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4e42bcb647690572f850059e2f35498edac0af13 | 415 | py | Python | find_max_occurence_simple.py | swatmantis/my-pyscripts | e16af5879b101c30e34e82727292849d1d33f440 | [
"Apache-2.0"
] | null | null | null | find_max_occurence_simple.py | swatmantis/my-pyscripts | e16af5879b101c30e34e82727292849d1d33f440 | [
"Apache-2.0"
] | null | null | null | find_max_occurence_simple.py | swatmantis/my-pyscripts | e16af5879b101c30e34e82727292849d1d33f440 | [
"Apache-2.0"
] | null | null | null | """Find max element"""
#!/usr/bin/env python3
"""Find max element"""
import random
from collections import Counter
List = [random.randrange(1, 15) for num in range(10)]
def most_frequent(List):
occurence_count = Counter(List)
return occurence_count.most_common()
frequent_number, frequency = most_frequent(Lis... | 27.666667 | 88 | 0.742169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.354217 |
4e4b385ebb874ffc51cb3af951c49e948dbf2c97 | 1,659 | py | Python | plugin.video.SportsDevil/lib/dialogs/dialogProgress.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 105 | 2015-11-28T00:03:11.000Z | 2021-05-05T20:47:42.000Z | plugin.video.SportsDevil/lib/dialogs/dialogProgress.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 918 | 2015-11-28T14:12:40.000Z | 2022-03-23T20:24:49.000Z | plugin.video.SportsDevil/lib/dialogs/dialogProgress.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 111 | 2015-12-01T14:06:10.000Z | 2020-08-01T10:44:39.000Z | # -*- coding: utf-8 -*-
import xbmcgui
class DialogProgress:
def __init__(self):
self.dlg = xbmcgui.DialogProgress()
self.__reset__()
def __reset__(self):
self.head = ''
self.firstline = ''
self.secondline = None
self.thirdline = None
self.percent = 0
... | 28.603448 | 90 | 0.603978 | 1,618 | 0.975286 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.016275 |
4e4b7d98eca7eba2d20b079df0bbd0eb0b4e7a32 | 3,828 | py | Python | bitbake/lib/bb/manifest.py | KDAB/OpenEmbedded-Archos | a525c5629a57ccb8656c22fe5528ce264003f9d8 | [
"MIT"
] | 3 | 2015-05-25T10:56:21.000Z | 2021-11-27T17:25:26.000Z | bitbake/lib/bb/manifest.py | KDAB/OpenEmbedded-Archos | a525c5629a57ccb8656c22fe5528ce264003f9d8 | [
"MIT"
] | 1 | 2021-11-27T17:24:21.000Z | 2021-11-27T17:24:21.000Z | bitbake/lib/bb/manifest.py | KDAB/OpenEmbedded-Archos | a525c5629a57ccb8656c22fe5528ce264003f9d8 | [
"MIT"
] | 2 | 2016-08-13T08:40:48.000Z | 2021-03-26T03:01:03.000Z | # ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (C) 2003, 2004 Chris Larson
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#... | 26.4 | 112 | 0.544148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,273 | 0.33255 |
4e4e48bf1020755d5adf17a1c4aa85cf738609d6 | 23,209 | py | Python | riglib/bmi/robot_arms.py | sgowda/brain-python-interface | 708e2a5229d0496a8ce9de32bda66f0925d366d9 | [
"Apache-2.0"
] | 7 | 2015-08-25T00:28:49.000Z | 2020-04-14T22:58:51.000Z | riglib/bmi/robot_arms.py | sgowda/brain-python-interface | 708e2a5229d0496a8ce9de32bda66f0925d366d9 | [
"Apache-2.0"
] | 89 | 2020-08-03T16:54:08.000Z | 2022-03-09T19:56:19.000Z | riglib/bmi/robot_arms.py | sgowda/brain-python-interface | 708e2a5229d0496a8ce9de32bda66f0925d366d9 | [
"Apache-2.0"
] | 4 | 2016-10-05T17:54:26.000Z | 2020-08-06T15:37:09.000Z | '''
Classes implementing various kinematic chains. This module is perhaps mis-located
as it does not have a direct BMI role but rather contains code which is useful in
supporting BMI control of kinematic chains.
This code depends on the 'robot' module (https://github.com/sgowda/robotics_toolbox)
'''
import numpy as np... | 32.190014 | 138 | 0.561463 | 21,948 | 0.945668 | 0 | 0 | 169 | 0.007282 | 0 | 0 | 8,677 | 0.373864 |
4e4e7f677ab2a0f132b93e4b1dfb1c29e362f6de | 3,622 | py | Python | src/utils/tilemap.py | Magicalbat/Metroidvania-Month-15 | a0a30fb3f531a597ced69bf76568ef26e5e88019 | [
"MIT"
] | null | null | null | src/utils/tilemap.py | Magicalbat/Metroidvania-Month-15 | a0a30fb3f531a597ced69bf76568ef26e5e88019 | [
"MIT"
] | null | null | null | src/utils/tilemap.py | Magicalbat/Metroidvania-Month-15 | a0a30fb3f531a597ced69bf76568ef26e5e88019 | [
"MIT"
] | null | null | null | import pygame
from pygame.math import Vector2
import json, math
class Tilemap:
def __init__(self, tileSize, imgs, chunkSize=8):
self.tileSize = tileSize
self.imgs = imgs
self.drawTiles = []
self.chunks = {}
self.chunkSize = chunkSize
def toChunkScale(self, p):
... | 38.126316 | 90 | 0.549144 | 3,556 | 0.981778 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.013805 |
4e508c95181eba9329a23ec0f597dadfe33c7e09 | 7,295 | py | Python | src/dsnt/util.py | anibali/dsnt-pose2d | f453331a6b120f02948336555b996ac0d95bf4be | [
"Apache-2.0"
] | 12 | 2018-10-18T06:41:00.000Z | 2021-07-31T08:19:41.000Z | src/dsnt/util.py | anibali/dsnt-pose2d | f453331a6b120f02948336555b996ac0d95bf4be | [
"Apache-2.0"
] | 2 | 2019-07-15T13:36:08.000Z | 2020-03-09T04:39:08.000Z | src/dsnt/util.py | anibali/dsnt-pose2d | f453331a6b120f02948336555b996ac0d95bf4be | [
"Apache-2.0"
] | 5 | 2019-01-08T01:32:18.000Z | 2020-08-04T07:42:12.000Z | """
Miscellaneous utility functions.
"""
import random
import time
from contextlib import contextmanager
import math
import numpy as np
import torch
from PIL.ImageDraw import Draw
# Joints to connect for visualisation, giving the effect of drawing a
# basic "skeleton" of the pose.
BONES = {
'right_lower_leg': (0... | 31.042553 | 92 | 0.615216 | 0 | 0 | 279 | 0.038245 | 160 | 0.021933 | 0 | 0 | 2,276 | 0.311995 |
4e50c9eaddb3cc1ea6331eb13dca8d92f32d04fe | 1,321 | py | Python | lect01_codes/lect01_eg/multiprocess_eg/mp_main.py | radiumweilei/chinahadoop-python-ai-2 | f45271b073f99b9c46de150aa87bcf4adc5feca2 | [
"Apache-2.0"
] | null | null | null | lect01_codes/lect01_eg/multiprocess_eg/mp_main.py | radiumweilei/chinahadoop-python-ai-2 | f45271b073f99b9c46de150aa87bcf4adc5feca2 | [
"Apache-2.0"
] | null | null | null | lect01_codes/lect01_eg/multiprocess_eg/mp_main.py | radiumweilei/chinahadoop-python-ai-2 | f45271b073f99b9c46de150aa87bcf4adc5feca2 | [
"Apache-2.0"
] | 1 | 2019-11-11T09:42:06.000Z | 2019-11-11T09:42:06.000Z | import os
import time
from datetime import datetime
from multiprocessing import Process, Pool
def run_proc(n):
print('第{}次循环,子进程id:{},父进程id:{}'.format(n, os.getpid(), os.getppid()))
time.sleep(1)
if __name__ == '__main__':
print('父进程id', os.getpid())
# 1. 顺序执行任务
# start = datetime.now()
# ... | 23.175439 | 74 | 0.551098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,128 | 0.732943 |
4e51a3f60a853dcb91ad39c536974879ba250f9f | 268 | py | Python | strings_12/tests/test_change_case.py | njoroge33/py_learn | 6ad55f37789045bc5c03f3dd668cf1ea497f4e84 | [
"MIT"
] | null | null | null | strings_12/tests/test_change_case.py | njoroge33/py_learn | 6ad55f37789045bc5c03f3dd668cf1ea497f4e84 | [
"MIT"
] | 2 | 2019-04-15T06:29:55.000Z | 2019-04-19T17:34:32.000Z | strings_12/tests/test_change_case.py | njoroge33/py_learn | 6ad55f37789045bc5c03f3dd668cf1ea497f4e84 | [
"MIT"
] | 1 | 2019-11-19T04:51:18.000Z | 2019-11-19T04:51:18.000Z | import pytest
from ..change_case import change_case
@pytest.mark.parametrize("x_str, expected", [
("BLACKstar", "blackSTAR"),
("jOhn", "JoHN")
])
def test_change_case(x_str, expected):
actual = change_case(x_str)
assert actual == expected
| 22.333333 | 46 | 0.664179 | 0 | 0 | 0 | 0 | 208 | 0.776119 | 0 | 0 | 51 | 0.190299 |
4e533f314e5c3e66781f51a4229383e5a116f3ac | 803 | py | Python | Curso_Python_3_UDEMY/POO/desafio_carro.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | Curso_Python_3_UDEMY/POO/desafio_carro.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | Curso_Python_3_UDEMY/POO/desafio_carro.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | class Carro:
def __init__(self, velocidadeMaxima):
self.velocidadeMaxima = velocidadeMaxima
self.velocidade = 0
def acelerar(self, delta=5):
if self.velocidade < self.velocidadeMaxima:
self.velocidade += delta
else:
self.velocidade = 180
return se... | 28.678571 | 83 | 0.608966 | 595 | 0.740971 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.108344 |
4e55091a618968c01ac26471c9cd251dd97a71d7 | 9,578 | py | Python | argocd_client/models/application_application_sync_request.py | thepabloaguilar/argocd-client | a6c4ff268a63ee6715f9f837b9225b798aa6bde2 | [
"BSD-3-Clause"
] | 1 | 2021-09-29T11:57:07.000Z | 2021-09-29T11:57:07.000Z | argocd_client/models/application_application_sync_request.py | thepabloaguilar/argocd-client | a6c4ff268a63ee6715f9f837b9225b798aa6bde2 | [
"BSD-3-Clause"
] | 1 | 2020-09-09T00:28:57.000Z | 2020-09-09T00:28:57.000Z | argocd_client/models/application_application_sync_request.py | thepabloaguilar/argocd-client | a6c4ff268a63ee6715f9f837b9225b798aa6bde2 | [
"BSD-3-Clause"
] | 2 | 2020-10-13T18:31:59.000Z | 2021-02-15T12:52:33.000Z | # coding: utf-8
"""
Consolidate Services
Description of all APIs # noqa: E501
The version of the OpenAPI document: version not set
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from argocd_client.configuration import Configuration
class Appli... | 29.112462 | 200 | 0.618292 | 9,268 | 0.967634 | 0 | 0 | 5,139 | 0.536542 | 0 | 0 | 5,015 | 0.523596 |
4e5750ff5296717b749da87c576b380ec5a0ca38 | 1,818 | py | Python | kedro/extras/decorators/retry_node.py | hfwittmann/kedro | b0d4fcd8f19b49a7916d78fd09daeb6209a7b6c6 | [
"Apache-2.0"
] | 1 | 2021-11-25T12:33:13.000Z | 2021-11-25T12:33:13.000Z | kedro/extras/decorators/retry_node.py | MerelTheisenQB/kedro | 1eaa2e0fa5d80f96e18ea60b9f3d6e6efc161827 | [
"Apache-2.0"
] | null | null | null | kedro/extras/decorators/retry_node.py | MerelTheisenQB/kedro | 1eaa2e0fa5d80f96e18ea60b9f3d6e6efc161827 | [
"Apache-2.0"
] | null | null | null | """
This module contains the retry decorator, which can be used as
``Node`` decorators to retry nodes. See ``kedro.pipeline.node.decorate``
"""
import logging
from functools import wraps
from time import sleep
from typing import Callable, Type
def retry(
exceptions: Type[Exception] = Exception, n_times: int = 1,... | 30.3 | 86 | 0.573707 | 0 | 0 | 0 | 0 | 798 | 0.438944 | 0 | 0 | 815 | 0.448295 |
4e57932c1bf27e86e563c5240b4f42764bb1b0f4 | 1,470 | py | Python | test/lmp/dset/_base/test_download_file.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/dset/_base/test_download_file.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/dset/_base/test_download_file.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | """Test the ability to download files.
Test target:
- :py:meth:`lmp.dset._base.BaseDset.download`.
"""
import os
from typing import Callable
import pytest
import lmp.dset._base
import lmp.util.path
@pytest.fixture
def file_url() -> str:
"""Download target file URL."""
return 'https://raw.githubusercontent.com... | 30 | 112 | 0.755782 | 0 | 0 | 0 | 0 | 730 | 0.496599 | 0 | 0 | 492 | 0.334694 |
4e584909a422d8166030333d2adb063c0ced43a9 | 1,019 | py | Python | server/account/models.py | istommao/fakedataset | 365ef0c68d1ecac30ab2c9908e6a5efa1da5d81e | [
"MIT"
] | null | null | null | server/account/models.py | istommao/fakedataset | 365ef0c68d1ecac30ab2c9908e6a5efa1da5d81e | [
"MIT"
] | null | null | null | server/account/models.py | istommao/fakedataset | 365ef0c68d1ecac30ab2c9908e6a5efa1da5d81e | [
"MIT"
] | null | null | null | """account models."""
from django.contrib.auth.hashers import (
check_password, make_password
)
from django.db import models
from extension.modelutils import RandomFixedCharField
class Account(models.Model):
uid = RandomFixedCharField('编号', max_length=32, unique=True)
username = models.CharField('用户名',... | 28.305556 | 66 | 0.693817 | 870 | 0.823084 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.106906 |
4e59aa0341bec9390bf565218344a25a6e72bf84 | 2,420 | py | Python | tests/views/test_delete.py | fvalverd/AutoApi | 3ceb320fe6a36d24032df121e335a8470fb929af | [
"MIT"
] | 6 | 2015-04-28T13:03:04.000Z | 2021-08-24T19:15:53.000Z | tests/views/test_delete.py | fvalverd/AutoApi | 3ceb320fe6a36d24032df121e335a8470fb929af | [
"MIT"
] | 6 | 2017-06-19T20:59:10.000Z | 2020-05-22T16:22:28.000Z | tests/views/test_delete.py | fvalverd/AutoApi | 3ceb320fe6a36d24032df121e335a8470fb929af | [
"MIT"
] | 2 | 2015-11-10T14:38:39.000Z | 2017-05-18T05:46:03.000Z | # -*- coding: utf-8 -*-
import json
import unittest
from .. import MoviesTest
class TestDeleteResource(MoviesTest):
def setUp(self):
self.setUpClass()
super(TestDeleteResource, self).setUp()
def test_delete_invalid_id(self):
response = self.app.delete('/%s/movies/a1' % self.api, hea... | 35.588235 | 108 | 0.638843 | 2,286 | 0.944628 | 0 | 0 | 0 | 0 | 0 | 0 | 292 | 0.120661 |
4e5ac8d618f9e77a2b39df9c4c03557f518e532c | 1,347 | py | Python | src/api/urls.py | Karim-Valeev/django-myfoods | e8750a05461616a2e7740230177a139749daac73 | [
"MIT"
] | null | null | null | src/api/urls.py | Karim-Valeev/django-myfoods | e8750a05461616a2e7740230177a139749daac73 | [
"MIT"
] | null | null | null | src/api/urls.py | Karim-Valeev/django-myfoods | e8750a05461616a2e7740230177a139749daac73 | [
"MIT"
] | null | null | null | from django.urls import path, re_path
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework.routers import SimpleRouter, DefaultRouter
from rest_framework_simplejwt import views as jwt_views
from api.views import *
# роутер нужен, чтобы сгенерить урлы под вью сет и самому их не ... | 38.485714 | 111 | 0.723831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 486 | 0.342254 |
4e5b531d4dae58f3f455001978beda2d6160593c | 18,417 | py | Python | second/pytorch/inference_ros.py | neolixcn/nutonomy_pointpillars | 03f46f6de97c0c97d7bc98d7af3daee215d81a30 | [
"MIT"
] | 1 | 2021-06-11T00:54:48.000Z | 2021-06-11T00:54:48.000Z | second/pytorch/inference_ros.py | neolixcn/nutonomy_pointpillars | 03f46f6de97c0c97d7bc98d7af3daee215d81a30 | [
"MIT"
] | null | null | null | second/pytorch/inference_ros.py | neolixcn/nutonomy_pointpillars | 03f46f6de97c0c97d7bc98d7af3daee215d81a30 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import argparse
import pathlib
import pickle
import shutil
import time
from functools import partial
import sys
sys.path.append('../')
from pathlib import Path
import fire
import numpy as np
import torch
import torch.nn as nn
import os
print(torch.__version__)
print(os.environ['PYTHONP... | 37.432927 | 176 | 0.617147 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,769 | 0.367541 |
4e5c7dba2e2083dcb5bc4c5689df3f572c63510f | 3,112 | py | Python | agent.py | AdamMiltonBarker/TassAI | 61ae4f208f06ea39cc5b58079175f17bf1fca4c4 | [
"MIT"
] | 1 | 2021-06-29T09:46:47.000Z | 2021-06-29T09:46:47.000Z | agent.py | AdamMiltonBarker/TassAI | 61ae4f208f06ea39cc5b58079175f17bf1fca4c4 | [
"MIT"
] | 4 | 2021-06-27T16:06:43.000Z | 2021-06-27T16:09:53.000Z | agent.py | AdamMiltonBarker/TassAI | 61ae4f208f06ea39cc5b58079175f17bf1fca4c4 | [
"MIT"
] | 2 | 2020-09-28T02:11:43.000Z | 2020-10-13T15:27:41.000Z | #!/usr/bin/env python3
""" HIAS TassAI Facial Recognition Agent.
HIAS TassAI Facial Recognition Agent processes streams from local
or remote cameras to identify known and unknown humans.
MIT License
Copyright (c) 2021 Asociación de Investigacion en Inteligencia Artificial
Para la Leucemia Peter Moss
Permission is h... | 26.151261 | 78 | 0.754499 | 968 | 0.310954 | 0 | 0 | 0 | 0 | 0 | 0 | 1,913 | 0.61452 |
4e5f6c409675e74bac8adf5ea0c951c284a25d25 | 181 | py | Python | asyncy/constants/LineConstants.py | rashmi43/platform-engine | dd9a22742bc8dc43a530ea5edef39b3c35db57c1 | [
"Apache-2.0"
] | null | null | null | asyncy/constants/LineConstants.py | rashmi43/platform-engine | dd9a22742bc8dc43a530ea5edef39b3c35db57c1 | [
"Apache-2.0"
] | null | null | null | asyncy/constants/LineConstants.py | rashmi43/platform-engine | dd9a22742bc8dc43a530ea5edef39b3c35db57c1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
class LineConstants:
method = 'method'
output = 'output'
enter = 'enter'
parent = 'parent'
command = 'command'
service = 'service'
| 16.454545 | 23 | 0.563536 | 154 | 0.850829 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.39779 |
4e604e0888e3f4c9cd3d2b535fdc4b7f1eabfe77 | 2,576 | py | Python | Payload_Types/apfell/mythic/agent_functions/terminals_send.py | xorrior/Mythic | ea348b66e1d96e88e0e7fbabff182945cbdf12b6 | [
"BSD-3-Clause"
] | 2 | 2021-01-28T19:35:46.000Z | 2021-04-08T12:01:48.000Z | Payload_Types/apfell/mythic/agent_functions/terminals_send.py | xorrior/Mythic | ea348b66e1d96e88e0e7fbabff182945cbdf12b6 | [
"BSD-3-Clause"
] | null | null | null | Payload_Types/apfell/mythic/agent_functions/terminals_send.py | xorrior/Mythic | ea348b66e1d96e88e0e7fbabff182945cbdf12b6 | [
"BSD-3-Clause"
] | 2 | 2020-12-29T02:34:13.000Z | 2021-06-24T04:07:38.000Z | from CommandBase import *
import json
from MythicResponseRPC import *
class TerminalsSendArguments(TaskArguments):
def __init__(self, command_line):
super().__init__(command_line)
self.args = {
"window": CommandParameter(
name="window",
type=ParameterTyp... | 36.8 | 457 | 0.622671 | 2,500 | 0.970497 | 0 | 0 | 0 | 0 | 882 | 0.342391 | 775 | 0.300854 |
4e6138843998a3ede92abaaa70a1ae3fc7c18aae | 711 | py | Python | losses.py | dhaulagiri0/AniGen | bd845a29e771544ade1f64b94f967d8e178952f8 | [
"MIT"
] | null | null | null | losses.py | dhaulagiri0/AniGen | bd845a29e771544ade1f64b94f967d8e178952f8 | [
"MIT"
] | null | null | null | losses.py | dhaulagiri0/AniGen | bd845a29e771544ade1f64b94f967d8e178952f8 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras import backend
#DEPRECATED
# An implementation of wasserstein used for a naive implementation of WGAN
# calculate wasserstein loss
def wasserstein_loss(y_true, y_pred):
return backend.mean(y_true * y_pred)
# Define the loss functions for the discriminator,
# which shoul... | 32.318182 | 74 | 0.78481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.441632 |
4e6142fd70771c11fbb624c19a0644bc6c708693 | 623 | py | Python | mephisto/plugins/math_expr.py | Kenton1989/mephisto-bot | 50a8008c99b984a453713f480fa578bf5a8353c8 | [
"MIT"
] | null | null | null | mephisto/plugins/math_expr.py | Kenton1989/mephisto-bot | 50a8008c99b984a453713f480fa578bf5a8353c8 | [
"MIT"
] | null | null | null | mephisto/plugins/math_expr.py | Kenton1989/mephisto-bot | 50a8008c99b984a453713f480fa578bf5a8353c8 | [
"MIT"
] | null | null | null | import re
import math
import numexpr as ne
MATH_CONST = {
'pi': math.pi,
'π': math.pi,
'e': math.e,
'inf': math.inf,
'i': 1j,
'j': 1j,
}
SUB_MAP = {
# replace UTF char with ASCII char
'(': '(',
')': ')',
',': ',',
'-': '-',
'÷': '/',
'×': '*',
'+': '+',
#... | 16.394737 | 67 | 0.473515 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 175 | 0.274295 |
4e61d7b3b7f328b277a5ef816c4995021aeb1703 | 1,185 | py | Python | testemu/client/testemu_client/network.py | advaoptical/netemu | a418503d3829f206602e9360c05235626fa8bec5 | [
"Apache-2.0"
] | null | null | null | testemu/client/testemu_client/network.py | advaoptical/netemu | a418503d3829f206602e9360c05235626fa8bec5 | [
"Apache-2.0"
] | null | null | null | testemu/client/testemu_client/network.py | advaoptical/netemu | a418503d3829f206602e9360c05235626fa8bec5 | [
"Apache-2.0"
] | null | null | null | from collections import Mapping
from . import yang_models
class Meta(type):
class Interface(
yang_models
.com_adva_netemu_testemu_client_TestInterface_YangListModel):
"""
Pythonizer for Java class ``TestInterface``.
From Java package ``com.adva.netemu.testemu.cli... | 23.7 | 73 | 0.571308 | 1,120 | 0.945148 | 586 | 0.494515 | 600 | 0.506329 | 0 | 0 | 246 | 0.207595 |
4e61d7b801c1c3cd496fc2afd8c46c182f86ceda | 666 | py | Python | asym_rlpo/representations/identity.py | abaisero/asym-porl | 8a76d920e51d783bbeeeea3cd2b02efffbb33c72 | [
"MIT"
] | 2 | 2021-08-24T22:41:36.000Z | 2021-10-31T01:55:37.000Z | asym_rlpo/representations/identity.py | abaisero/asym-porl | 8a76d920e51d783bbeeeea3cd2b02efffbb33c72 | [
"MIT"
] | null | null | null | asym_rlpo/representations/identity.py | abaisero/asym-porl | 8a76d920e51d783bbeeeea3cd2b02efffbb33c72 | [
"MIT"
] | 1 | 2021-10-13T12:27:40.000Z | 2021-10-13T12:27:40.000Z | import gym
import torch
from asym_rlpo.utils.debugging import checkraise
from .base import Representation
class IdentityRepresentation(Representation):
def __init__(self, input_space: gym.spaces.Box):
super().__init__()
checkraise(
isinstance(input_space, gym.spaces.Box)
... | 22.2 | 52 | 0.630631 | 555 | 0.833333 | 0 | 0 | 58 | 0.087087 | 0 | 0 | 54 | 0.081081 |
4e630265553913112faaae0a442558c6d77373c7 | 8,885 | py | Python | src/ggplib/db/lookup.py | richemslie/ggplib | 8388678f311db4a9906d8a3aff71d3f0037b623b | [
"MIT"
] | 11 | 2019-03-02T13:49:07.000Z | 2021-12-21T17:03:05.000Z | src/ggplib/db/lookup.py | ggplib/ggplib | 8388678f311db4a9906d8a3aff71d3f0037b623b | [
"MIT"
] | 2 | 2019-05-15T18:23:50.000Z | 2019-05-19T08:13:19.000Z | src/ggplib/db/lookup.py | ggplib/ggplib | 8388678f311db4a9906d8a3aff71d3f0037b623b | [
"MIT"
] | 1 | 2020-04-02T17:35:35.000Z | 2020-04-02T17:35:35.000Z | import sys
import traceback
from ggplib.util import log
from ggplib.statemachine import builder
from ggplib.db import signature
class GameInfo(object):
def __init__(self, game, gdl_str):
self.game = game
self.gdl_str = gdl_str
# might be None, depends on whether we grab it from sig.json
... | 28.206349 | 88 | 0.566798 | 5,647 | 0.635566 | 0 | 0 | 74 | 0.008329 | 0 | 0 | 1,446 | 0.162746 |
4e63749234da693d5c1f2625bba0bf9c3d524e3f | 274 | py | Python | testproject/fiber_test/tests/test_templatetags/test_fiber_version.py | bsimons/django-fiber | 0f4b03217a4aeba6b48908825507fbe8c5732c8d | [
"Apache-2.0"
] | 143 | 2015-01-06T01:15:22.000Z | 2017-07-08T04:10:08.000Z | testproject/fiber_test/tests/test_templatetags/test_fiber_version.py | bsimons/django-fiber | 0f4b03217a4aeba6b48908825507fbe8c5732c8d | [
"Apache-2.0"
] | 44 | 2015-01-22T14:21:32.000Z | 2017-05-31T16:59:23.000Z | testproject/fiber_test/tests/test_templatetags/test_fiber_version.py | bsimons/django-fiber | 0f4b03217a4aeba6b48908825507fbe8c5732c8d | [
"Apache-2.0"
] | 53 | 2015-01-21T21:48:49.000Z | 2017-06-12T07:33:13.000Z | import fiber
from django.test import SimpleTestCase
from ...test_util import RenderMixin
class TestFiberVersion(RenderMixin, SimpleTestCase):
def test_fiber_version(self):
self.assertRendered('{% load fiber_tags %}{% fiber_version %}', str(fiber.__version__))
| 30.444444 | 95 | 0.766423 | 182 | 0.664234 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.153285 |
4e658277a9b24094cf1e76fa7c348cccc93b01df | 7,352 | py | Python | main.py | dogerish/pic2html | cca9d032fb2325cb8c220cd0f5f632235d0f8c94 | [
"MIT"
] | null | null | null | main.py | dogerish/pic2html | cca9d032fb2325cb8c220cd0f5f632235d0f8c94 | [
"MIT"
] | null | null | null | main.py | dogerish/pic2html | cca9d032fb2325cb8c220cd0f5f632235d0f8c94 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
import sys, re
from PIL import Image
# return the argument if it exists (converted to the same type as the default), otherwise default
default = lambda arg, defa: type(defa)(sys.argv[arg]) if len(sys.argv) > arg and sys.argv[arg] else defa
# filename of image to evaluate, default is image.jpg
IMAG... | 37.131313 | 104 | 0.569777 | 3,890 | 0.529108 | 0 | 0 | 0 | 0 | 0 | 0 | 2,576 | 0.350381 |
4e673a1840258d5931483218139042ef6091e9ee | 485 | py | Python | coding_challenge/conftest.py | jojacobsen/coding_challenge | 94335f00f57a6c4d64cbc2b282a0ca099445e866 | [
"MIT"
] | 1 | 2022-03-06T15:40:56.000Z | 2022-03-06T15:40:56.000Z | coding_challenge/conftest.py | jojacobsen/coding_challenge | 94335f00f57a6c4d64cbc2b282a0ca099445e866 | [
"MIT"
] | null | null | null | coding_challenge/conftest.py | jojacobsen/coding_challenge | 94335f00f57a6c4d64cbc2b282a0ca099445e866 | [
"MIT"
] | null | null | null | import pytest
from coding_challenge.users.models import User
from coding_challenge.users.tests.factories import UserFactory
from coding_challenge.ship_manager.models import Ship
from coding_challenge.ship_manager.tests.factories import ShipFactory
@pytest.fixture(autouse=True)
def media_storage(settings, tmpdir):
... | 22.045455 | 69 | 0.797938 | 0 | 0 | 0 | 0 | 227 | 0.468041 | 0 | 0 | 0 | 0 |
4e699a095a31850ba8f572b972a6266ffa8b3893 | 1,909 | py | Python | swagger.py | edwardw1987/swagger | 69b868523834811537af5265b47eb0bd94c42c2f | [
"MIT"
] | null | null | null | swagger.py | edwardw1987/swagger | 69b868523834811537af5265b47eb0bd94c42c2f | [
"MIT"
] | null | null | null | swagger.py | edwardw1987/swagger | 69b868523834811537af5265b47eb0bd94c42c2f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author: edward
# @Date: 2016-05-12 14:11:21
# @Last Modified by: edward
# @Last Modified time: 2016-05-12 17:29:48
from functools import partial
# api = swagger.docs(Api(app), apiVersion='0.1',
# basePath='http://localhost:5000',
# resourcePath='/',
... | 25.118421 | 64 | 0.550026 | 1,230 | 0.644316 | 0 | 0 | 151 | 0.079099 | 0 | 0 | 608 | 0.318491 |
4e69ad09d076ffa2812d0d72b1983c1392ea46e1 | 29,469 | py | Python | wicarproject/carapi/carupload_tests.py | todhm/wicarproject | 5a3ea7b70ba6649af75d9e9bb49683eb6f94b570 | [
"MIT"
] | 1 | 2018-04-20T04:58:50.000Z | 2018-04-20T04:58:50.000Z | wicarproject/carapi/carupload_tests.py | todhm/wicarproject | 5a3ea7b70ba6649af75d9e9bb49683eb6f94b570 | [
"MIT"
] | 7 | 2021-02-08T20:24:49.000Z | 2022-03-11T23:26:33.000Z | wicarproject/carapi/carupload_tests.py | todhm/wicarproject | 5a3ea7b70ba6649af75d9e9bb49683eb6f94b570 | [
"MIT"
] | null | null | null | import os
import unittest
import sqlalchemy
from flask import Flask,session,url_for,redirect
from flask_sqlalchemy import SQLAlchemy
from application import create_app ,db
import unittest
import json
from caruser.models import User, UserBank
from carupload.models import CarOption,Car,CarImage
from flask_testing import ... | 43.083333 | 137 | 0.574468 | 29,177 | 0.974223 | 0 | 0 | 4,101 | 0.136933 | 0 | 0 | 5,179 | 0.172927 |
4e69d114d4d24a38c5a1cd7288544f6fdd2af296 | 1,947 | py | Python | test/train_net.py | gregdeon/simple-ann | 80f1d239d15b820162d5de93766290bca81f7bd3 | [
"MIT"
] | 1 | 2018-08-07T03:27:23.000Z | 2018-08-07T03:27:23.000Z | test/train_net.py | gregdeon/simple-ann | 80f1d239d15b820162d5de93766290bca81f7bd3 | [
"MIT"
] | null | null | null | test/train_net.py | gregdeon/simple-ann | 80f1d239d15b820162d5de93766290bca81f7bd3 | [
"MIT"
] | null | null | null | # train-net.py
# Use the neural network module to detect simple signals
import numpy as np
import matplotlib.pyplot as plt
import random
from src.net import Net
def main():
""" Step 1: make dataset """
random.seed()
# Make 3 inputs - 1 base and 2 added inputs
sig_len = 10
y_base = np.array([1, 2,... | 30.421875 | 82 | 0.580894 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 653 | 0.335388 |
4e6a00926225b1d573a3d0b1379d0479bee2d1ba | 2,165 | py | Python | neural-network/model/gcn_lib/sparse/data_util.py | BuildJet/hongbomiao.com | 33bcbf63c51f9df725811ddbdef49d0db46146ef | [
"MIT"
] | 104 | 2019-08-09T21:27:48.000Z | 2022-03-29T11:58:36.000Z | neural-network/model/gcn_lib/sparse/data_util.py | BuildJet/hongbomiao.com | 33bcbf63c51f9df725811ddbdef49d0db46146ef | [
"MIT"
] | 4,187 | 2019-08-04T08:19:36.000Z | 2022-03-31T22:43:20.000Z | neural-network/model/gcn_lib/sparse/data_util.py | BuildJet/hongbomiao.com | 33bcbf63c51f9df725811ddbdef49d0db46146ef | [
"MIT"
] | 19 | 2019-08-06T00:53:05.000Z | 2022-01-04T05:55:48.000Z | # allowable multiple choice node and edge features
# code from https://github.com/snap-stanford/ogb/blob/master/ogb/utils/features.py
allowable_features = {
"possible_atomic_num_list": list(range(1, 119)) + ["misc"], # type: ignore
"possible_chirality_list": [
"CHI_UNSPECIFIED",
"CHI_TETRAHEDRA... | 35.491803 | 82 | 0.590762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,017 | 0.469746 |
4e6b5fa33d845c1a9c9c556d16d04f10c237dd56 | 3,401 | py | Python | ising_model/hamiltonian.py | FeiQuantumSoftware/ising_model | 6d8b177678aa953840fc01616dc7c789d9531b93 | [
"BSD-3-Clause"
] | null | null | null | ising_model/hamiltonian.py | FeiQuantumSoftware/ising_model | 6d8b177678aa953840fc01616dc7c789d9531b93 | [
"BSD-3-Clause"
] | null | null | null | ising_model/hamiltonian.py | FeiQuantumSoftware/ising_model | 6d8b177678aa953840fc01616dc7c789d9531b93 | [
"BSD-3-Clause"
] | null | null | null | """coupling Hamiltonian class def"""
from math import exp
import numpy as np
from .spinconfig import SpinConfig
class Hamiltonian():
"""Create a class of Hamiltonian of 2-d Ising model.
Parameters
----------
J: float, optional
Coupling parameter, default J=-2 .
u: float, optional
... | 25.007353 | 91 | 0.486622 | 3,286 | 0.966186 | 0 | 0 | 0 | 0 | 0 | 0 | 1,872 | 0.550426 |
4e6b7f322b294819ab5b4b631d1bcc760d50a431 | 618 | py | Python | examples/testpetsc.py | DDMGNI/viVlasov1D | 901dd058711f6943eb6497b941bc115a64e822de | [
"MIT"
] | 2 | 2018-09-13T12:39:07.000Z | 2019-04-05T04:55:59.000Z | examples/testpetsc.py | DDMGNI/viVlasov1D | 901dd058711f6943eb6497b941bc115a64e822de | [
"MIT"
] | null | null | null | examples/testpetsc.py | DDMGNI/viVlasov1D | 901dd058711f6943eb6497b941bc115a64e822de | [
"MIT"
] | null | null | null |
import numpy as np
def temperature(x):
pass
def density(x, L):
# weak Jeans instability
# density = 1. + 0.01 * np.cos(0.8 * (x - 0.5 * L))
# strong Jeans instability
# density = 1. + 0.01 * np.cos(0.1 * (x - 0.5 * L))
# linear Landau damping
# return 1. + 0.01 * np.cos(0.5 * (x - 0.5 * L))... | 16.263158 | 62 | 0.469256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 343 | 0.555016 |
4e6dab17c24195e50268c9d3fbe8629caaa109c4 | 17,866 | py | Python | tcm-py/tcm_fabric.py | Datera/lio-utils | 0ac9091c1ff7a52d5435a4f4449e82637142e06e | [
"Apache-2.0"
] | 8 | 2015-04-02T21:44:47.000Z | 2021-07-15T08:31:28.000Z | tcm-py/tcm_fabric.py | Datera/lio-utils | 0ac9091c1ff7a52d5435a4f4449e82637142e06e | [
"Apache-2.0"
] | null | null | null | tcm-py/tcm_fabric.py | Datera/lio-utils | 0ac9091c1ff7a52d5435a4f4449e82637142e06e | [
"Apache-2.0"
] | 8 | 2015-06-18T14:30:21.000Z | 2021-03-25T19:51:03.000Z | #!/usr/bin/python
import os, sys, shutil
import subprocess as sub
import string
import re
import datetime, time
import optparse
target_root = "/sys/kernel/config/target/"
spec_root = "/var/target/fabric/"
def fabric_err(msg):
print >> sys.stderr, msg
sys.exit(1)
def fabric_configfs_dump(fabric_name, fabric_root, m... | 32.9631 | 144 | 0.640378 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,101 | 0.285514 |
4e6eb09628c21128f6237f44dd57b2bfd0a093f8 | 12,321 | py | Python | vmflib2/games/hl2mp.py | Trainzack/vmflib2 | 9bc9803b3c8c644346b5a5eb864c0deaf544d8a6 | [
"BSD-2-Clause"
] | 1 | 2021-02-11T17:52:48.000Z | 2021-02-11T17:52:48.000Z | vmflib2/games/hl2mp.py | Trainzack/vmflib2 | 9bc9803b3c8c644346b5a5eb864c0deaf544d8a6 | [
"BSD-2-Clause"
] | null | null | null | vmflib2/games/hl2mp.py | Trainzack/vmflib2 | 9bc9803b3c8c644346b5a5eb864c0deaf544d8a6 | [
"BSD-2-Clause"
] | 1 | 2021-02-12T18:56:51.000Z | 2021-02-12T18:56:51.000Z | """
Helper classes for creating maps in any Source Engine game that uses hl2mp.fgd.
This file was auto-generated by import_fgd.py on 2020-01-19 09:11:14.977620.
"""
from vmflib2.vmf import *
class FilterActivatorTeam(Entity):
"""
Auto-generated from hl2mp.fgd, line 30.
A filter that filters by the team o... | 57.306977 | 840 | 0.692152 | 12,109 | 0.982794 | 0 | 0 | 0 | 0 | 0 | 0 | 7,548 | 0.612613 |
4e6f333b107f38c8aaa09dc165be5dc797f0e6b5 | 317 | py | Python | src/constants.py | heyhpython/desktop | e75ffddf9526e8fd1adaca69c315005e202bf84b | [
"MIT"
] | null | null | null | src/constants.py | heyhpython/desktop | e75ffddf9526e8fd1adaca69c315005e202bf84b | [
"MIT"
] | null | null | null | src/constants.py | heyhpython/desktop | e75ffddf9526e8fd1adaca69c315005e202bf84b | [
"MIT"
] | null | null | null | import os
BASE_DIR = os.path.dirname(__file__)
__config__ = os.path.abspath(os.path.join(BASE_DIR, "../config.cfg"))
__template__ = os.path.abspath(os.path.join(BASE_DIR, "templates"))
__static__ = os.path.abspath(os.path.join(BASE_DIR, "static"))
__upload__ = os.path.abspath(os.path.join(__static__, "uploads"))
| 31.7 | 69 | 0.744479 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.135647 |
4e7096429698d4dbcba3e4c9717842932c8154f8 | 1,363 | py | Python | app.py | IamSilentBot/Guardzilla | 8ca9dcda2d99cba1628b708a770a34dd726acd9e | [
"MIT"
] | 1 | 2022-02-05T22:55:50.000Z | 2022-02-05T22:55:50.000Z | app.py | IamSilentBot/Guardzilla | 8ca9dcda2d99cba1628b708a770a34dd726acd9e | [
"MIT"
] | null | null | null | app.py | IamSilentBot/Guardzilla | 8ca9dcda2d99cba1628b708a770a34dd726acd9e | [
"MIT"
] | 1 | 2022-02-21T17:47:39.000Z | 2022-02-21T17:47:39.000Z | import nextcord
from nextcord.ext import commands
import json
import os
import pymongo
import os
from keep_alive import keep_alive
# Set environment variables
# os.environ['info'] = "test:pass123"
# os.environ['TOKEN'] = "MY-AWSOME-TOKEN"
intents = nextcord.Intents.all()
TOKEN = os.environ['TOKEN']
async def prefi... | 27.816327 | 117 | 0.681585 | 0 | 0 | 0 | 0 | 89 | 0.065297 | 735 | 0.539252 | 372 | 0.272927 |
4e71fbacfde29db685d3ecdd9b0c31b58a97a5ef | 1,841 | py | Python | generator/contact.py | bloodes/adressbook | 52582bc8c4825987db668ab084dff32202f1e2e5 | [
"Apache-2.0"
] | null | null | null | generator/contact.py | bloodes/adressbook | 52582bc8c4825987db668ab084dff32202f1e2e5 | [
"Apache-2.0"
] | null | null | null | generator/contact.py | bloodes/adressbook | 52582bc8c4825987db668ab084dff32202f1e2e5 | [
"Apache-2.0"
] | null | null | null | from models.model_contact import Contact
import random
import string
import os.path
import jsonpickle
import getopt
import sys
def random_string(prefix, maxlen):
symbols = string.ascii_letters + string.digits
return prefix + ''.join([random.choice(symbols) for i in range(random.randrange(maxlen))])
try:
... | 33.472727 | 96 | 0.551331 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.090168 |
4e72b83d81906c88261b3bf53646c5b537fd803e | 13,598 | py | Python | tick/array_test/tests/array_memory_test.py | sumau/tick | 1b56924a35463e12f7775bc0aec182364f26f2c6 | [
"BSD-3-Clause"
] | 411 | 2017-03-30T15:22:05.000Z | 2022-03-27T01:58:34.000Z | tick/array_test/tests/array_memory_test.py | saurabhdash/tick | bbc561804eb1fdcb4c71b9e3e2d83a66e7b13a48 | [
"BSD-3-Clause"
] | 345 | 2017-04-13T14:53:20.000Z | 2022-03-26T00:46:22.000Z | tick/array_test/tests/array_memory_test.py | saurabhdash/tick | bbc561804eb1fdcb4c71b9e3e2d83a66e7b13a48 | [
"BSD-3-Clause"
] | 102 | 2017-04-25T11:47:53.000Z | 2022-02-15T11:45:49.000Z | # License: BSD 3 clause
import gc
import unittest
import weakref
import numpy as np
import scipy
from scipy.sparse import csr_matrix
from tick.array.build.array import tick_double_sparse2d_from_file
from tick.array.build.array import tick_double_sparse2d_to_file
from tick.array_test.build import array_test as test
... | 36.652291 | 175 | 0.599941 | 13,227 | 0.972717 | 0 | 0 | 0 | 0 | 0 | 0 | 2,400 | 0.176497 |
4e73eaef843757f7ea7a8bbd35f9c54ff770774c | 6,878 | py | Python | chatbot/interact.py | VictorDebray/RoadBuddy | 9c62e2acd2d540caa0ebefc50af5446c0d4f864f | [
"MIT"
] | null | null | null | chatbot/interact.py | VictorDebray/RoadBuddy | 9c62e2acd2d540caa0ebefc50af5446c0d4f864f | [
"MIT"
] | null | null | null | chatbot/interact.py | VictorDebray/RoadBuddy | 9c62e2acd2d540caa0ebefc50af5446c0d4f864f | [
"MIT"
] | null | null | null | # Author: DINDIN Meryll
# Date: 15 September 2019
# Project: RoadBuddy
try: from chatbot.imports import *
except: from imports import *
class Contextualizer:
def __init__(self):
try:
self._load_models()
except:
drc = ['mo... | 38 | 126 | 0.604536 | 6,723 | 0.977464 | 0 | 0 | 1,410 | 0.205001 | 0 | 0 | 1,138 | 0.165455 |
4e744f117ca425c6d830404575c231f03329052e | 20,731 | py | Python | workspace/plug/maya/lynxinode/scripts/python/lxCommand/template/nodeTemplate.py | no7hings/Lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | 2 | 2018-03-06T03:33:55.000Z | 2019-03-26T03:25:11.000Z | workspace/plug/maya/lynxinode/scripts/python/lxCommand/template/nodeTemplate.py | no7hings/lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | null | null | null | workspace/plug/maya/lynxinode/scripts/python/lxCommand/template/nodeTemplate.py | no7hings/lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | null | null | null | # encoding=utf-8
import re
#
import types
# noinspection PyUnresolvedReferences
import maya.mel as mel
# noinspection PyUnresolvedReferences
import maya.cmds as cmds
#
_objectStore = {}
#
def pyToMelProc(pyObj, args=(), returnType=None, procName=None, useName=False, procPrefix='pyToMel_'):
melParams = []
pyPa... | 29.871758 | 139 | 0.589262 | 12,521 | 0.603975 | 0 | 0 | 4,106 | 0.198061 | 0 | 0 | 1,920 | 0.092615 |
4e751966b10b05f698edd3d37469d6c2ff784045 | 31 | py | Python | bubble_io/__init__.py | jasontyping/bubble-io-python | 487dd253e85814a012df4a5a5a6a08f023517641 | [
"MIT"
] | null | null | null | bubble_io/__init__.py | jasontyping/bubble-io-python | 487dd253e85814a012df4a5a5a6a08f023517641 | [
"MIT"
] | null | null | null | bubble_io/__init__.py | jasontyping/bubble-io-python | 487dd253e85814a012df4a5a5a6a08f023517641 | [
"MIT"
] | 1 | 2020-10-25T08:31:59.000Z | 2020-10-25T08:31:59.000Z | from .bubbleio import BubbleIo
| 15.5 | 30 | 0.83871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4e769aee426de55532dd683d9dd832dcae724616 | 68 | py | Python | python/pandas_pbf/core.py | ccharlesgb/pandas-pbf | 8c5b1af2c291cfd485b1296a1a5ba34ddc93d995 | [
"MIT"
] | null | null | null | python/pandas_pbf/core.py | ccharlesgb/pandas-pbf | 8c5b1af2c291cfd485b1296a1a5ba34ddc93d995 | [
"MIT"
] | null | null | null | python/pandas_pbf/core.py | ccharlesgb/pandas-pbf | 8c5b1af2c291cfd485b1296a1a5ba34ddc93d995 | [
"MIT"
] | null | null | null | import pandas as pd
def dump(df: pd.DataFrame) -> bytes:
pass
| 11.333333 | 36 | 0.661765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4e76f4bcaf6c2b3ef6bdb2c9d12ef79f80ffb1ec | 13,152 | py | Python | iceprod/server/rest/datasets.py | WIPACrepo/iceprod | 83615da9b0e764bc2498ac588cc2e2b3f5277235 | [
"MIT"
] | 2 | 2017-01-23T17:12:41.000Z | 2019-01-14T13:38:17.000Z | iceprod/server/rest/datasets.py | WIPACrepo/iceprod | 83615da9b0e764bc2498ac588cc2e2b3f5277235 | [
"MIT"
] | 242 | 2016-05-09T18:46:51.000Z | 2022-03-31T22:02:29.000Z | iceprod/server/rest/datasets.py | WIPACrepo/iceprod | 83615da9b0e764bc2498ac588cc2e2b3f5277235 | [
"MIT"
] | 2 | 2017-03-27T09:13:40.000Z | 2019-01-27T10:55:30.000Z | import logging
import json
import uuid
from collections import defaultdict
import tornado.web
import tornado.httpclient
from tornado.platform.asyncio import to_asyncio_future
import pymongo
import motor
from rest_tools.client import RestClient
from iceprod.server.rest import RESTHandler, RESTHandlerSetup, authorizati... | 34.978723 | 122 | 0.586603 | 11,256 | 0.855839 | 0 | 0 | 10,324 | 0.784976 | 9,610 | 0.730687 | 4,791 | 0.364279 |
4e79f990859c3061f129402b3a92ec843ee5ea60 | 2,938 | py | Python | backend/utils/n9e_api.py | itimor/one-ops | f1111735de252012752dfabe11598e9690c89257 | [
"MIT"
] | null | null | null | backend/utils/n9e_api.py | itimor/one-ops | f1111735de252012752dfabe11598e9690c89257 | [
"MIT"
] | 6 | 2021-03-19T10:20:05.000Z | 2021-09-22T19:30:21.000Z | backend/utils/n9e_api.py | itimor/one-ops | f1111735de252012752dfabe11598e9690c89257 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# author: itimor
import requests
import json
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
class FalconClient(object):
def __init__(self, endpoint=None, user=None, token=None, keys=[], session=None, ssl_verify=True):
self._endpoi... | 31.255319 | 112 | 0.566372 | 2,513 | 0.855344 | 0 | 0 | 0 | 0 | 0 | 0 | 421 | 0.143295 |
4e7a0f3a33cc53fa5588171ed4ecc80f2e9996b8 | 411 | py | Python | python/RASCUNHOS/criargrafico.py | raquelmachado4993/omundodanarrativagit | eb8cebcc74514ba8449fab5f9dc5e9a93a826850 | [
"MIT"
] | null | null | null | python/RASCUNHOS/criargrafico.py | raquelmachado4993/omundodanarrativagit | eb8cebcc74514ba8449fab5f9dc5e9a93a826850 | [
"MIT"
] | null | null | null | python/RASCUNHOS/criargrafico.py | raquelmachado4993/omundodanarrativagit | eb8cebcc74514ba8449fab5f9dc5e9a93a826850 | [
"MIT"
] | null | null | null | import matplotlib.pyplot
meses = ['Janeiro','Fevereiro','Marco','Abril','Maio','Junho']
valores = [105235, 107697, 110256, 109236, 108859, 109986]
matplotlib.pyplot.plot(meses, valores)
matplotlib.pyplot.title('Faturamento no primeiro semestre de 2017')
matplotlib.pyplot.xlabel('Meses')
matplotlib.pyplot.ylabel('Fatur... | 34.25 | 67 | 0.766423 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.311436 |
4e7aae2cfbb07486e48d60f16bce3de6949f6366 | 3,213 | py | Python | getHelmstedtGNDs.py | hbeyer/pcp-vd | e8b4903b4188fea5295e7709e25216f10954f23f | [
"MIT"
] | null | null | null | getHelmstedtGNDs.py | hbeyer/pcp-vd | e8b4903b4188fea5295e7709e25216f10954f23f | [
"MIT"
] | null | null | null | getHelmstedtGNDs.py | hbeyer/pcp-vd | e8b4903b4188fea5295e7709e25216f10954f23f | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import mysql.connector
mydb = mysql.connector.connect(
host = "localhost",
user = "root",
passwd = "schleichkatze",
database = "helmstedt"
)
mycursor = mydb.cursor()
mycursor.execute("SELECT id, gnd FROM helmstedt.temp_prof_kat")
myresult = mycursor.fetchall()
gnds ... | 22.787234 | 116 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,943 | 0.913124 |
4e7ab87b888bbbe2383cfa6903a948e5d52465e7 | 9,035 | py | Python | tests/test_mapexplorer.py | OCHA-DAP/hdx-scraper-mapexplorer | 3fef67376815611657657c6d53ce904b8f9e4550 | [
"MIT"
] | null | null | null | tests/test_mapexplorer.py | OCHA-DAP/hdx-scraper-mapexplorer | 3fef67376815611657657c6d53ce904b8f9e4550 | [
"MIT"
] | null | null | null | tests/test_mapexplorer.py | OCHA-DAP/hdx-scraper-mapexplorer | 3fef67376815611657657c6d53ce904b8f9e4550 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Unit tests for scrapername.
'''
import difflib
import filecmp
from datetime import datetime
from os.path import join
from tempfile import gettempdir
import pytest
from hdx.hdx_configuration import Configuration
import hdx.utilities.downloader
from hdx.utilities.compare im... | 44.727723 | 220 | 0.657554 | 8,449 | 0.935141 | 0 | 0 | 4,337 | 0.480022 | 0 | 0 | 2,761 | 0.305589 |
4e7bf6a5635ca159b39d2d3d8c59aa1c3e27375b | 255 | py | Python | configs/_base_/schedules/imagenet_bs256_140e.py | sty16/cell_transformer | fc3d8dd8363664381617c76fb016f14c704749d8 | [
"Apache-2.0"
] | 1 | 2022-03-15T07:36:04.000Z | 2022-03-15T07:36:04.000Z | configs/_base_/schedules/imagenet_bs256_140e.py | sty16/cell_transformer | fc3d8dd8363664381617c76fb016f14c704749d8 | [
"Apache-2.0"
] | null | null | null | configs/_base_/schedules/imagenet_bs256_140e.py | sty16/cell_transformer | fc3d8dd8363664381617c76fb016f14c704749d8 | [
"Apache-2.0"
] | null | null | null | # optimizer
optimizer = dict(type='SGD', lr=0.001, momentum=0.9, weight_decay=0.001)
optimizer_config = dict(grad_clip=None)
# learning policy
lr_config = dict(policy='step', step=[40, 70, 90])
runner = dict(type='EpochBasedRunner', max_epochs=100)
| 36.428571 | 73 | 0.721569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.231373 |
4e81b7168137c8ead27ea61e73b96364b565fc1e | 708 | py | Python | 2016/day_06.py | nabiirah/advent-of-code | 9c7e7cae437c024aa05d9cb7f9211fd47f5226a2 | [
"MIT"
] | 24 | 2020-12-08T20:07:52.000Z | 2022-01-18T20:08:06.000Z | 2016/day_06.py | nestorhf/advent-of-code | 1bb827e9ea85e03e0720e339d10b3ed8c44d8f27 | [
"MIT"
] | null | null | null | 2016/day_06.py | nestorhf/advent-of-code | 1bb827e9ea85e03e0720e339d10b3ed8c44d8f27 | [
"MIT"
] | 10 | 2020-12-04T10:04:15.000Z | 2022-02-21T22:22:26.000Z | """ Advent of Code Day 6 - Signals and Noise"""
with open('inputs/day_06.txt', 'r') as f:
rows = [row.strip() for row in f.readlines()]
flipped = zip(*rows)
message = ''
mod_message = ''
for chars in flipped:
most_freq = ''
least_freq = ''
highest = 0
lowest = 100
for char in chars:
... | 22.83871 | 51 | 0.601695 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.220339 |
4e83689fcdf6c1f0b2f2c351aa1c6fe2dad28771 | 1,846 | py | Python | tasks.py | chmp/misc-exp | 2edc2ed598eb59f4ccb426e7a5c1a23343a6974b | [
"MIT"
] | 6 | 2017-10-31T20:54:37.000Z | 2020-10-23T19:03:00.000Z | tasks.py | chmp/misc-exp | 2edc2ed598eb59f4ccb426e7a5c1a23343a6974b | [
"MIT"
] | 7 | 2020-03-24T16:14:34.000Z | 2021-03-18T20:51:37.000Z | tasks.py | chmp/misc-exp | 2edc2ed598eb59f4ccb426e7a5c1a23343a6974b | [
"MIT"
] | 1 | 2019-07-29T07:55:49.000Z | 2019-07-29T07:55:49.000Z | import hashlib
import json
import os
import pathlib
import shlex
import nbformat
from invoke import task
files_to_format = ["chmp/src", "tasks.py", "chmp/setup.py"]
inventories = [
"http://daft-pgm.org",
"https://matplotlib.org",
"http://www.numpy.org",
"https://pandas.pydata.org",
"https://docs.... | 20.511111 | 84 | 0.566089 | 0 | 0 | 0 | 0 | 1,240 | 0.671723 | 0 | 0 | 502 | 0.271939 |
4e83cc92299ecc7a687b5a70cfeda857351d4ef2 | 1,016 | py | Python | WeChat/translation.py | satoukiCk/SummerRobot | a22b17fb1927dcc1aa7316e2b892f7daee484583 | [
"MIT"
] | null | null | null | WeChat/translation.py | satoukiCk/SummerRobot | a22b17fb1927dcc1aa7316e2b892f7daee484583 | [
"MIT"
] | null | null | null | WeChat/translation.py | satoukiCk/SummerRobot | a22b17fb1927dcc1aa7316e2b892f7daee484583 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
import requests
import json
import random
import hashlib
KEY = ''
APPID = ''
API = 'http://api.fanyi.baidu.com/api/trans/vip/translate'
class translation():
def __init__(self,src, fromlang, tolang):
self.src = src
self.fromlang = fromlang
self.tolang = tolang
de... | 25.4 | 81 | 0.541339 | 868 | 0.842718 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.18932 |
4e85a767dc1a77745686895d8e0fa92531e23594 | 210 | py | Python | bolinette/defaults/__init__.py | bolinette/bolinette | b35a7d828c7d9617da6a8d7ac066e3b675a65252 | [
"MIT"
] | 4 | 2020-11-02T15:16:32.000Z | 2022-01-11T11:19:24.000Z | bolinette/defaults/__init__.py | bolinette/bolinette | b35a7d828c7d9617da6a8d7ac066e3b675a65252 | [
"MIT"
] | 14 | 2021-01-04T11:06:59.000Z | 2022-03-23T17:01:49.000Z | bolinette/defaults/__init__.py | bolinette/bolinette | b35a7d828c7d9617da6a8d7ac066e3b675a65252 | [
"MIT"
] | null | null | null | import bolinette.defaults.models
import bolinette.defaults.mixins
import bolinette.defaults.services
import bolinette.defaults.middlewares
import bolinette.defaults.controllers
import bolinette.defaults.topics
| 30 | 37 | 0.885714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4e864e061007124f810efb595fdd8cc9331ec714 | 2,040 | py | Python | kicost/currency_converter/currency_converter.py | mdeweerd/KiCost | 2f67dad0f8d3335590835a6790181fc6428086d5 | [
"MIT"
] | null | null | null | kicost/currency_converter/currency_converter.py | mdeweerd/KiCost | 2f67dad0f8d3335590835a6790181fc6428086d5 | [
"MIT"
] | null | null | null | kicost/currency_converter/currency_converter.py | mdeweerd/KiCost | 2f67dad0f8d3335590835a6790181fc6428086d5 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Salvador E. Tropea
# Copyright (c) 2021 Instituto Nacional de Tecnología Industrial
# License: Apache 2.0
# Project: KiCost
# Adapted from: https://github.com/alexprengere/currencyconverter
"""
CurrencyConverter:
This is reduced version of the 'Currency Co... | 30.447761 | 77 | 0.666667 | 1,115 | 0.546033 | 0 | 0 | 0 | 0 | 0 | 0 | 1,140 | 0.558276 |
4e893aecc42c83f372f87792977e579561f4f1e5 | 385 | py | Python | apps/vector.py | HayesAJ83/LeafMapAppTest | 5da65d5c1958f47934453124a72ec800c0ce6a93 | [
"MIT"
] | 22 | 2021-08-10T05:11:47.000Z | 2022-02-27T14:35:30.000Z | apps/vector.py | HayesAJ83/LeafMapAppTest | 5da65d5c1958f47934453124a72ec800c0ce6a93 | [
"MIT"
] | null | null | null | apps/vector.py | HayesAJ83/LeafMapAppTest | 5da65d5c1958f47934453124a72ec800c0ce6a93 | [
"MIT"
] | 8 | 2021-10-04T13:10:32.000Z | 2021-11-17T12:32:57.000Z | import streamlit as st
import leafmap
def app():
st.title("Add vector datasets")
url = "https://raw.githubusercontent.com/giswqs/data/main/world/world_cities.csv"
in_csv = st.text_input("Enter a URL to a vector file", url)
m = leafmap.Map()
if in_csv:
m.add_xy_data(in_csv, x="longitude"... | 22.647059 | 85 | 0.675325 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.418182 |
4e89a4bc599fa5786586aa1889dcbfc722b2e1e8 | 1,225 | py | Python | Book_Ladder/web/test.py | Rdjroot/BookLadder | d4e1f90572f2dda2e7c25890b99c965ded0f02c8 | [
"MIT"
] | null | null | null | Book_Ladder/web/test.py | Rdjroot/BookLadder | d4e1f90572f2dda2e7c25890b99c965ded0f02c8 | [
"MIT"
] | null | null | null | Book_Ladder/web/test.py | Rdjroot/BookLadder | d4e1f90572f2dda2e7c25890b99c965ded0f02c8 | [
"MIT"
] | null | null | null | # -*- coding = utf-8 -*-
# @Time:2021/3/1417:56
# @Author:Linyu
# @Software:PyCharm
from web.pageutils import BooksScore
from web.pageutils import BooksCount
from web.pageutils import pointsDraw
from web.pageutils import scoreRelise
from web.pageutils import messBarInfo
from web.pageutils import tagRader
from web.mod... | 24.5 | 93 | 0.719184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 752 | 0.596352 |
4e8e84d17eb6d1c3fde6f5fcc279f8f8f53c1518 | 2,252 | py | Python | news/spiders/bbc.py | azzuwan/ScraperExample | 6de382df0b20414f2a55b70837b5fd41d76e8712 | [
"MIT"
] | null | null | null | news/spiders/bbc.py | azzuwan/ScraperExample | 6de382df0b20414f2a55b70837b5fd41d76e8712 | [
"MIT"
] | null | null | null | news/spiders/bbc.py | azzuwan/ScraperExample | 6de382df0b20414f2a55b70837b5fd41d76e8712 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
from readability import Document
import datetime
from pprint import pprint
class Articles(scrapy.Item):
url = scrapy.Field()
title = scrapy.Field()
author = scrapy.Field()
... | 29.246753 | 96 | 0.572824 | 2,042 | 0.90675 | 0 | 0 | 0 | 0 | 0 | 0 | 690 | 0.306394 |
4e8fedac1be1849239d5c90fd7ed2234086dcfe6 | 698 | py | Python | profiles/models.py | ev-agelos/acr-server | dba11b001ae4aae6dcbb761a5c0222c6fb3b939d | [
"MIT"
] | 1 | 2021-03-11T04:25:07.000Z | 2021-03-11T04:25:07.000Z | profiles/models.py | ev-agelos/acr-server | dba11b001ae4aae6dcbb761a5c0222c6fb3b939d | [
"MIT"
] | 7 | 2020-03-06T17:37:01.000Z | 2021-09-22T17:40:10.000Z | profiles/models.py | ev-agelos/ac-rank | dba11b001ae4aae6dcbb761a5c0222c6fb3b939d | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django_countries.fields import CountryField
class Profile(models.Model):
"""Extend user model with a country field."""
user = models.OneToOneField(... | 29.083333 | 70 | 0.767908 | 214 | 0.30659 | 0 | 0 | 269 | 0.385387 | 0 | 0 | 63 | 0.090258 |
4e90e63aeba9851ed0445a458eb6eb560cabb51f | 5,684 | py | Python | tests/unit/test_command.py | shintaii/flower | fdeb135ddb3718404c0f1e9cca73fc45181f611a | [
"BSD-3-Clause"
] | 4,474 | 2015-01-01T18:34:36.000Z | 2022-03-29T06:02:38.000Z | tests/unit/test_command.py | shintaii/flower | fdeb135ddb3718404c0f1e9cca73fc45181f611a | [
"BSD-3-Clause"
] | 835 | 2015-01-06T21:29:48.000Z | 2022-03-31T04:35:10.000Z | tests/unit/test_command.py | shintaii/flower | fdeb135ddb3718404c0f1e9cca73fc45181f611a | [
"BSD-3-Clause"
] | 980 | 2015-01-02T21:41:28.000Z | 2022-03-31T08:30:52.000Z | import os
import sys
import tempfile
import unittest
import subprocess
from unittest.mock import Mock, patch
import mock
from prometheus_client import Histogram
from flower.command import apply_options, warn_about_celery_args_used_in_flower_command, apply_env_options
from tornado.options import options
from tests.uni... | 39.748252 | 106 | 0.645144 | 5,328 | 0.937368 | 0 | 0 | 1,989 | 0.34993 | 0 | 0 | 1,236 | 0.217452 |
4e91557146c36922257c5f4c9ff456b0ce8b407c | 534 | py | Python | Trojan.py | alrocks29/alpha-backdoor | 16a2d0ffdb183005f687bdf19b25cc918a1f12a0 | [
"MIT"
] | null | null | null | Trojan.py | alrocks29/alpha-backdoor | 16a2d0ffdb183005f687bdf19b25cc918a1f12a0 | [
"MIT"
] | null | null | null | Trojan.py | alrocks29/alpha-backdoor | 16a2d0ffdb183005f687bdf19b25cc918a1f12a0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import requests
import subprocess
import os
import tempfile
def download(url):
get_response = requests.get(url)
file_name = url.split("/")[-1]
with open(file_name, "wb") as out_file:
out_file.write(get_response.content)
temp_directory = tempfile.gettempdir()
os.chdir(temp_d... | 21.36 | 44 | 0.724719 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.230337 |
4e91fe4c0f8f01c97da338f53c30caedc69665c2 | 3,524 | py | Python | Assignments/Assignment_1/Q1/task1.py | Kaustubh1Verma/CS671_Deep-Learning_2019 | 062002a1369dc962feb52d3c9561a3f1153e0f84 | [
"MIT"
] | null | null | null | Assignments/Assignment_1/Q1/task1.py | Kaustubh1Verma/CS671_Deep-Learning_2019 | 062002a1369dc962feb52d3c9561a3f1153e0f84 | [
"MIT"
] | null | null | null | Assignments/Assignment_1/Q1/task1.py | Kaustubh1Verma/CS671_Deep-Learning_2019 | 062002a1369dc962feb52d3c9561a3f1153e0f84 | [
"MIT"
] | 1 | 2019-06-12T14:02:33.000Z | 2019-06-12T14:02:33.000Z | import numpy as np
import cv2
import math
import random
import os
from tempfile import TemporaryFile
from sklearn.model_selection import train_test_split
# Creating classes.
length=[7,15]
width=[1,3]
col=[]
col.append([0,0,255]) #Blue
col.append([255,0,0]) #Red
interval=15
angles=[]
x=0
while x<180:
angles.append(x... | 32.036364 | 126 | 0.653235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,186 | 0.336549 |
4e92e1a84cbde5bdb7f5c55409d43bffcb5d668d | 17,703 | py | Python | octopus_deploy_swagger_client/models/user_role_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | octopus_deploy_swagger_client/models/user_role_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | octopus_deploy_swagger_client/models/user_role_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Octopus Server API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
Generated by: https://github.com/swagger-api... | 42.555288 | 2,033 | 0.673106 | 17,303 | 0.977405 | 0 | 0 | 12,071 | 0.681862 | 0 | 0 | 10,081 | 0.569452 |
4e949a6f4b8f9d86c879098cae8dde8d91b75f85 | 10,163 | py | Python | helpers.py | jchanke/mixtape50 | 68d03034b503fd0374b9fcba1c1d5207ed7f0170 | [
"MIT"
] | 1 | 2022-03-15T11:49:54.000Z | 2022-03-15T11:49:54.000Z | helpers.py | jchanke/mixtape50 | 68d03034b503fd0374b9fcba1c1d5207ed7f0170 | [
"MIT"
] | null | null | null | helpers.py | jchanke/mixtape50 | 68d03034b503fd0374b9fcba1c1d5207ed7f0170 | [
"MIT"
] | null | null | null | """
Does the legwork of searching for matching tracks.
Contains:
(1) Search functions:
- search_message
- search_spotipy
- search_db
- search_lookup
(2) String parsers (to clean title name):
- clean_title
- remove_punctuation
(3) Creates new Spotify playlist.
- create_playlist
"""
from typing import Any, Lis... | 34.686007 | 168 | 0.630326 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,194 | 0.510066 |
4e96757c37df00a4561207275579e02e7d774aeb | 3,836 | py | Python | molly/routing/providers/cyclestreets.py | mollyproject/mollyproject | 3247c6bac3f39ce8d275d19aa410b30c6284b8a7 | [
"Apache-2.0"
] | 7 | 2015-05-16T13:27:21.000Z | 2019-08-06T11:09:24.000Z | molly/routing/providers/cyclestreets.py | mollyproject/mollyproject | 3247c6bac3f39ce8d275d19aa410b30c6284b8a7 | [
"Apache-2.0"
] | null | null | null | molly/routing/providers/cyclestreets.py | mollyproject/mollyproject | 3247c6bac3f39ce8d275d19aa410b30c6284b8a7 | [
"Apache-2.0"
] | 4 | 2015-11-27T13:36:36.000Z | 2021-03-09T17:55:53.000Z | from urllib import urlencode
from urllib2 import urlopen
import simplejson
from django.conf import settings
from django.contrib.gis.geos import Point, LineString
from django.utils.text import capfirst
from django.utils.translation import ugettext as _
from molly.apps.places.models import bearing_to_compass
from molly... | 40.808511 | 116 | 0.569343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,800 | 0.469239 |
4e99de297b6c41fb361b034e5f59be29d6569791 | 316 | py | Python | exercises/exc_G1.py | dataXcode/IPP | c9b94ad2d7dc14b01e6657a4fa555507bbc7e93b | [
"MIT"
] | null | null | null | exercises/exc_G1.py | dataXcode/IPP | c9b94ad2d7dc14b01e6657a4fa555507bbc7e93b | [
"MIT"
] | null | null | null | exercises/exc_G1.py | dataXcode/IPP | c9b94ad2d7dc14b01e6657a4fa555507bbc7e93b | [
"MIT"
] | null | null | null | num_list = [10,50,30,12,6,8,100]
def max_min_first_last(nlist):
____________________ # Maximum number
____________________ # Minimum number
____________________ # First number
____________________ # Last number
return _____________________________________
print( max_min_first_last(num_list) )
| 28.727273 | 48 | 0.78481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.186709 |
4e9c35d7a10e21f257f971c50e260fb397455462 | 5,829 | py | Python | web/impact/impact/tests/api_test_case.py | masschallenge/impact-api | 81075ced8fcc95de9390dd83c15e523e67fc48c0 | [
"MIT"
] | 5 | 2017-10-19T15:11:52.000Z | 2020-03-08T07:16:21.000Z | web/impact/impact/tests/api_test_case.py | masschallenge/impact-api | 81075ced8fcc95de9390dd83c15e523e67fc48c0 | [
"MIT"
] | 182 | 2017-06-21T19:32:13.000Z | 2021-03-22T13:38:16.000Z | web/impact/impact/tests/api_test_case.py | masschallenge/impact-api | 81075ced8fcc95de9390dd83c15e523e67fc48c0 | [
"MIT"
] | 1 | 2018-06-23T11:53:18.000Z | 2018-06-23T11:53:18.000Z | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
import json
from oauth2_provider.models import get_application_model
from rest_framework.test import APIClient
from test_plus.test import TestCase
from django.core import mail
from django.conf import settings
from django.contrib.auth.models import Group
from djan... | 36.892405 | 79 | 0.621891 | 4,906 | 0.841654 | 0 | 0 | 220 | 0.037742 | 0 | 0 | 908 | 0.155773 |
4e9d488202a407ec4de3fade6bfb2e435ba6bb6b | 607 | py | Python | pydis_site/apps/api/models/bot/aoc_link.py | Robin5605/site | 81aa42aa748cb228d7a09e6cf6b211484b654496 | [
"MIT"
] | 13 | 2018-02-03T22:57:41.000Z | 2018-05-17T07:38:36.000Z | pydis_site/apps/api/models/bot/aoc_link.py | Robin5605/site | 81aa42aa748cb228d7a09e6cf6b211484b654496 | [
"MIT"
] | 61 | 2018-02-07T21:34:39.000Z | 2018-06-05T16:15:28.000Z | pydis_site/apps/api/models/bot/aoc_link.py | Robin5605/site | 81aa42aa748cb228d7a09e6cf6b211484b654496 | [
"MIT"
] | 16 | 2018-02-03T12:37:48.000Z | 2018-06-02T17:14:55.000Z | from django.db import models
from pydis_site.apps.api.models.bot.user import User
from pydis_site.apps.api.models.mixins import ModelReprMixin
class AocAccountLink(ModelReprMixin, models.Model):
"""An AoC account link for a Discord User."""
user = models.OneToOneField(
User,
on_delete=models... | 27.590909 | 85 | 0.698517 | 460 | 0.757825 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.268534 |
4e9e6122ed3109b35f3efe158b363d95df381cc6 | 10,892 | py | Python | server/tree_pickler.py | michaelpeterswa/CPSC322Project-WildfireAnalysis | 872727e8c59619fcfc11aaa70367762271207dbd | [
"MIT"
] | null | null | null | server/tree_pickler.py | michaelpeterswa/CPSC322Project-WildfireAnalysis | 872727e8c59619fcfc11aaa70367762271207dbd | [
"MIT"
] | null | null | null | server/tree_pickler.py | michaelpeterswa/CPSC322Project-WildfireAnalysis | 872727e8c59619fcfc11aaa70367762271207dbd | [
"MIT"
] | 1 | 2021-04-16T21:21:25.000Z | 2021-04-16T21:21:25.000Z | import pickle
best_trees = [
{'accuracy': 0.36416184971098264, 'tree':
['Attribute', 'att1',
['Value', 'Pend Oreille',
['Leaf', 2.0, 0, 69]
],
['Value', 'Okanogan',
['Leaf', 3.0, 0, 314]
],
['Value... | 495.090909 | 10,287 | 0.484209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,421 | 0.497705 |
4e9e7a69ae46de63cdefe46d785a1f6e94dac1e1 | 624 | py | Python | parse.py | Mimori256/kdb-parse | 45f7aca85fea9a7db612da86e9c31daaec52a580 | [
"MIT"
] | 3 | 2021-06-20T04:35:05.000Z | 2021-10-05T06:30:09.000Z | parse.py | Mimori256/kdb-parse | 45f7aca85fea9a7db612da86e9c31daaec52a580 | [
"MIT"
] | 2 | 2021-06-13T01:19:12.000Z | 2022-03-23T04:27:05.000Z | parse.py | Mimori256/kdb-parse | 45f7aca85fea9a7db612da86e9c31daaec52a580 | [
"MIT"
] | null | null | null | import json
#Parse csv to kdb.json
with open("kdb.csv", "r", encoding="utf_8") as f:
l=[]
lines = f.readlines()
# remove the header
lines.pop(0)
for line in lines:
tmp1 = line.split('"')
if tmp1[15] == "":
tmp1[15] = " "
if not "" in set([tmp1[1], tmp1[3], tmp... | 20.8 | 85 | 0.540064 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.149038 |
4e9e92e9363d4d32c2609f2f36539abe9b27e294 | 2,600 | py | Python | DLFrameWork/dataset/CIFAR_10.py | Mostafa-ashraf19/TourchPIP | a5090a0ec9cc81a91fe1fd6af41d77841361cec1 | [
"MIT"
] | null | null | null | DLFrameWork/dataset/CIFAR_10.py | Mostafa-ashraf19/TourchPIP | a5090a0ec9cc81a91fe1fd6af41d77841361cec1 | [
"MIT"
] | null | null | null | DLFrameWork/dataset/CIFAR_10.py | Mostafa-ashraf19/TourchPIP | a5090a0ec9cc81a91fe1fd6af41d77841361cec1 | [
"MIT"
] | null | null | null | import os
import shutil
import tarfile
import urllib.request
import pandas as pd
CIFAR10_URL = 'https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz'
class CIFAR_10:
def __init__(self, path, download=True, train=True):
self.path = path
self.download = download
self.train = train
... | 40.625 | 115 | 0.575385 | 2,440 | 0.938462 | 0 | 0 | 0 | 0 | 0 | 0 | 522 | 0.200769 |
4ea10581f2a6479a2145424512ce3b01dbcd78d5 | 367 | py | Python | Python_Codes_for_BJ/stage12 큐 사용하기/프린터 큐.py | ch96an/BaekJoonSolution | 25594fda5ba1c0c4d26ff0828ec8dcf2f6572d33 | [
"MIT"
] | null | null | null | Python_Codes_for_BJ/stage12 큐 사용하기/프린터 큐.py | ch96an/BaekJoonSolution | 25594fda5ba1c0c4d26ff0828ec8dcf2f6572d33 | [
"MIT"
] | null | null | null | Python_Codes_for_BJ/stage12 큐 사용하기/프린터 큐.py | ch96an/BaekJoonSolution | 25594fda5ba1c0c4d26ff0828ec8dcf2f6572d33 | [
"MIT"
] | null | null | null | def printer(n,k,order):
lst = [(order[x],False if x==k else True) for x in range(len(order))]
flag, i = True, 0
while flag:
if lst[0][0] == max(lst,key=lambda x:x[0])[0]:
flag = lst.pop(0)[1]
i +=1
else:
lst.append(lst.pop(0))
print(i)
for _ in range(int(input())):
n,k=map(int,input().split())
lst=l... | 24.466667 | 70 | 0.59673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4ea295d60036c358d4e3b22a59c7d5d5aba282d3 | 4,119 | py | Python | grpc/clients/python/vegaapiclient/generated/commands/v1/oracles_pb2.py | ConnorChristie/api | 7e585d47bad1a5ef95ca932045b0ce70962b029a | [
"MIT"
] | 6 | 2021-05-20T15:30:46.000Z | 2022-02-22T12:06:39.000Z | grpc/clients/python/vegaapiclient/generated/commands/v1/oracles_pb2.py | ConnorChristie/api | 7e585d47bad1a5ef95ca932045b0ce70962b029a | [
"MIT"
] | 29 | 2021-03-16T11:58:05.000Z | 2021-10-05T14:04:45.000Z | grpc/clients/python/vegaapiclient/generated/commands/v1/oracles_pb2.py | ConnorChristie/api | 7e585d47bad1a5ef95ca932045b0ce70962b029a | [
"MIT"
] | 6 | 2021-05-07T06:43:02.000Z | 2022-03-29T07:18:01.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: commands/v1/oracles.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from go... | 38.495327 | 480 | 0.786113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,325 | 0.32168 |
4ea392c525c167ab6e4487bc47072399df2ebdf7 | 2,788 | py | Python | non-regression-tests/config.py | etalab-ia/piaf-ml | cd006b905d4c3e6a358326a42b84179724b00e5f | [
"MIT"
] | 5 | 2021-06-22T08:51:53.000Z | 2021-12-14T17:26:32.000Z | non-regression-tests/config.py | etalab-ia/piaf-ml | cd006b905d4c3e6a358326a42b84179724b00e5f | [
"MIT"
] | 55 | 2021-06-16T07:58:16.000Z | 2021-08-30T10:30:26.000Z | non-regression-tests/config.py | etalab-ia/piaf-ml | cd006b905d4c3e6a358326a42b84179724b00e5f | [
"MIT"
] | null | null | null | import os
parameter_tuning_options = {
"experiment_name": "non-regression-tests",
# Tuning method alternatives:
# - "optimization": use bayesian optimisation
# - "grid_search"
"tuning_method": "grid_search",
# Additionnal options for the grid search method
"use_cache": False,
# Addit... | 35.74359 | 97 | 0.681133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,895 | 0.679699 |
4ea47fc79c5dcbec42ef206e57f938c9dff9b024 | 2,101 | py | Python | zhang.py | AndrewQuijano/Treespace_REU_2017 | e1aff2224ad5152d82f529675444146a70623bca | [
"MIT"
] | 2 | 2021-06-07T12:22:46.000Z | 2021-09-14T00:19:03.000Z | zhang.py | AndrewQuijano/Treespace_REU_2017 | e1aff2224ad5152d82f529675444146a70623bca | [
"MIT"
] | null | null | null | zhang.py | AndrewQuijano/Treespace_REU_2017 | e1aff2224ad5152d82f529675444146a70623bca | [
"MIT"
] | null | null | null | import networkx as nx
from misc import maximum_matching_all
from networkx import get_node_attributes
def is_tree_based(graph):
if is_binary(graph):
# print("Graph is not binary! Zhang's won't work!")
return None
unmatched_reticulation = zhang_graph(graph)
if len(unmatched_reticulation) == ... | 32.828125 | 86 | 0.595907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 249 | 0.118515 |
4ea5498deec294ffeeebf2d2ad50bbf782de71a8 | 141 | py | Python | esteid/idcard/__init__.py | thorgate/django-esteid | 4a4227b20dca7db5441a3514f724f1404575562c | [
"BSD-3-Clause"
] | 17 | 2016-03-30T09:20:19.000Z | 2022-01-17T12:04:03.000Z | esteid/idcard/__init__.py | thorgate/django-esteid | 4a4227b20dca7db5441a3514f724f1404575562c | [
"BSD-3-Clause"
] | 15 | 2016-02-22T22:49:07.000Z | 2021-11-09T12:29:35.000Z | esteid/idcard/__init__.py | thorgate/django-esteid | 4a4227b20dca7db5441a3514f724f1404575562c | [
"BSD-3-Clause"
] | 2 | 2016-07-27T10:57:52.000Z | 2017-10-05T13:15:59.000Z | __all__ = ["BaseIdCardAuthenticationView", "IdCardSigner"]
from .signer import IdCardSigner
from .views import BaseIdCardAuthenticationView
| 28.2 | 58 | 0.836879 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.312057 |
4eaa032d7c85557301f7b3de83a688e4d6c318a3 | 101 | py | Python | placeable_interface.py | Alex92rus/funkyBlue | 747fdbfc72edd85556465204f0f654a5cac32c2a | [
"MIT"
] | 2 | 2020-03-07T19:46:52.000Z | 2020-03-08T09:11:02.000Z | placeable_interface.py | Alex92rus/funkyBlue | 747fdbfc72edd85556465204f0f654a5cac32c2a | [
"MIT"
] | 3 | 2020-03-07T10:09:31.000Z | 2021-01-14T08:40:27.000Z | placeable_interface.py | Alex92rus/funkyBlue | 747fdbfc72edd85556465204f0f654a5cac32c2a | [
"MIT"
] | null | null | null |
from arcade import Sprite
class PlaceableInterface:
def place(self, *args):
pass
| 7.769231 | 27 | 0.643564 | 67 | 0.663366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4eaa0630211dc9678f367337b57ebf1618235962 | 3,765 | py | Python | sme_financing/main/apis/document_api.py | BuildForSDG/team-214-backend | f1aff9c27d7b7588b4bbb2bc68956b35051d4506 | [
"MIT"
] | 1 | 2020-05-20T16:32:33.000Z | 2020-05-20T16:32:33.000Z | sme_financing/main/apis/document_api.py | BuildForSDG/team-214-backend | f1aff9c27d7b7588b4bbb2bc68956b35051d4506 | [
"MIT"
] | 23 | 2020-05-19T07:12:53.000Z | 2020-06-21T03:57:54.000Z | sme_financing/main/apis/document_api.py | BuildForSDG/team-214-backend | f1aff9c27d7b7588b4bbb2bc68956b35051d4506 | [
"MIT"
] | 1 | 2020-05-18T14:18:12.000Z | 2020-05-18T14:18:12.000Z | """RESTful API Document resource."""
from flask_restx import Resource, reqparse
from flask_restx._http import HTTPStatus
from werkzeug.datastructures import FileStorage
from ..service.document_service import (
delete_document,
edit_document,
get_all_documents,
get_document,
save_document,
)
from .... | 35.186916 | 86 | 0.657371 | 2,482 | 0.65923 | 0 | 0 | 2,715 | 0.721116 | 0 | 0 | 1,191 | 0.316335 |
4eaadef4bc857f47d228828cdfd23ca47dfe5099 | 1,405 | py | Python | column_name_renaming.py | strathclyde-rse/strathclyde-software-survey | 1dd3805a416f1da6cbfa27958ae96a5ad685fe19 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | null | null | null | column_name_renaming.py | strathclyde-rse/strathclyde-software-survey | 1dd3805a416f1da6cbfa27958ae96a5ad685fe19 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | null | null | null | column_name_renaming.py | strathclyde-rse/strathclyde-software-survey | 1dd3805a416f1da6cbfa27958ae96a5ad685fe19 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
col_shortener = {
'Q1':'confirm',
'Q2':'faculty',
'Q3':'department',
'Q4':'funders',
'Q5':'position',
'Q6':'use_software',
'Q7':'importance_software',
'Q8':'develop_own_code',
'Q9':'development_expertise',
'Q10':'sufficient_training',
... | 19.788732 | 39 | 0.635587 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 942 | 0.670463 |
4eae8bae94764d3c5a64b90797dd929834fa6067 | 1,974 | py | Python | scanpy/tests/test_scaling.py | alexcwsmith/scanpy | b69015e9e7007193c9ac461d5c6fbf845b3d6962 | [
"BSD-3-Clause"
] | 1,171 | 2017-01-17T14:01:02.000Z | 2022-03-31T23:02:57.000Z | scanpy/tests/test_scaling.py | alexcwsmith/scanpy | b69015e9e7007193c9ac461d5c6fbf845b3d6962 | [
"BSD-3-Clause"
] | 1,946 | 2017-01-22T10:19:04.000Z | 2022-03-31T17:13:03.000Z | scanpy/tests/test_scaling.py | alexcwsmith/scanpy | b69015e9e7007193c9ac461d5c6fbf845b3d6962 | [
"BSD-3-Clause"
] | 499 | 2017-01-21T11:39:29.000Z | 2022-03-23T13:57:35.000Z | import pytest
import numpy as np
from anndata import AnnData
from scipy.sparse import csr_matrix
import scanpy as sc
# test "data" for 3 cells * 4 genes
X = [
[-1, 2, 0, 0],
[1, 2, 4, 0],
[0, 2, 2, 0],
] # with gene std 1,0,2,0 and center 0,2,2,0
X_scaled = [
[-1, 2, 0, 0],
[1, 2, 2, 0],
[0, ... | 35.890909 | 81 | 0.662614 | 0 | 0 | 0 | 0 | 1,478 | 0.748734 | 0 | 0 | 573 | 0.290274 |
4eae8be82d67b6164b7865425e58eaf76d1e1eba | 7,810 | py | Python | wsireg/tmpSaves/demo_self6_complete unit.py | luweishuang/wsireg | 344af8585932e3e0f5df3ce40a7dc75846a0214b | [
"MIT"
] | null | null | null | wsireg/tmpSaves/demo_self6_complete unit.py | luweishuang/wsireg | 344af8585932e3e0f5df3ce40a7dc75846a0214b | [
"MIT"
] | null | null | null | wsireg/tmpSaves/demo_self6_complete unit.py | luweishuang/wsireg | 344af8585932e3e0f5df3ce40a7dc75846a0214b | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import bilinear
import patchreg
from skimage.util import view_as_windows
def bilinear_interpolation_of_patch_registration(master_srcdata, target_srcdata):
print("Beginning bilinear_interpolation_of_patch_registration...")
w_shape = (1000, 1000, 4) # window_size
w_step = (5... | 43.631285 | 131 | 0.705634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,175 | 0.149605 |
4eaf9ec2243bbc0b3558c08de925bc43b8365f96 | 1,253 | py | Python | src/sprites/weapon_vfx.py | mgear2/undervoid | 6c91a5786d29d766223831190952fd90ddc6a1e8 | [
"MIT"
] | 1 | 2020-08-29T06:41:03.000Z | 2020-08-29T06:41:03.000Z | src/sprites/weapon_vfx.py | mgear2/undervoid | 6c91a5786d29d766223831190952fd90ddc6a1e8 | [
"MIT"
] | 10 | 2019-07-15T05:15:38.000Z | 2020-11-25T03:14:03.000Z | src/sprites/weapon_vfx.py | mgear2/undervoid | 6c91a5786d29d766223831190952fd90ddc6a1e8 | [
"MIT"
] | 1 | 2020-11-22T08:25:26.000Z | 2020-11-22T08:25:26.000Z | # Copyright (c) 2020
# [This program is licensed under the "MIT License"]
# Please see the file LICENSE in the source
# distribution of this software for license terms.
import pygame as pg
import ruamel.yaml
from random import choice
vec = pg.math.Vector2
class Weapon_VFX(pg.sprite.Sprite):
"""
Weapon_VFX a... | 27.23913 | 59 | 0.60016 | 992 | 0.7917 | 0 | 0 | 0 | 0 | 0 | 0 | 368 | 0.293695 |
4eafa55a23b75bd6783941216b9d9087a84c8b15 | 9,860 | py | Python | game/blenderpanda/pman.py | Moguri/prototype-nitrogen | 607f78219fcfbd55dfcd1611684107a2922f635d | [
"Apache-2.0"
] | 1 | 2017-05-29T23:03:13.000Z | 2017-05-29T23:03:13.000Z | game/blenderpanda/pman.py | Moguri/prototype-nitrogen | 607f78219fcfbd55dfcd1611684107a2922f635d | [
"Apache-2.0"
] | null | null | null | game/blenderpanda/pman.py | Moguri/prototype-nitrogen | 607f78219fcfbd55dfcd1611684107a2922f635d | [
"Apache-2.0"
] | null | null | null | import fnmatch
import os
import shutil
import subprocess
import sys
import time
from collections import OrderedDict
try:
import configparser
except ImportError:
import ConfigParser as configparser
class PManException(Exception):
pass
class NoConfigError(PManException):
pass
class CouldNotFindPytho... | 27.853107 | 131 | 0.600406 | 334 | 0.033874 | 0 | 0 | 0 | 0 | 0 | 0 | 2,141 | 0.21714 |
4eb07bf2ab74b26ed4d8db65e2b44e12fd9bf220 | 1,326 | py | Python | src/createGraph.py | AJMFactsheets/NetworkSpeedGrapher | 86e755e8831ab22394719520713d4949ed3d018e | [
"Apache-2.0"
] | null | null | null | src/createGraph.py | AJMFactsheets/NetworkSpeedGrapher | 86e755e8831ab22394719520713d4949ed3d018e | [
"Apache-2.0"
] | null | null | null | src/createGraph.py | AJMFactsheets/NetworkSpeedGrapher | 86e755e8831ab22394719520713d4949ed3d018e | [
"Apache-2.0"
] | null | null | null | import sys
import plotly
import plotly.plotly as py
import plotly.graph_objs as go
#Argument 1 must be your plotly username, argument 2 is your api key. Get those by registering for a plotly account.
#Argument 3 is the name of the input file to input data from. Must be in the form: Date \n Download \n Upload \n
plotl... | 17 | 116 | 0.6727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 605 | 0.456259 |
4eb27769bbc6f1af6058f15f8a964479f5a48ebc | 484 | py | Python | crosshair/libimpl/__init__.py | mristin/CrossHair | 66a44a0d10021e0b1e2d847a677274e62ddd1e9d | [
"MIT"
] | null | null | null | crosshair/libimpl/__init__.py | mristin/CrossHair | 66a44a0d10021e0b1e2d847a677274e62ddd1e9d | [
"MIT"
] | null | null | null | crosshair/libimpl/__init__.py | mristin/CrossHair | 66a44a0d10021e0b1e2d847a677274e62ddd1e9d | [
"MIT"
] | null | null | null | from crosshair.libimpl import builtinslib
from crosshair.libimpl import collectionslib
from crosshair.libimpl import datetimelib
from crosshair.libimpl import mathlib
from crosshair.libimpl import randomlib
from crosshair.libimpl import relib
def make_registrations():
builtinslib.make_registrations()
collecti... | 30.25 | 44 | 0.82438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4eb3cdb71cd64b8402ec42bddffc7a5a65442095 | 690 | py | Python | schedulesy/apps/ade_legacy/serializers.py | unistra/schedulesy | bcd8c42281013f02ecd5c89fba9b622f20e47761 | [
"Apache-2.0"
] | 1 | 2020-07-24T19:17:56.000Z | 2020-07-24T19:17:56.000Z | schedulesy/apps/ade_legacy/serializers.py | unistra/schedulesy | bcd8c42281013f02ecd5c89fba9b622f20e47761 | [
"Apache-2.0"
] | 1 | 2020-07-09T10:23:28.000Z | 2020-07-09T10:23:28.000Z | schedulesy/apps/ade_legacy/serializers.py | unistra/schedulesy | bcd8c42281013f02ecd5c89fba9b622f20e47761 | [
"Apache-2.0"
] | null | null | null | import re
from django.urls import reverse
from rest_framework import serializers
from schedulesy.apps.ade_legacy.models import Customization
class CustomizationSerializer(serializers.ModelSerializer):
configuration = serializers.SerializerMethodField()
class Meta:
model = Customization
fie... | 26.538462 | 75 | 0.701449 | 544 | 0.788406 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.1 |
4eb6277eff4239146619cfdeeb4696e25cfb8808 | 927 | py | Python | tests/test_operator_filter.py | gva-jjoyce/gva_data | cda990d0abb4b175025aaf16e75192bd9cc213af | [
"Apache-2.0"
] | null | null | null | tests/test_operator_filter.py | gva-jjoyce/gva_data | cda990d0abb4b175025aaf16e75192bd9cc213af | [
"Apache-2.0"
] | 24 | 2020-12-24T12:21:42.000Z | 2021-01-28T14:22:38.000Z | tests/test_operator_filter.py | gva-jjoyce/gva_data | cda990d0abb4b175025aaf16e75192bd9cc213af | [
"Apache-2.0"
] | null | null | null | """
Test Filter Operator
"""
import os
import sys
sys.path.insert(1, os.path.join(sys.path[0], '..'))
from gva.flows.operators import FilterOperator
try:
from rich import traceback
traceback.install()
except ImportError:
pass
def test_filter_operator_default():
in_d = {'a':1}
n =... | 20.152174 | 52 | 0.558792 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.110032 |
4eb65c2f13bb97d8948357e8ad1093ac25bd46cd | 5,620 | py | Python | python/pynamics/quaternion.py | zmpatel19/Foldable-Robotics | 97590ec7d173cc1936cc8ff0379b16ad63bcda23 | [
"MIT"
] | 2 | 2018-08-20T22:01:18.000Z | 2021-04-19T00:50:56.000Z | python/pynamics/quaternion.py | zmpatel19/Foldable-Robotics | 97590ec7d173cc1936cc8ff0379b16ad63bcda23 | [
"MIT"
] | 3 | 2017-10-24T03:10:17.000Z | 2017-10-24T03:15:27.000Z | python/pynamics/quaternion.py | zmpatel19/Foldable-Robotics | 97590ec7d173cc1936cc8ff0379b16ad63bcda23 | [
"MIT"
] | 2 | 2017-03-03T23:04:17.000Z | 2021-03-20T20:33:53.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue May 25 10:24:05 2021
@author: danaukes
https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions
https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
"""
import sympy
sympy.in... | 27.54902 | 109 | 0.55694 | 4,664 | 0.829893 | 70 | 0.012456 | 399 | 0.070996 | 0 | 0 | 859 | 0.152847 |
4eb77f4c11a2d3ec08d7055fbeacf7a5223e4aad | 630 | py | Python | src/spellbot/migrations/versions/6e982c9318a6_adds_voice_category_per_channel.py | lexicalunit/spellbot | 17a4999d5e1def06246727ac5481230aa4a4557d | [
"MIT"
] | 13 | 2020-07-03T01:20:54.000Z | 2021-11-22T06:06:21.000Z | src/spellbot/migrations/versions/6e982c9318a6_adds_voice_category_per_channel.py | lexicalunit/spellbot | 17a4999d5e1def06246727ac5481230aa4a4557d | [
"MIT"
] | 660 | 2020-06-26T02:52:18.000Z | 2022-03-31T14:14:02.000Z | src/spellbot/migrations/versions/6e982c9318a6_adds_voice_category_per_channel.py | lexicalunit/spellbot | 17a4999d5e1def06246727ac5481230aa4a4557d | [
"MIT"
] | 3 | 2020-07-12T06:18:39.000Z | 2021-06-22T06:54:47.000Z | """Adds voice category per channel
Revision ID: 6e982c9318a6
Revises: ef54f035a75c
Create Date: 2021-12-03 13:18:57.468342
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "6e982c9318a6"
down_revision = "ef54f035a75c"
branch_labels = None
depends_on = None
def ... | 19.6875 | 64 | 0.655556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.436508 |