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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aca6a6e0486d3884a6f02c4b628910863d9b5d95 | 834 | py | Python | venv/Lib/site-packages/plotnine/geoms/geom_col.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/plotnine/geoms/geom_col.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 1 | 2020-10-02T21:43:06.000Z | 2020-10-15T22:52:39.000Z | venv/Lib/site-packages/plotnine/geoms/geom_col.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | null | null | null | from ..doctools import document
from .geom_bar import geom_bar
@document
class geom_col(geom_bar):
"""
Bar plot with base on the x-axis
This is an alternate version of :class:`geom_bar` that maps
the height of bars to an existing variable in your data. If
you want the height of the bar to represe... | 26.0625 | 65 | 0.605516 | 758 | 0.908873 | 0 | 0 | 768 | 0.920863 | 0 | 0 | 604 | 0.724221 |
aca742d4a6a7d5b4d70457cb7408186ab91efbca | 117 | py | Python | my_app/admin.py | gh-8/FullSend-List | 52544d1413b413eb9f646fb38613ca9865e5a88b | [
"MIT"
] | 1 | 2020-08-06T06:32:32.000Z | 2020-08-06T06:32:32.000Z | book_app/admin.py | Dhrutiman/my_book | 412200f185cd760f3c3c182cf61321f05f59d920 | [
"MIT"
] | 4 | 2020-06-05T21:40:29.000Z | 2021-06-02T00:54:34.000Z | book_app/admin.py | Dhrutiman/my_book | 412200f185cd760f3c3c182cf61321f05f59d920 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Search
# Register your models here.
admin.site.register(Search) | 23.4 | 32 | 0.811966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.239316 |
aca90fb089b9626c7c5db9aee7d6d8d8f14631cd | 1,155 | py | Python | utils.py | SeoulTech-HCIRLab/ChannelAug | 2701c86836150f86dfdf3ab4f57485f262c88b8f | [
"Apache-2.0"
] | 3 | 2020-06-30T06:29:35.000Z | 2021-03-02T14:18:55.000Z | utils.py | titania7777/ChannelAug | 03dcd4aa6bdb8b2a38d5057b55672d8a862e4e11 | [
"Apache-2.0"
] | null | null | null | utils.py | titania7777/ChannelAug | 03dcd4aa6bdb8b2a38d5057b55672d8a862e4e11 | [
"Apache-2.0"
] | null | null | null | # Max-Heinrich Laves
# Institute of Mechatronic Systems
# Leibniz Universität Hannover, Germany
# 2019
# Code From https://github.com/mlaves/bayesian-temperature-scaling
import torch
__all__ = ['accuracy', 'kl_loss', 'nentr', 'xavier_normal_init']
def accuracy(input, target):
_, max_indices = torch.max(input.dat... | 30.394737 | 90 | 0.670996 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 431 | 0.372837 |
aca93614dee7aef5c0226f502f8bd32011883de9 | 8,927 | py | Python | typotools.py | peczony/chgksuite | 654e75df7dd4f1c7676f942e8a595c1437dfecfa | [
"MIT"
] | 3 | 2017-03-11T11:24:43.000Z | 2020-06-11T17:41:40.000Z | typotools.py | peczony/chgksuite | 654e75df7dd4f1c7676f942e8a595c1437dfecfa | [
"MIT"
] | null | null | null | typotools.py | peczony/chgksuite | 654e75df7dd4f1c7676f942e8a595c1437dfecfa | [
"MIT"
] | null | null | null | #!usr/bin/env python
#! -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
import traceback
import urllib
import pprint
OPENING_QUOTES = set(['«', '„', '“'])
CLOSING_QUOTES = set(['»', '“', '”'])
QUOTES = OPENING_QUOTES | CLOSING_QUOTES | set(['"', "'"])
WHITESPACE = set([' ', ' ', '\n'])
PUNCTUAT... | 31.768683 | 92 | 0.498264 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,184 | 0.350429 |
aca9c4f8c8d50f2255b23ff003cb2be5b15e7571 | 1,029 | py | Python | src/test_evader.py | zacespinosa/homicidal_chauffeur | ad9186171e822d0021f22d5b16a37f76bad531af | [
"MIT"
] | null | null | null | src/test_evader.py | zacespinosa/homicidal_chauffeur | ad9186171e822d0021f22d5b16a37f76bad531af | [
"MIT"
] | null | null | null | src/test_evader.py | zacespinosa/homicidal_chauffeur | ad9186171e822d0021f22d5b16a37f76bad531af | [
"MIT"
] | null | null | null | import random as random
import numpy as np
from dynamics import Simulator, Pursuer, Evader
def test_evader():
num_d_states = 25
num_phi_states = 20
num_phi_d_states = 20
num_actions = 10
num_states = num_d_states*num_phi_states*num_phi_d_states
num_epochs = 1000
p = Pursuer()
e = Evader(num_d_states, num_phi... | 28.583333 | 127 | 0.738581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 184 | 0.178814 |
acaa7e107370a525398d8d212fa14ab906e106e9 | 1,892 | py | Python | tests/testing_drive.py | alexzanderr/_core-dev | 831f69dad524e450c4243b1dd88f26de80e1d444 | [
"MIT"
] | null | null | null | tests/testing_drive.py | alexzanderr/_core-dev | 831f69dad524e450c4243b1dd88f26de80e1d444 | [
"MIT"
] | null | null | null | tests/testing_drive.py | alexzanderr/_core-dev | 831f69dad524e450c4243b1dd88f26de80e1d444 | [
"MIT"
] | null | null | null |
import unittest
from core.drive import copy
from core.aesthetics import *
class TestingDrivepy(unittest.TestCase):
def test_copy_function(self):
source_tests = [
r"D:\Alexzander__\programming\python\Python2Executable",
r"D:\Alexzander__\programming\python\byzantion",
... | 35.037037 | 72 | 0.509514 | 1,756 | 0.928118 | 0 | 0 | 0 | 0 | 0 | 0 | 609 | 0.321882 |
acaad146ce57d3448a856e316aa846e7146bad1e | 207 | py | Python | app/routes.py | apigram/HospitalWaiterAuthService | 9fcff5c215f3ec99658ab2b2d300dd6f511d52fc | [
"Apache-2.0"
] | null | null | null | app/routes.py | apigram/HospitalWaiterAuthService | 9fcff5c215f3ec99658ab2b2d300dd6f511d52fc | [
"Apache-2.0"
] | null | null | null | app/routes.py | apigram/HospitalWaiterAuthService | 9fcff5c215f3ec99658ab2b2d300dd6f511d52fc | [
"Apache-2.0"
] | null | null | null | from app import app
from flask_restful import Api
from app.resources.auth import TokenResource
api = Api(app)
# Token resource
api.add_resource(TokenResource, '/authservice/token', endpoint='auth_token')
| 20.7 | 76 | 0.797101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.231884 |
acabdd0d2c7145cdd03eb03d939a79b0867a484a | 60,084 | py | Python | rioxarray/rioxarray.py | jhamman/rioxarray | 924df03522b8f53225231a435533f942cc4965e5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rioxarray/rioxarray.py | jhamman/rioxarray | 924df03522b8f53225231a435533f942cc4965e5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rioxarray/rioxarray.py | jhamman/rioxarray | 924df03522b8f53225231a435533f942cc4965e5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # -- coding: utf-8 --
"""
This module is an extension for xarray to provide rasterio capabilities
to xarray datasets/dataarrays.
Credits: The `reproject` functionality was adopted from https://github.com/opendatacube/datacube-core # noqa
Source file:
- https://github.com/opendatacube/datacube-core/blob/084c84d78cb6e1... | 34.871735 | 128 | 0.585797 | 50,133 | 0.833882 | 0 | 0 | 42,392 | 0.705123 | 0 | 0 | 25,910 | 0.430971 |
acad836bb967db6d3ec59df7b4fb252d32176a06 | 905 | py | Python | src/the_teleop/test_popout.py | NuenoB/TheTeleop | 57e3f745d391743fac408fb44bf20ffad945aa19 | [
"BSD-3-Clause"
] | null | null | null | src/the_teleop/test_popout.py | NuenoB/TheTeleop | 57e3f745d391743fac408fb44bf20ffad945aa19 | [
"BSD-3-Clause"
] | null | null | null | src/the_teleop/test_popout.py | NuenoB/TheTeleop | 57e3f745d391743fac408fb44bf20ffad945aa19 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
import os
import rospy
import rospkg
from readbag import restore
from qt_gui.plugin import Plugin
from python_qt_binding.QtCore import Qt
from python_qt_binding import loadUi
from python_qt_binding.QtGui import QFileDialog, QGraphicsView, QIcon, QWidget
from PyQt4 import QtGui, QtCore
from exam... | 23.815789 | 78 | 0.709392 | 385 | 0.425414 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.024309 |
acb0e8f231c4c3b90b8012cacf947784493ba5d8 | 2,387 | py | Python | _km.py | rajesh-lab/Inverse-Weighted-Survival-Games | 8e86065001fe58a3f99523b590992ac84a5d1cc4 | [
"MIT"
] | 7 | 2021-11-25T19:11:12.000Z | 2022-01-12T00:22:39.000Z | _km.py | rajesh-lab/Inverse-Weighted-Survival-Games | 8e86065001fe58a3f99523b590992ac84a5d1cc4 | [
"MIT"
] | null | null | null | _km.py | rajesh-lab/Inverse-Weighted-Survival-Games | 8e86065001fe58a3f99523b590992ac84a5d1cc4 | [
"MIT"
] | null | null | null | import models
import os
import copy
import torch
import torch.nn as nn
from lifelines import KaplanMeierFitter as KMFitter
import pycox
import numpy as np
# local
import catdist
import data_utils
import _concordance
import _nll
import _saver
def str_to_bool(arg):
"""Convert an argument string into its boolean val... | 25.393617 | 73 | 0.601592 | 215 | 0.090071 | 0 | 0 | 0 | 0 | 0 | 0 | 367 | 0.153749 |
acb17cfb85ffc305e2395079620b49264e4e9636 | 377 | py | Python | active/setup.py | jordan-schneider/value-alignment-verification | f2c877b16dfefa7cd8089b7aa3fe084ab907235e | [
"MIT"
] | null | null | null | active/setup.py | jordan-schneider/value-alignment-verification | f2c877b16dfefa7cd8089b7aa3fe084ab907235e | [
"MIT"
] | 2 | 2020-05-25T14:50:11.000Z | 2021-01-18T20:23:30.000Z | active/setup.py | jordan-schneider/batch-active-preference-based-learning | f2c877b16dfefa7cd8089b7aa3fe084ab907235e | [
"MIT"
] | 1 | 2021-08-24T18:22:13.000Z | 2021-08-24T18:22:13.000Z | from distutils.core import setup
from pathlib import Path
# TODO(joschnei): Add typing info
setup(
name="active",
version="0.1",
packages=["active",],
install_requires=[
"scipy",
"numpy",
"driver @ git+https://github.com/jordan-schneider/driver-env.git#egg=driver",
],
p... | 19.842105 | 85 | 0.588859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.429708 |
acb265bb1c2030e0a289057dc790dfa08270a963 | 762 | py | Python | macgraph/input/print_gqa.py | vinamramattoo/gqa-node-properties | 53ceea7ac759b831ac3e116c4426995db3bde834 | [
"Unlicense"
] | null | null | null | macgraph/input/print_gqa.py | vinamramattoo/gqa-node-properties | 53ceea7ac759b831ac3e116c4426995db3bde834 | [
"Unlicense"
] | null | null | null | macgraph/input/print_gqa.py | vinamramattoo/gqa-node-properties | 53ceea7ac759b831ac3e116c4426995db3bde834 | [
"Unlicense"
] | null | null | null |
import tableprint
from collections import Counter
from .args import *
from .util import *
if __name__ == "__main__":
args = get_args()
output_classes = Counter()
question_types = Counter()
with tableprint.TableContext(headers=["Type", "Question", "Answer"], width=[40,50,15]) as t:
for i in read_gqa(args):... | 22.411765 | 111 | 0.664042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.192913 |
acb35b9248fdf0502fc6a04e4f7dc0973b25b18c | 10,811 | py | Python | kaldi_tflite/lib/layers/tdnn/tdnn.py | ishine/kaldi-tflite | 77284d60985ca7ab04eeb977cb08cfaad488afca | [
"Apache-2.0"
] | null | null | null | kaldi_tflite/lib/layers/tdnn/tdnn.py | ishine/kaldi-tflite | 77284d60985ca7ab04eeb977cb08cfaad488afca | [
"Apache-2.0"
] | null | null | null | kaldi_tflite/lib/layers/tdnn/tdnn.py | ishine/kaldi-tflite | 77284d60985ca7ab04eeb977cb08cfaad488afca | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (2021-) Shahruk Hossain <[email protected]>
#
# 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... | 38.47331 | 95 | 0.622144 | 9,835 | 0.909722 | 0 | 0 | 0 | 0 | 0 | 0 | 5,352 | 0.495051 |
acb38fbd951d6721bb277eafb67e6e86f5c11fc0 | 534 | py | Python | Python/1 pengenalan python/2 komentar dan operasi matematika/6 kesimpulan.py | ekovegeance-com/tree | 7a429d0f35c5a71769820177f60d22e7231b4e40 | [
"Apache-2.0"
] | 3 | 2020-12-21T13:01:35.000Z | 2020-12-27T08:25:57.000Z | Python/1 pengenalan python/2 komentar dan operasi matematika/6 kesimpulan.py | ekovegeance-com/tree | 7a429d0f35c5a71769820177f60d22e7231b4e40 | [
"Apache-2.0"
] | 2 | 2020-12-05T23:26:16.000Z | 2020-12-27T10:21:47.000Z | Python/1 pengenalan python/2 komentar dan operasi matematika/6 kesimpulan.py | faizH3/faiz | c6a38717b91db8f76a0c4c4fd3168eb3ce8123ef | [
"Apache-2.0"
] | 3 | 2021-07-27T19:05:40.000Z | 2021-11-08T09:03:23.000Z | # Instruksi:
# Buatlah komentar di garis pertama,
# Buat variabel bernama jumlah_pacar yang isinya angka (bukan desimal),
# Buat variabel bernama lagi_galau yang isinya boolean,
# Buat variabel dengan nama terserah anda dan gunakan salah satu dari operator matematika yang telah kita pelajari.
#variabel untuk menyimpan... | 35.6 | 115 | 0.803371 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 477 | 0.893258 |
acb6313fbce86ba3db7156bb75d62a0032b83dff | 38 | py | Python | 04/py/q2.py | RussellDash332/practice-makes-perfect | 917822b461550a2e3679351e467362f95d9e428d | [
"MIT"
] | 2 | 2021-11-18T06:22:09.000Z | 2021-12-25T09:52:57.000Z | 04/py/q2.py | RussellDash332/practice-makes-perfect | 917822b461550a2e3679351e467362f95d9e428d | [
"MIT"
] | 2 | 2021-11-17T16:28:00.000Z | 2021-12-01T09:59:40.000Z | 04/py/q2.py | RussellDash332/practice-makes-perfect | 917822b461550a2e3679351e467362f95d9e428d | [
"MIT"
] | null | null | null | print((lambda x: lambda y: 2*x)(3)(4)) | 38 | 38 | 0.605263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
acb6c3f828ace9e1cc9ed180cfa072d2399e9b6f | 3,612 | py | Python | authusers/views.py | JoyMbugua/auth-app | 068adbe1d019fddf3852abbf06ae9b1edd6a6158 | [
"MIT"
] | null | null | null | authusers/views.py | JoyMbugua/auth-app | 068adbe1d019fddf3852abbf06ae9b1edd6a6158 | [
"MIT"
] | null | null | null | authusers/views.py | JoyMbugua/auth-app | 068adbe1d019fddf3852abbf06ae9b1edd6a6158 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status, permissions
import pyotp
import base64
from rest_framework_simplejwt.tokens import RefreshToken
from .serializers import CustomUserSerializer
from .models import ... | 32.540541 | 98 | 0.625138 | 3,202 | 0.886489 | 0 | 0 | 0 | 0 | 0 | 0 | 645 | 0.178571 |
acb6c72808305e6d9b0b8c17d139a73696a34b74 | 22,550 | py | Python | atom3d/util/formats.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | atom3d/util/formats.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | atom3d/util/formats.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | """Methods to convert between different file formats."""
import collections as col
import gzip
import os
import re
import Bio.PDB.Atom
import Bio.PDB.Chain
import Bio.PDB.Model
import Bio.PDB.Residue
import Bio.PDB.Structure
import numpy as np
import pandas as pd
# -- MANIPULATING DATAFRAMES --
def split_df(df, ke... | 34.427481 | 205 | 0.613082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11,213 | 0.497074 |
acb710e7d527ab9e28db345a225760bb21d72924 | 304 | py | Python | py_basic/acc_in.py | M1NH42/py | 792616d08013b46011db8ed6b56e40b7d9859ae2 | [
"MIT"
] | null | null | null | py_basic/acc_in.py | M1NH42/py | 792616d08013b46011db8ed6b56e40b7d9859ae2 | [
"MIT"
] | null | null | null | py_basic/acc_in.py | M1NH42/py | 792616d08013b46011db8ed6b56e40b7d9859ae2 | [
"MIT"
] | null | null | null | # About: Implementation of the accumulator program
# in python 3 specialization
# ask to enter string
phrase = input("Enter a string: ")
# initialize total variable with zero
tot = 0
# iterate through the string
for char in phrase :
if char != " " :
tot += 1
# print the result
print(tot) | 19 | 50 | 0.6875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.667763 |
acb7128eb35a5bcc7a3788d8062b0bad5eee5296 | 2,014 | py | Python | general/hash_algo.py | RakeshRam/algorithm-python | 80eb48bfdb98aa156fdb39a40b1f98840cddfeb9 | [
"MIT"
] | null | null | null | general/hash_algo.py | RakeshRam/algorithm-python | 80eb48bfdb98aa156fdb39a40b1f98840cddfeb9 | [
"MIT"
] | null | null | null | general/hash_algo.py | RakeshRam/algorithm-python | 80eb48bfdb98aa156fdb39a40b1f98840cddfeb9 | [
"MIT"
] | null | null | null | class MapHash:
def __init__(self, maxsize=6):
self.maxsize = maxsize # Real scenario 64.
self.hash = [None] * self.maxsize # Will be a 2D list
def _get_hash_key(self, key):
hash = sum(ord(k) for k in key)
return hash % self.maxsize
def add(self, key, value)... | 30.515152 | 71 | 0.546177 | 1,629 | 0.808838 | 0 | 0 | 0 | 0 | 0 | 0 | 354 | 0.17577 |
acbbc4f8e25d9363036a7e6c45e12fa4a283bea3 | 983 | py | Python | args.py | fang1fan/m5-python-starter | 434bcd701c04707e5a5c3ed07ee51d0a66687dfc | [
"Apache-2.0"
] | 1 | 2021-01-15T01:45:58.000Z | 2021-01-15T01:45:58.000Z | args.py | fang1fan/m5-python-starter | 434bcd701c04707e5a5c3ed07ee51d0a66687dfc | [
"Apache-2.0"
] | null | null | null | args.py | fang1fan/m5-python-starter | 434bcd701c04707e5a5c3ed07ee51d0a66687dfc | [
"Apache-2.0"
] | null | null | null | import argparse
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--d_model', type=int, default=0, help='d_model')
parser.add_argument('--d_head', type=int, default=2, help='head')
parser.add_argument('--d_inner', type=bool, default=True, help='inner lay... | 44.681818 | 102 | 0.755849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 310 | 0.315361 |
acbe635e277d91246135b52d895f25061519435c | 628 | py | Python | maxblog/apps/posts/forms.py | masich/maxblog | 27807ba06415de7d06bdca3a2a1d7135f09ce612 | [
"MIT"
] | null | null | null | maxblog/apps/posts/forms.py | masich/maxblog | 27807ba06415de7d06bdca3a2a1d7135f09ce612 | [
"MIT"
] | null | null | null | maxblog/apps/posts/forms.py | masich/maxblog | 27807ba06415de7d06bdca3a2a1d7135f09ce612 | [
"MIT"
] | null | null | null | from django.forms import forms, ModelForm
from .models import Comment, Post
class CommentForm(ModelForm):
class Meta:
model = Comment
fields = ['author_name', 'text']
labels = {
'author_name': 'Your name',
'text': 'Comment'
}
class PostForm(ModelForm):
... | 23.259259 | 64 | 0.506369 | 545 | 0.867834 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.308917 |
acc035b9369687f59419626c7212f23a2d9ed6d2 | 12,257 | py | Python | core/gdrn_selfocc_modeling/tools/dataset_utils.py | 4PiR2/SO-Pose | a3a61d2c97b1084a4754d6c12e45e16d85809729 | [
"Apache-2.0"
] | 32 | 2021-08-23T02:07:28.000Z | 2022-03-22T08:51:07.000Z | core/gdrn_selfocc_modeling/tools/dataset_utils.py | Pamyuu/SO-Pose | a3a61d2c97b1084a4754d6c12e45e16d85809729 | [
"Apache-2.0"
] | 13 | 2021-09-28T02:23:19.000Z | 2022-03-31T03:23:10.000Z | core/gdrn_selfocc_modeling/tools/dataset_utils.py | Pamyuu/SO-Pose | a3a61d2c97b1084a4754d6c12e45e16d85809729 | [
"Apache-2.0"
] | 11 | 2021-08-21T05:57:18.000Z | 2022-03-23T22:31:53.000Z | import copy
import logging
import numpy as np
import operator
import pickle
import random
import mmcv
import torch
import torch.multiprocessing as mp
import torch.utils.data as data
from torch.utils.data import dataloader
from detectron2.utils.serialize import PicklableWrapper
from detectron2.data.build import worker_... | 36.263314 | 115 | 0.632781 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,188 | 0.341682 |
acc03fcb53c4b1a3e12c7dd2807ba7725140ab62 | 4,204 | py | Python | tests/settings.py | tanjibpa/django-coconut | 456add56cd2bf851a245337cfbf71c6587d1bf98 | [
"BSD-2-Clause"
] | null | null | null | tests/settings.py | tanjibpa/django-coconut | 456add56cd2bf851a245337cfbf71c6587d1bf98 | [
"BSD-2-Clause"
] | null | null | null | tests/settings.py | tanjibpa/django-coconut | 456add56cd2bf851a245337cfbf71c6587d1bf98 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# django-coconuts
# Copyright (c) 2008-2017, Jeremy Lainé
# 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 ... | 35.627119 | 85 | 0.732873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,504 | 0.833294 |
acc0ce4ad97f2f6c746aca5ab1091cc7bf3d7762 | 3,419 | py | Python | models/oomusic_transcoder.py | nicolasmartinelli/oomusic | 376618eb61a64aae9d04db21f42ce859c1951f22 | [
"MIT"
] | 4 | 2018-03-04T19:11:20.000Z | 2020-01-13T18:23:15.000Z | models/oomusic_transcoder.py | nicolasmartinelli/oomusic | 376618eb61a64aae9d04db21f42ce859c1951f22 | [
"MIT"
] | 5 | 2016-10-10T12:46:14.000Z | 2017-02-01T22:14:39.000Z | models/oomusic_transcoder.py | DocMarty84/oomusic | 376618eb61a64aae9d04db21f42ce859c1951f22 | [
"MIT"
] | 3 | 2017-09-04T02:58:41.000Z | 2019-09-17T08:10:29.000Z | # -*- coding: utf-8 -*-
import datetime
import os
import subprocess
from odoo import fields, models
from odoo.tools import OrderedSet
class MusicTranscoder(models.Model):
_name = "oomusic.transcoder"
_description = "Music Transcoder"
_order = "sequence"
name = fields.Char("Transcoder Name", require... | 37.988889 | 100 | 0.623574 | 3,280 | 0.959345 | 0 | 0 | 0 | 0 | 0 | 0 | 1,905 | 0.55718 |
acc1831c2a1513db9dd276b866be14f74d8ab6db | 341 | py | Python | Chapter04/CNN_1.py | PacktPublishing/Practical-Convolutional-Neural-Networks | fabffa7f8afa8986a3f2e0756ec8bc4c12836eb9 | [
"MIT"
] | 23 | 2018-03-22T21:30:32.000Z | 2022-01-02T13:26:34.000Z | Chapter04/CNN_1.py | huanghanchi/Practical-Convolutional-Neural-Networks | 365aa803d38316ed9749e4c8c0f3ae2667788781 | [
"MIT"
] | 2 | 2018-05-21T04:53:34.000Z | 2019-03-05T13:04:34.000Z | Chapter04/CNN_1.py | huanghanchi/Practical-Convolutional-Neural-Networks | 365aa803d38316ed9749e4c8c0f3ae2667788781 | [
"MIT"
] | 17 | 2018-03-12T12:00:19.000Z | 2022-02-22T16:36:36.000Z | #Refer AlexNet implementation code, returns last fully connected layer
fc7 = AlexNet(resized, feature_extract=True)
shape = (fc7.get_shape().as_list()[-1], 43)
fc8_weight = tf.Variable(tf.truncated_normal(shape, stddev=1e-2))
fc8_b = tf.Variable(tf.zeros(43))
logits = tf.nn.xw_plus_b(fc7, fc8_weight, fc8_b)
probs = tf.... | 34.1 | 70 | 0.756598 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.205279 |
acc1ce36377278a085395e3d7d5f5eee13f3cf3a | 169 | py | Python | sexyhotel/venv/Scripts/django-admin.py | JesseChanCN/sexyHotel | b0e2362073fe6fa5bd551f96a9a45f1e26f3d353 | [
"BSD-2-Clause"
] | null | null | null | sexyhotel/venv/Scripts/django-admin.py | JesseChanCN/sexyHotel | b0e2362073fe6fa5bd551f96a9a45f1e26f3d353 | [
"BSD-2-Clause"
] | 1 | 2021-10-02T22:17:39.000Z | 2021-10-02T22:17:39.000Z | sexyhotel/venv/Scripts/django-admin.py | JesseChanCN/sexyHotel | b0e2362073fe6fa5bd551f96a9a45f1e26f3d353 | [
"BSD-2-Clause"
] | 4 | 2018-11-26T03:59:52.000Z | 2018-11-26T08:30:54.000Z | #!C:\Users\Administrator\Desktop\装饰器代码\venv\Scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 28.166667 | 62 | 0.792899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.458101 |
acc201e9c32baaef93d15355f2aee82e6196773e | 11,704 | py | Python | fuzz.py | codebyzen/smart-url-fuzzer | de611628fa7ab445a23f438bfccf3a7b4ecf840a | [
"Apache-2.0"
] | 38 | 2018-06-04T14:37:13.000Z | 2022-03-02T16:38:46.000Z | fuzz.py | codebyzen/smart-url-fuzzer | de611628fa7ab445a23f438bfccf3a7b4ecf840a | [
"Apache-2.0"
] | 7 | 2018-06-04T15:21:15.000Z | 2021-07-23T09:40:31.000Z | fuzz.py | codebyzen/smart-url-fuzzer | de611628fa7ab445a23f438bfccf3a7b4ecf840a | [
"Apache-2.0"
] | 19 | 2020-02-20T12:17:46.000Z | 2022-01-27T17:15:28.000Z | import logging
import sys
import os
from logging.handlers import RotatingFileHandler
from multiprocessing.pool import ThreadPool
from optparse import OptionParser
import requests
from requests.packages import urllib3
urllib3.disable_warnings()
# Workers configurations
ASYNC_WORKERS_COUNT = 100 # How many threads wi... | 41.8 | 126 | 0.647471 | 9,202 | 0.786227 | 0 | 0 | 1,590 | 0.135851 | 0 | 0 | 4,155 | 0.355007 |
acc20414e4e5bdf59a1324cd753233fca1a3b6c7 | 1,432 | py | Python | models/cells/PC2018Zang/Purkinje.py | HarshKhilawala/cerebmodels | d2a2f2ef947ef9dc23ddce6e55159240cd3233cb | [
"BSD-3-Clause"
] | null | null | null | models/cells/PC2018Zang/Purkinje.py | HarshKhilawala/cerebmodels | d2a2f2ef947ef9dc23ddce6e55159240cd3233cb | [
"BSD-3-Clause"
] | 9 | 2020-03-24T17:09:03.000Z | 2021-05-17T16:11:17.000Z | models/cells/PC2018Zang/Purkinje.py | myHBPwork/cerebmodels | 371ea7f1bbe388f1acade17c7128b8ca6ab8fb7a | [
"BSD-3-Clause"
] | 1 | 2021-05-21T03:08:41.000Z | 2021-05-21T03:08:41.000Z | #Template of the Purkinje cell model, Zang et al. 2018
#Templating by Lungsi 2019 based on ~/PC2018Zang/purkinje.hoc
#purkinje.hoc has been converted from original purkinje_demo and using readme.html as a guide
from neuron import h
#from pdb import set_trace as breakpoint
from random import randint
class Purkinje(obje... | 44.75 | 93 | 0.664106 | 1,130 | 0.789106 | 0 | 0 | 0 | 0 | 0 | 0 | 897 | 0.626397 |
acc30f8a7181a1c7790a5aea356612213e20f556 | 375 | py | Python | octoprint_marlin_flasher/validation/validators/arduino.py | thinkyhead/OctoPrint-Marlin-Flasher | c43110226d1b9d4aa0df2fdfb8cffab47d687957 | [
"MIT"
] | 1 | 2021-09-20T22:17:22.000Z | 2021-09-20T22:17:22.000Z | octoprint_marlin_flasher/validation/validators/arduino.py | thinkyhead/OctoPrint-Marlin-Flasher | c43110226d1b9d4aa0df2fdfb8cffab47d687957 | [
"MIT"
] | null | null | null | octoprint_marlin_flasher/validation/validators/arduino.py | thinkyhead/OctoPrint-Marlin-Flasher | c43110226d1b9d4aa0df2fdfb8cffab47d687957 | [
"MIT"
] | 1 | 2021-12-10T03:37:29.000Z | 2021-12-10T03:37:29.000Z | from flask_babel import gettext
from marshmallow import ValidationError
import intelhex
import zipfile
def is_correct_file_type(filename):
try:
with zipfile.ZipFile(filename, "r") as _:
pass
except zipfile.BadZipfile:
try:
ih = intelhex.IntelHex()
ih.loadhex(filename)
except intelhex.IntelHexError:
... | 22.058824 | 55 | 0.770667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.061333 |
acc3ba487d48e6f78d9730e1c98d383793fee0ba | 3,203 | py | Python | zazu/git_helper.py | stopthatcow/zazu | b4d64d872bf283e997642010bb0dbb88df0ce1c1 | [
"MIT"
] | 2 | 2017-01-03T20:22:17.000Z | 2017-01-03T21:52:14.000Z | zazu/git_helper.py | stopthatcow/zazu | b4d64d872bf283e997642010bb0dbb88df0ce1c1 | [
"MIT"
] | 186 | 2017-01-03T20:24:50.000Z | 2022-03-13T02:30:30.000Z | zazu/git_helper.py | stopthatcow/zazu | b4d64d872bf283e997642010bb0dbb88df0ce1c1 | [
"MIT"
] | 3 | 2017-01-03T21:42:32.000Z | 2018-02-09T13:25:06.000Z | # -*- coding: utf-8 -*-
"""Git functions for zazu."""
import zazu.imports
zazu.imports.lazy_import(locals(), [
'filecmp',
'git',
'os',
'pkg_resources',
'shutil',
'zazu.util',
])
__author__ = 'Nicholas Wiles'
__copyright__ = 'Copyright 2016'
def get_repo_root(starting_dir):
"""Get the roo... | 33.364583 | 112 | 0.67749 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 937 | 0.292538 |
acc3c65d44803dc8ba8ec360a7cc84ee71244960 | 4,284 | py | Python | Gds/src/fprime_gds/common/data_types/event_data.py | SSteve/fprime | 12c478bd79c2c4ba2d9f9e634e47f8b6557c54a8 | [
"Apache-2.0"
] | 2 | 2021-02-23T06:56:03.000Z | 2021-02-23T07:03:53.000Z | Gds/src/fprime_gds/common/data_types/event_data.py | SSteve/fprime | 12c478bd79c2c4ba2d9f9e634e47f8b6557c54a8 | [
"Apache-2.0"
] | 9 | 2021-02-21T07:27:44.000Z | 2021-02-21T07:27:58.000Z | Gds/src/fprime_gds/common/data_types/event_data.py | SSteve/fprime | 12c478bd79c2c4ba2d9f9e634e47f8b6557c54a8 | [
"Apache-2.0"
] | 1 | 2021-02-23T17:10:44.000Z | 2021-02-23T17:10:44.000Z | """
@brief Class to store data from a specific event
@date Created July 2, 2018
@author R. Joseph Paetz
@bug No known bugs
"""
from fprime.common.models.serialize import time_type
from fprime_gds.common.data_types import sys_data
class EventData(sys_data.SysData):
"""
The EventData class stores a specific ... | 31.043478 | 81 | 0.554622 | 4,048 | 0.944911 | 0 | 0 | 873 | 0.203782 | 0 | 0 | 2,305 | 0.538049 |
acc42a599a73b9ca811d8ac2f1ade306f4cc9f45 | 5,607 | py | Python | src/Plot.py | xin-huang/dadi-cli | d403e9dced19c3a71dc134a8993ad0ceba592c51 | [
"Apache-2.0"
] | 5 | 2021-12-07T23:27:40.000Z | 2022-03-15T08:59:33.000Z | src/Plot.py | xin-huang/dadi-cli | d403e9dced19c3a71dc134a8993ad0ceba592c51 | [
"Apache-2.0"
] | 2 | 2022-01-15T09:27:12.000Z | 2022-03-25T16:08:52.000Z | src/Plot.py | xin-huang/dadi-cli | d403e9dced19c3a71dc134a8993ad0ceba592c51 | [
"Apache-2.0"
] | 5 | 2021-03-31T19:22:23.000Z | 2021-12-07T18:24:59.000Z | import dadi, pickle
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure(figsize=(8,6))
def plot_single_sfs(fs, projections, output, vmin):
fs = dadi.Spectrum.from_file(fs)
fig = plt.figure(219033)
if len(fs.sample_sizes) == 1:
if projections == None: projections = [20]
... | 32.789474 | 122 | 0.620118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 224 | 0.03995 |
acc468eb15f6052159fe5c3f86610a87918f8f91 | 291 | py | Python | modules/accounts/__init__.py | vladpi/zenmoney-bot | 280723a49979632811f585fb8dced3c396fe563a | [
"Apache-2.0"
] | null | null | null | modules/accounts/__init__.py | vladpi/zenmoney-bot | 280723a49979632811f585fb8dced3c396fe563a | [
"Apache-2.0"
] | 1 | 2022-02-16T22:29:36.000Z | 2022-02-16T22:29:54.000Z | modules/accounts/__init__.py | vladpi/zenmoney-bot | 280723a49979632811f585fb8dced3c396fe563a | [
"Apache-2.0"
] | null | null | null | from .exports import ( # noqa
create_account_from_zenmoney_account,
delete_account,
get_accounts_by_user,
get_user_account_by_id,
get_user_account_by_title,
update_account_transactions_count,
)
from .schemas import AccountModel # noqa
from .tables import * # noqa
| 26.454545 | 41 | 0.769759 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.061856 |
acc4d2bbf7663f421e601fc096c05198efab0608 | 5,136 | py | Python | akita/metrics.py | michael-lazar/Akita | f94bc04c28e70abe7f85c014f11a4621db9743c7 | [
"MIT"
] | 18 | 2018-04-26T18:28:00.000Z | 2021-08-22T11:49:12.000Z | akita/metrics.py | michael-lazar/Akita | f94bc04c28e70abe7f85c014f11a4621db9743c7 | [
"MIT"
] | 1 | 2020-01-10T06:16:17.000Z | 2020-01-10T22:16:55.000Z | akita/metrics.py | michael-lazar/Akita | f94bc04c28e70abe7f85c014f11a4621db9743c7 | [
"MIT"
] | 5 | 2018-08-10T13:55:50.000Z | 2021-11-30T22:08:50.000Z | import time
import logging
import threading
from collections import Counter
_logger = logging.getLogger('akita')
class SlidingWindowBase:
"""
Data structure that keeps track of the total number of events that have
occurred in a given time frame. Events are binned into time windows based
on their tim... | 31.127273 | 82 | 0.632983 | 5,009 | 0.975273 | 0 | 0 | 0 | 0 | 0 | 0 | 1,959 | 0.381425 |
acc55edad5b04c2e0b24f12c37f946370c522b36 | 62 | py | Python | studentData.py | seanmacb/COMP-115-Exercises | fbe7e5b158f2db785b886b6c600f1a8beb19ab1f | [
"MIT"
] | null | null | null | studentData.py | seanmacb/COMP-115-Exercises | fbe7e5b158f2db785b886b6c600f1a8beb19ab1f | [
"MIT"
] | null | null | null | studentData.py | seanmacb/COMP-115-Exercises | fbe7e5b158f2db785b886b6c600f1a8beb19ab1f | [
"MIT"
] | null | null | null | Schmoe Joe 12345 90 91 94 87 89
Doe Jane 74836 91 99 82 81 100 | 31 | 31 | 0.758065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
acc64880afae366e820de6d62f2717aea69a4649 | 2,360 | py | Python | tests/project_creator.py | AlexandrovRoman/Flask-DJ | ecf6cb05a8115641cab6634e8d004801a96c314c | [
"MIT"
] | 7 | 2020-03-12T03:09:12.000Z | 2021-05-01T08:11:33.000Z | tests/project_creator.py | AlexandrovRoman/Flask-DJ | ecf6cb05a8115641cab6634e8d004801a96c314c | [
"MIT"
] | null | null | null | tests/project_creator.py | AlexandrovRoman/Flask-DJ | ecf6cb05a8115641cab6634e8d004801a96c314c | [
"MIT"
] | 1 | 2020-12-17T07:24:55.000Z | 2020-12-17T07:24:55.000Z | from os.path import exists, join
import pytest
from flask_dj import startproject
from tests.basic_project_creator import ProjectCreate
class TestBaseSettingProjectConstructor(ProjectCreate):
def setup(self, need_static=False, need_templates=False):
super().setup()
def test_project_folder_exist(self):... | 32.328767 | 108 | 0.717373 | 2,210 | 0.936441 | 0 | 0 | 0 | 0 | 0 | 0 | 302 | 0.127966 |
acc66314877bc34a87521880f075c9eaab6df4a4 | 1,075 | py | Python | ACM ICPC/DP/subset_sum problem/subsetSum.py | shreejitverma/GeeksforGeeks | d7bcb166369fffa9a031a258e925b6aff8d44e6c | [
"MIT"
] | 2 | 2022-02-18T05:14:28.000Z | 2022-03-08T07:00:08.000Z | ACM ICPC/DP/subset_sum problem/subsetSum.py | shivaniverma1/Competitive-Programming-1 | d7bcb166369fffa9a031a258e925b6aff8d44e6c | [
"MIT"
] | 6 | 2022-01-13T04:31:04.000Z | 2022-03-12T01:06:16.000Z | ACM ICPC/DP/subset_sum problem/subsetSum.py | shivaniverma1/Competitive-Programming-1 | d7bcb166369fffa9a031a258e925b6aff8d44e6c | [
"MIT"
] | 2 | 2022-02-14T19:53:53.000Z | 2022-02-18T05:14:30.000Z | def isSubsetSum(arr, n, sum):
'''
Returns true if there exists a subset
with given sum in arr[]
'''
# The value of subset[i%2][j] will be true
# if there exists a subset of sum j in
# arr[0, 1, ...., i-1]
subset = [[False for j in range(sum + 1)] for i in range(3)]
for i in range(n... | 27.564103 | 74 | 0.477209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 355 | 0.330233 |
acc67a5c015a68af894948efa11516825c4f63e6 | 3,156 | py | Python | models/matching/ffm.py | charlesxu-aicoder/Recommendation-model | 9f5af6cc4c3382f2c0667b2d51836e2ae7ae6404 | [
"MIT"
] | null | null | null | models/matching/ffm.py | charlesxu-aicoder/Recommendation-model | 9f5af6cc4c3382f2c0667b2d51836e2ae7ae6404 | [
"MIT"
] | null | null | null | models/matching/ffm.py | charlesxu-aicoder/Recommendation-model | 9f5af6cc4c3382f2c0667b2d51836e2ae7ae6404 | [
"MIT"
] | null | null | null | # -*-coding: utf-8-*-
# @Author : Charlesxu
# @Email : [email protected]
from models.matching import *
class FFM_Layer(Layer):
def __init__(self, dense_feature_columns, sparse_feature_columns, k, w_reg=1e-4, v_reg=1e-4):
super(FFM_Layer, self).__init__()
self.dense_feature_columns = dense_... | 43.833333 | 97 | 0.576362 | 3,038 | 0.962611 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.034221 |
acc6a2044f16b81953b9b0b10f9e3d38dd9da534 | 1,822 | py | Python | server/apps/authentication/tests.py | krishnasagar14/street_parking | 5b5e13d94358c0c610b9c2188abb62e52598a3bb | [
"MIT"
] | null | null | null | server/apps/authentication/tests.py | krishnasagar14/street_parking | 5b5e13d94358c0c610b9c2188abb62e52598a3bb | [
"MIT"
] | 3 | 2020-02-11T23:45:37.000Z | 2021-06-10T21:13:14.000Z | server/apps/authentication/tests.py | krishnasagar14/street_parking | 5b5e13d94358c0c610b9c2188abb62e52598a3bb | [
"MIT"
] | null | null | null | from django.test import TestCase
from rest_framework.test import APIRequestFactory
from .views import LoginView, SignupView
from common.tests import USER_DATA, prepare_dummy_user_data
# Create your tests here.
class ApiViewTests(TestCase):
factory = APIRequestFactory()
def test_signup(self):
user_da... | 31.964912 | 71 | 0.616905 | 1,609 | 0.883095 | 0 | 0 | 0 | 0 | 0 | 0 | 284 | 0.155873 |
acc6cf450962693d28429a214f8508d7ed98f2f8 | 5,205 | py | Python | build/android/play_services/utils.py | TwistedCore/external_v8 | c6725dab9be251fbfc6fd7d53c3513a23e78c36c | [
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | build/android/play_services/utils.py | TwistedCore/external_v8 | c6725dab9be251fbfc6fd7d53c3513a23e78c36c | [
"BSD-3-Clause"
] | null | null | null | build/android/play_services/utils.py | TwistedCore/external_v8 | c6725dab9be251fbfc6fd7d53c3513a23e78c36c | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''
Utility functions for all things related to manipulating google play services
related files.
'''
import argparse
import filecmp
import json
import loggi... | 30.438596 | 79 | 0.716427 | 2,802 | 0.538329 | 0 | 0 | 508 | 0.097598 | 0 | 0 | 2,856 | 0.548703 |
acc870850c0180a5f9b1ee2a3fbd63fa2971c376 | 4,179 | py | Python | tagger/__main__.py | XYlearn/Tagger | 1b74b44b28b3355f2f26613394cd6ef709ec9d97 | [
"MIT"
] | null | null | null | tagger/__main__.py | XYlearn/Tagger | 1b74b44b28b3355f2f26613394cd6ef709ec9d97 | [
"MIT"
] | null | null | null | tagger/__main__.py | XYlearn/Tagger | 1b74b44b28b3355f2f26613394cd6ef709ec9d97 | [
"MIT"
] | null | null | null | # -*-coding: utf-8
import sys
import argparse
from tagger import FileTagger
def tagger_add(args):
tg = FileTagger()
res = tg.add_tags(args.path, *args.tags)
if not res:
print("[-] Fail to add tags.")
def tagger_rm(args):
tg = FileTagger()
res = tg.rm_tags(args.path, *args.tags)
if n... | 37.3125 | 113 | 0.680306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,220 | 0.291936 |
accc42d5e9065c564b32d000eff2da58f6c77fb1 | 4,487 | py | Python | lang_vec/langvec_classify.py | cordercorder/NMT | cbc5ad010ce04da7a82f05ad1a3b6c16f8467266 | [
"MIT"
] | 6 | 2020-08-17T16:11:18.000Z | 2020-10-10T12:26:03.000Z | lang_vec/langvec_classify.py | cordercorder/NMT | cbc5ad010ce04da7a82f05ad1a3b6c16f8467266 | [
"MIT"
] | 1 | 2020-07-11T16:42:55.000Z | 2020-07-12T12:58:18.000Z | lang_vec/langvec_classify.py | cordercorder/NMT | cbc5ad010ce04da7a82f05ad1a3b6c16f8467266 | [
"MIT"
] | 2 | 2020-10-10T12:22:46.000Z | 2021-11-12T15:39:27.000Z | import numpy as np
import argparse
import pycountry
import lang2vec.lang2vec as l2v
from sklearn import preprocessing, linear_model, svm
from lang_vec.lang_vec_tools import load_lang_vec
from utils.tools import read_data
from typing import Dict
def get_language_alpha3(language_code: str):
if len(language_code) ==... | 35.330709 | 112 | 0.639848 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 770 | 0.171607 |
accceb5e8bd513c5d20c432215e4eda1165c3144 | 258 | py | Python | hooks/post_gen_project.py | KernelA/cookiecutter-python | f609b1e6156dcbcedb296a329c86ef11edbe1b14 | [
"MIT"
] | null | null | null | hooks/post_gen_project.py | KernelA/cookiecutter-python | f609b1e6156dcbcedb296a329c86ef11edbe1b14 | [
"MIT"
] | null | null | null | hooks/post_gen_project.py | KernelA/cookiecutter-python | f609b1e6156dcbcedb296a329c86ef11edbe1b14 | [
"MIT"
] | null | null | null | import os
FILES_TO_REMOVE = ["setup.cfg", "pyproject.toml", "setup.py"]
if "{{ cookiecutter.as_package }}" == "no":
for file in FILES_TO_REMOVE:
os.remove(file)
if "{{ cookiecutter.remove_test_script }}" == "yes":
os.remove("test_log.py")
| 23.454545 | 61 | 0.643411 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 129 | 0.5 |
accdf2b0268088db6e9b6be629bf68b1c39b46da | 620 | py | Python | register/forms/misc.py | Ajuajmal/heroku | f23aad8c392a273caf0da39cedeec4746ded29dc | [
"0BSD"
] | null | null | null | register/forms/misc.py | Ajuajmal/heroku | f23aad8c392a273caf0da39cedeec4746ded29dc | [
"0BSD"
] | null | null | null | register/forms/misc.py | Ajuajmal/heroku | f23aad8c392a273caf0da39cedeec4746ded29dc | [
"0BSD"
] | null | null | null | from django import forms
from crispy_forms.helper import FormHelper
class MiscForm(forms.Form):
notes = forms.CharField(
label='Notes for the registration team',
help_text='Anything else you need to describe. '
'The registration team will see this. '
'The bursa... | 29.52381 | 57 | 0.619355 | 548 | 0.883871 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.235484 |
accfc0c80b0cdf98d793310ffa5f537f88f2a21e | 948 | py | Python | Practice/script.py | NVombat/WebCam-Motion-Detector | 591235f66b390ce956a5b7538c3a9308281e6c3a | [
"MIT"
] | 2 | 2021-08-02T06:03:02.000Z | 2022-03-22T17:24:08.000Z | Practice/script.py | NVombat/WebCam-Motion-Detector | 591235f66b390ce956a5b7538c3a9308281e6c3a | [
"MIT"
] | null | null | null | Practice/script.py | NVombat/WebCam-Motion-Detector | 591235f66b390ce956a5b7538c3a9308281e6c3a | [
"MIT"
] | null | null | null | #Import libraries
import cv2
#Read image file into n dimensional numpy array
#Read as greyscale image -> 0, Read as color image w/o transparency -> 1, Read as color image w transparency -> -1
img = cv2.imread("Practice/images/galaxy.jpg", 0)
print(type(img))
print(img)
#To know the number of rows and columns
print(i... | 30.580645 | 114 | 0.754219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 670 | 0.706751 |
acd027d5fe8415bf29567d076248cd34dc5cdc41 | 94 | py | Python | tests/basic/tuple.py | MoonStarCZW/py2rb | 89b247717d33d780fbf143e1583bfe9252984da4 | [
"MIT"
] | null | null | null | tests/basic/tuple.py | MoonStarCZW/py2rb | 89b247717d33d780fbf143e1583bfe9252984da4 | [
"MIT"
] | null | null | null | tests/basic/tuple.py | MoonStarCZW/py2rb | 89b247717d33d780fbf143e1583bfe9252984da4 | [
"MIT"
] | null | null | null |
tup = ('a','b',1,2,3)
print(tup[0])
print(tup[1])
print(tup[2])
print(tup[3])
print(tup[4])
| 10.444444 | 21 | 0.56383 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.06383 |
acd101863dd3fde86f97b4f8931de856caab8a8b | 101 | py | Python | frameworks/Python/aiohttp/app/gunicorn.py | xsoheilalizadeh/FrameworkBenchmarks | 855527008f7488e4fd508d1e72dfa9953874a2c6 | [
"BSD-3-Clause"
] | 5 | 2015-11-05T12:57:32.000Z | 2021-02-24T05:03:05.000Z | frameworks/Python/aiohttp/app/gunicorn.py | xsoheilalizadeh/FrameworkBenchmarks | 855527008f7488e4fd508d1e72dfa9953874a2c6 | [
"BSD-3-Clause"
] | 122 | 2021-04-16T02:04:24.000Z | 2022-01-13T20:17:26.000Z | frameworks/Python/aiohttp/app/gunicorn.py | xsoheilalizadeh/FrameworkBenchmarks | 855527008f7488e4fd508d1e72dfa9953874a2c6 | [
"BSD-3-Clause"
] | 2 | 2018-03-22T00:37:28.000Z | 2018-03-22T00:56:57.000Z | import asyncio
from .main import create_app
loop = asyncio.get_event_loop()
app = create_app(loop)
| 14.428571 | 31 | 0.782178 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
acd1ea063ff8bdb5abed599c2d4b292cd60dcfca | 16,419 | py | Python | keymap/klc_to_asm.py | MJoergen/x16-rom-floating-point | 8258beffec3faac42b68eeda22e8e3055fd64b21 | [
"MIT"
] | 1 | 2020-05-30T17:58:13.000Z | 2020-05-30T17:58:13.000Z | keymap/klc_to_asm.py | MJoergen/x16-rom-floating-point | 8258beffec3faac42b68eeda22e8e3055fd64b21 | [
"MIT"
] | null | null | null | keymap/klc_to_asm.py | MJoergen/x16-rom-floating-point | 8258beffec3faac42b68eeda22e8e3055fd64b21 | [
"MIT"
] | null | null | null | import io, re, codecs, sys, os.path
import pprint
REG = 0
SHFT = 1
CTRL = 2
ALT = 4
ALTGR = 6
COMPRESSED_OUTPUT=1
def get_kbd_layout(base_filename, load_patch = False):
filename_klc = base_filename
filename_changes = base_filename + 'patch'
f = io.open(filename_klc, mode="r", encoding="utf-8")
lines = f.r... | 28.90669 | 829 | 0.637859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,958 | 0.240681 |
acd3f396f98f04bb660c487afcf7cf999a2fe26c | 1,219 | py | Python | src_py/testudpvilistus.py | paulharter/biofeed | fa83e5dcec568d1cd7350b2047c9b91891d1623e | [
"MIT"
] | null | null | null | src_py/testudpvilistus.py | paulharter/biofeed | fa83e5dcec568d1cd7350b2047c9b91891d1623e | [
"MIT"
] | null | null | null | src_py/testudpvilistus.py | paulharter/biofeed | fa83e5dcec568d1cd7350b2047c9b91891d1623e | [
"MIT"
] | null | null | null | import socket,time
tcpSock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
print "try connect",tcpSock
tcpSock.connect(('169.254.1.1',2000))
print "connected - wait for response"
print tcpSock.recv(8)
time.sleep(0.1)
tcpSock.send("$$$")
time.sleep(0.5)
print tcpSock.recv(1024)
print "Param set"
tcpSock.se... | 32.078947 | 75 | 0.694011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 525 | 0.430681 |
acd5badd49e6f717d0eac28b84d7e3b325d5d993 | 20,582 | py | Python | returns/context/requires_context_result.py | MichaelAOlson/returns | 56e0df46846890b1c33dd26216086f94269292ad | [
"BSD-2-Clause"
] | 1 | 2020-12-19T07:34:19.000Z | 2020-12-19T07:34:19.000Z | returns/context/requires_context_result.py | MichaelAOlson/returns | 56e0df46846890b1c33dd26216086f94269292ad | [
"BSD-2-Clause"
] | null | null | null | returns/context/requires_context_result.py | MichaelAOlson/returns | 56e0df46846890b1c33dd26216086f94269292ad | [
"BSD-2-Clause"
] | null | null | null | from __future__ import annotations
from typing import TYPE_CHECKING, Any, Callable, ClassVar, TypeVar
from typing_extensions import final
from returns.context import NoDeps
from returns.interfaces.specific import reader_result
from returns.primitives.container import BaseContainer
from returns.primitives.hkt import ... | 33.304207 | 80 | 0.596492 | 19,323 | 0.93883 | 0 | 0 | 19,330 | 0.93917 | 0 | 0 | 14,372 | 0.69828 |
acd72b70de8a62feaf26ad1334f4a7736fd2cbd8 | 86,104 | py | Python | save.py | brunnatorino/FEC_app | d9dec2ae0e4a3eb2f44976b1429596c657073a31 | [
"MIT"
] | null | null | null | save.py | brunnatorino/FEC_app | d9dec2ae0e4a3eb2f44976b1429596c657073a31 | [
"MIT"
] | null | null | null | save.py | brunnatorino/FEC_app | d9dec2ae0e4a3eb2f44976b1429596c657073a31 | [
"MIT"
] | null | null | null | import pandas as pd
from gooey import Gooey, GooeyParser
import numpy as np
import xlsxwriter
import xlrd
@Gooey(program_name="FEC FILE FOR FRANCE", required_cols= 4,default_size=(710, 700),navigation='TABBED', header_bg_color = '#48a7fa')
def parse_args():
parser = GooeyParser()
FilesGL = par... | 75.99647 | 246 | 0.653315 | 0 | 0 | 0 | 0 | 1,353 | 0.015609 | 0 | 0 | 54,440 | 0.628035 |
acd798e93b86e3f13ffd93fb336c588b276e8edf | 25,479 | py | Python | kits21/annotation/postprocessing.py | bakry230/kits21 | 7961ec1210d7fa18de5ef1d406609025313baf59 | [
"MIT"
] | null | null | null | kits21/annotation/postprocessing.py | bakry230/kits21 | 7961ec1210d7fa18de5ef1d406609025313baf59 | [
"MIT"
] | null | null | null | kits21/annotation/postprocessing.py | bakry230/kits21 | 7961ec1210d7fa18de5ef1d406609025313baf59 | [
"MIT"
] | null | null | null | """Code for turning user delineations into dense segmentations."""
import json
import numpy as np
import nibabel as nib
from PIL import Image, ImageDraw
from numpy.core.fromnumeric import cumsum
import torch
import torch.nn.functional
from scipy import signal
from skimage import measure
import cv2
#pylint: disable=no... | 33.972 | 125 | 0.548059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,537 | 0.099572 |
acd7b158a80820d009b00a99ec78dd68591f2b96 | 458 | py | Python | Programs/Evernote/PackMemo/PackMemo.py | Psiphonc/EasierLife | ad9143a6362d70489ef4b36651ce58a3cc1d0fa3 | [
"MIT"
] | 203 | 2016-04-02T07:43:47.000Z | 2022-01-05T11:41:03.000Z | Programs/Evernote/PackMemo/PackMemo.py | Psiphonc/EasierLife | ad9143a6362d70489ef4b36651ce58a3cc1d0fa3 | [
"MIT"
] | 4 | 2016-05-13T11:20:09.000Z | 2018-09-23T01:12:07.000Z | Programs/Evernote/PackMemo/PackMemo.py | Psiphonc/EasierLife | ad9143a6362d70489ef4b36651ce58a3cc1d0fa3 | [
"MIT"
] | 169 | 2016-04-26T03:20:04.000Z | 2022-03-09T18:36:19.000Z | from EvernoteController import EvernoteController
from Memo import Memo
MEMO_NAME = 'Memo'
MEMO_DIR = 'Memo'
MEMO_STORAGE_DIR = 'S-Memo'
def f(fn, *args, **kwargs):
try:
fn(*args, **kwargs)
except:
pass
m = Memo()
e = EvernoteController()
f(e.create_notebook, MEMO_DIR)
f(e.cre... | 22.9 | 57 | 0.676856 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.063319 |
acd8698ede161e1968a17fca40892216abee09bb | 128 | py | Python | files/build_trigger.py | vexingcodes/vexing.codes-infra | ace315c7fb868f37914573aca353b5454ba7433c | [
"MIT"
] | null | null | null | files/build_trigger.py | vexingcodes/vexing.codes-infra | ace315c7fb868f37914573aca353b5454ba7433c | [
"MIT"
] | null | null | null | files/build_trigger.py | vexingcodes/vexing.codes-infra | ace315c7fb868f37914573aca353b5454ba7433c | [
"MIT"
] | null | null | null | import boto3
def handler(event, _):
boto3.client('codebuild').start_build(
projectName=event['Records'][0]['customData'])
| 25.6 | 50 | 0.71875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.25 |
acd881563c9bf3502bbf14ea75fc78f8d4ff68b7 | 6,173 | py | Python | process/scene/menu.py | Koishilll/pyFuujinrokuDestiny | 2b904e15c93195d50e74a66e5bd40d33c3c64a92 | [
"MIT"
] | 3 | 2021-06-13T00:22:21.000Z | 2021-06-13T11:58:35.000Z | process/scene/menu.py | Koishilll/pyFuujinrokuDestiny | 2b904e15c93195d50e74a66e5bd40d33c3c64a92 | [
"MIT"
] | null | null | null | process/scene/menu.py | Koishilll/pyFuujinrokuDestiny | 2b904e15c93195d50e74a66e5bd40d33c3c64a92 | [
"MIT"
] | 2 | 2021-06-14T08:09:42.000Z | 2021-06-15T11:41:15.000Z | # menu.py
# 维护暂停界面
import pygame
from pygame.locals import *
import sys
from utility import globe
from process.scene import menu_confirm
from PIL import Image, ImageFilter
class Pause_Menu(object):
# 暂停页面
def __init__(self):
self.button_rect = []
self.rs = globe.destiny.rsManager.image
... | 39.06962 | 84 | 0.491657 | 6,276 | 0.970465 | 0 | 0 | 0 | 0 | 0 | 0 | 750 | 0.115973 |
acd8f0f4ddc149972cebacdb480ed672f1f25c59 | 602 | py | Python | setup.py | LSSTDESC/sn_simulation | 927d6034bde1b729e96f581804c2bbca93d73548 | [
"BSD-3-Clause"
] | null | null | null | setup.py | LSSTDESC/sn_simulation | 927d6034bde1b729e96f581804c2bbca93d73548 | [
"BSD-3-Clause"
] | null | null | null | setup.py | LSSTDESC/sn_simulation | 927d6034bde1b729e96f581804c2bbca93d73548 | [
"BSD-3-Clause"
] | 2 | 2020-04-22T08:20:02.000Z | 2021-03-06T18:40:52.000Z | from setuptools import setup
# get the version here
pkg_vars = {}
with open("version.py") as fp:
exec(fp.read(), pkg_vars)
setup(
name='sn_simulation',
version= pkg_vars['__version__'],
description='Simulations for supernovae',
url='http://github.com/lsstdesc/sn_simulation',
author='Philippe... | 23.153846 | 51 | 0.644518 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 266 | 0.44186 |
acd9840ea3a2e447f7b6fdbc4e46bfc1b2de17cc | 1,059 | py | Python | test/src/testing/universal/uart.py | Jcc99/Adafruit_Blinka | 41f8155bab83039ed9d45276addd3d501e83f3e6 | [
"MIT"
] | 294 | 2018-06-30T19:08:27.000Z | 2022-03-26T21:08:47.000Z | test/src/testing/universal/uart.py | Jcc99/Adafruit_Blinka | 41f8155bab83039ed9d45276addd3d501e83f3e6 | [
"MIT"
] | 421 | 2018-06-30T20:54:46.000Z | 2022-03-31T15:08:37.000Z | test/src/testing/universal/uart.py | Jcc99/Adafruit_Blinka | 41f8155bab83039ed9d45276addd3d501e83f3e6 | [
"MIT"
] | 234 | 2018-07-23T18:49:16.000Z | 2022-03-28T16:59:48.000Z | import gc
from unittest import TestCase
from testing import await_true
gc.collect()
class TestGPSInteractive(TestCase):
def test_read_value(self):
import adafruit_blinka
adafruit_blinka.patch_system() # needed before adafruit_gps imports time
import microcontroller.pin
gc.coll... | 25.214286 | 81 | 0.636449 | 971 | 0.916903 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.164306 |
acda34b0ee62fcb18b11289e0bca2b9de4cb05fb | 678 | py | Python | atividade064.py | henrikysena/Atividades_CursosEmVideo_Python | 2890c67ea4be2cde6f42c2489d4c96b47d7b597e | [
"MIT"
] | null | null | null | atividade064.py | henrikysena/Atividades_CursosEmVideo_Python | 2890c67ea4be2cde6f42c2489d4c96b47d7b597e | [
"MIT"
] | null | null | null | atividade064.py | henrikysena/Atividades_CursosEmVideo_Python | 2890c67ea4be2cde6f42c2489d4c96b47d7b597e | [
"MIT"
] | null | null | null | """Exercício Python 64:
Crie um programa que leia vários números inteiros pelo teclado.
O programa só vai parar quando o usuário digitar o valor 999, que é a condição de parada.
No final, mostre quantos números foram digitados e qual foi a soma entre eles
(desconsiderando o flag (999))."""
q = 0
s = 0
print('[Digit... | 27.12 | 95 | 0.687316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 539 | 0.777778 |
acda4ed5bc757596386a66d5ba62a7fb43391ce1 | 25,202 | pyw | Python | AutoElectsysConfig.pyw | gousaiyang/AutoElectsys | 9db0580f0b323b7f8f83f3ae79ebaac10b6deca7 | [
"MIT"
] | 3 | 2019-09-20T21:20:40.000Z | 2019-09-22T12:42:39.000Z | AutoElectsysConfig.pyw | gousaiyang/AutoElectsys | 9db0580f0b323b7f8f83f3ae79ebaac10b6deca7 | [
"MIT"
] | 1 | 2019-09-22T12:38:58.000Z | 2019-09-27T05:53:05.000Z | AutoElectsysConfig.pyw | gousaiyang/AutoElectsys | 9db0580f0b323b7f8f83f3ae79ebaac10b6deca7 | [
"MIT"
] | null | null | null | import base64
import contextlib
import os
import re
import sys
import tkinter as tk
from tkinter import messagebox, ttk
from AutoElectsysUtil import (config_file_name, course_rounds, file_read_json, file_read_lines, file_write_json,
file_write_lines, first_categories, general_val... | 41.314754 | 113 | 0.59281 | 25,818 | 0.971624 | 0 | 0 | 0 | 0 | 0 | 0 | 4,042 | 0.152115 |
acda9d18d103c562e1efc9480f044e24f35cf4ad | 1,746 | py | Python | src/masonite/presets/React.py | cercos/masonite | f7f220efa7fae833683e9f07ce13c3795a87d3b8 | [
"MIT"
] | 1,816 | 2018-02-14T01:59:51.000Z | 2022-03-31T17:09:20.000Z | src/masonite/presets/React.py | cercos/masonite | f7f220efa7fae833683e9f07ce13c3795a87d3b8 | [
"MIT"
] | 340 | 2018-02-11T00:27:26.000Z | 2022-03-21T12:00:24.000Z | src/masonite/presets/React.py | cercos/masonite | f7f220efa7fae833683e9f07ce13c3795a87d3b8 | [
"MIT"
] | 144 | 2018-03-18T00:08:16.000Z | 2022-02-26T01:51:58.000Z | """React Preset"""
import shutil
import os
from .Preset import Preset
from ..utils.filesystem import make_directory
from ..utils.location import resources_path, views_path
class React(Preset):
"""
Configure the front-end scaffolding for the application to use ReactJS
Will also remove Vue as Vue and Reac... | 28.622951 | 86 | 0.612829 | 1,570 | 0.899198 | 0 | 0 | 0 | 0 | 0 | 0 | 675 | 0.386598 |
acde47f7cdaa571a2abde3c7a22b637d977809a6 | 1,445 | py | Python | apps/credit_card/models.py | code-yeongyu/backend | cafad5a1cae47ab86ca71028379b72837ea4543d | [
"MIT"
] | 1 | 2021-07-09T01:27:16.000Z | 2021-07-09T01:27:16.000Z | apps/credit_card/models.py | code-yeongyu/backend | cafad5a1cae47ab86ca71028379b72837ea4543d | [
"MIT"
] | 10 | 2021-07-08T04:26:55.000Z | 2021-07-20T14:01:58.000Z | apps/credit_card/models.py | code-yeongyu/pangpang-eats-backend | cafad5a1cae47ab86ca71028379b72837ea4543d | [
"MIT"
] | 3 | 2021-07-08T04:06:59.000Z | 2021-10-02T04:32:16.000Z | from django.db import models
from django.core.validators import MinLengthValidator
from apps.user.models import User
from pangpangeats.settings import AUTH_USER_MODEL
from apps.common.models import BaseModel
from apps.common.validators import numeric_validator
class CreditCard(BaseModel):
owner: User = models.For... | 39.054054 | 111 | 0.673356 | 1,182 | 0.817993 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.134256 |
acdeb5274d2c50da87f81181774349ab7a26267b | 13,450 | py | Python | simpleoncall/views.py | simpleoncall/simpleoncall | ffc247045c7ce357871899c84fdfc61f4add06a9 | [
"MIT"
] | 1 | 2016-01-11T21:37:44.000Z | 2016-01-11T21:37:44.000Z | simpleoncall/views.py | simpleoncall/simpleoncall | ffc247045c7ce357871899c84fdfc61f4add06a9 | [
"MIT"
] | 48 | 2015-01-04T16:04:20.000Z | 2015-01-25T20:53:49.000Z | simpleoncall/views.py | simpleoncall/simpleoncall | ffc247045c7ce357871899c84fdfc61f4add06a9 | [
"MIT"
] | null | null | null | import contextlib
import datetime
import json
import StringIO
from django.contrib.auth import logout as logout_user
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpResponseRedirect, JsonResponse, Http404,... | 34.311224 | 118 | 0.667658 | 0 | 0 | 0 | 0 | 10,252 | 0.76223 | 0 | 0 | 1,778 | 0.132193 |
acdf3e55cd2c8792fb197a984b6a2c5d5f92f167 | 1,302 | py | Python | scraper/scraper3.py | SebChw/IsMusicANaturalLanguage | 9cb245f9bea6c0f93863920fceeea867efa73ded | [
"MIT"
] | null | null | null | scraper/scraper3.py | SebChw/IsMusicANaturalLanguage | 9cb245f9bea6c0f93863920fceeea867efa73ded | [
"MIT"
] | null | null | null | scraper/scraper3.py | SebChw/IsMusicANaturalLanguage | 9cb245f9bea6c0f93863920fceeea867efa73ded | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
import os
""" This script download all songs with given genre from midiworld.com
"""
genre_name = input(
"type in genre name (lowercase, no space, no special characters): ")
# Just in case someone don't respect the rules.
genre_name = genre_name.lower()
genre_name = g... | 35.189189 | 95 | 0.635177 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 533 | 0.40937 |
ace23c42ac6cd6ba7edc32ab86732664871dda3e | 23,446 | py | Python | imageset-viewer.py | its-jd/imageset-viewer | 53998bbcdfe1aad91664ff791c489b3f59a501f9 | [
"MIT"
] | 53 | 2018-05-17T06:12:07.000Z | 2022-03-28T10:41:24.000Z | imageset-viewer.py | its-jd/imageset-viewer | 53998bbcdfe1aad91664ff791c489b3f59a501f9 | [
"MIT"
] | 7 | 2020-06-09T15:33:32.000Z | 2021-11-12T14:20:54.000Z | imageset-viewer.py | its-jd/imageset-viewer | 53998bbcdfe1aad91664ff791c489b3f59a501f9 | [
"MIT"
] | 18 | 2019-05-30T15:22:40.000Z | 2022-01-06T15:34:30.000Z | #!/usr/bin/env python
# coding: utf-8
__author__ = 'Zhuo Zhang'
__copyright__ = 'Copyright 2017-2020, Zhuo Zhang'
__license__ = 'MIT'
__version__ = '0.5'
__email__ = '[email protected]'
__status__ = 'Development'
__description__ = 'Tkinter based GUI, visualizing PASCAL VOC object detection annotation'
"""
Changelog:... | 38.753719 | 149 | 0.612258 | 16,402 | 0.697245 | 0 | 0 | 609 | 0.025888 | 0 | 0 | 7,416 | 0.315253 |
ace2b1a29a3abb15aedb474de4948707e3d81eeb | 416 | py | Python | erpnext_feature_board/hook_events/review_request.py | akurungadam/erpnext_feature_board | 8c99b4dfaa79d86d8e8b46fa1bf235d0bfa471e0 | [
"MIT"
] | 15 | 2021-05-31T16:29:22.000Z | 2021-12-02T20:18:32.000Z | erpnext_feature_board/hook_events/review_request.py | akurungadam/erpnext_feature_board | 8c99b4dfaa79d86d8e8b46fa1bf235d0bfa471e0 | [
"MIT"
] | 18 | 2021-06-01T07:39:08.000Z | 2021-07-14T09:02:35.000Z | erpnext_feature_board/hook_events/review_request.py | akurungadam/erpnext_feature_board | 8c99b4dfaa79d86d8e8b46fa1bf235d0bfa471e0 | [
"MIT"
] | 6 | 2021-06-01T07:19:53.000Z | 2021-12-28T20:06:25.000Z | import frappe
def delete_approved_build_requests():
"""
Scheduled hook to delete approved Review Requests for changing site deployments.
"""
approved_build_requests = frappe.get_all(
"Review Request",
filters={
"request_type": ["in", ["Build", "Upgrade", "Delete"]],
"request_status": "Approved",
},
... | 21.894737 | 81 | 0.71875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.456731 |
ace31bc75f6c304a3efff0e6911ae27ee2b4ecee | 1,064 | py | Python | DataProcessor/dev_set_partition.py | cherry979988/feedforward-RE | 546a608a8cb5b35c475e577995df70a89affa15e | [
"MIT"
] | 1 | 2019-08-25T00:44:27.000Z | 2019-08-25T00:44:27.000Z | DataProcessor/dev_set_partition.py | cherry979988/feedforward-RE | 546a608a8cb5b35c475e577995df70a89affa15e | [
"MIT"
] | null | null | null | DataProcessor/dev_set_partition.py | cherry979988/feedforward-RE | 546a608a8cb5b35c475e577995df70a89affa15e | [
"MIT"
] | null | null | null | __author__ = 'QinyuanYe'
import sys
import random
from shutil import copyfile
# split the original train set into
# 90% train-set (train_split.json) and 10% dev-set (dev.json)
if __name__ == "__main__":
random.seed(1234)
if len(sys.argv) != 3:
print 'Usage:feature_generation.py -DATA -ratio'
... | 24.744186 | 67 | 0.640038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 283 | 0.265977 |
ace6e11dd2c37cb4d2255b5a7148639ad40c246e | 717 | py | Python | NetCatKS/Logger/api/implementers/__init__.py | dimddev/NetCatKS-CP | 2d9e72b2422e344569fd4eb154866b98e9707561 | [
"BSD-2-Clause"
] | null | null | null | NetCatKS/Logger/api/implementers/__init__.py | dimddev/NetCatKS-CP | 2d9e72b2422e344569fd4eb154866b98e9707561 | [
"BSD-2-Clause"
] | null | null | null | NetCatKS/Logger/api/implementers/__init__.py | dimddev/NetCatKS-CP | 2d9e72b2422e344569fd4eb154866b98e9707561 | [
"BSD-2-Clause"
] | null | null | null | __author__ = 'dimd'
from twisted.python import log
from zope.interface import implementer
from NetCatKS.Logger.api.interfaces import ILogger
GLOBAL_DEBUG = True
@implementer(ILogger)
class Logger(object):
def __init__(self):
pass
def debug(self, msg):
if GLOBAL_DEBUG is True:
... | 19.378378 | 55 | 0.563459 | 500 | 0.69735 | 0 | 0 | 522 | 0.728033 | 0 | 0 | 128 | 0.178522 |
ace7ab1c03480ac4b4f41e3fb954c1d488666de5 | 247 | py | Python | trustpayments/models/failure_category.py | TrustPayments/python-sdk | 6fde6eb8cfce270c3612a2903a845c13018c3bb9 | [
"Apache-2.0"
] | 2 | 2020-01-16T13:24:06.000Z | 2020-11-21T17:40:17.000Z | postfinancecheckout/models/failure_category.py | pfpayments/python-sdk | b8ef159ea3c843a8d0361d1e0b122a9958adbcb4 | [
"Apache-2.0"
] | 4 | 2019-10-14T17:33:23.000Z | 2021-10-01T14:49:11.000Z | postfinancecheckout/models/failure_category.py | pfpayments/python-sdk | b8ef159ea3c843a8d0361d1e0b122a9958adbcb4 | [
"Apache-2.0"
] | 2 | 2019-10-15T14:17:10.000Z | 2021-09-17T13:07:09.000Z | # coding: utf-8
from enum import Enum, unique
@unique
class FailureCategory(Enum):
TEMPORARY_ISSUE = "TEMPORARY_ISSUE"
INTERNAL = "INTERNAL"
END_USER = "END_USER"
CONFIGURATION = "CONFIGURATION"
DEVELOPER = "DEVELOPER"
| 17.642857 | 39 | 0.688259 | 189 | 0.765182 | 0 | 0 | 197 | 0.797571 | 0 | 0 | 78 | 0.315789 |
ace8a1d4982694d6c21b44de13de44e692abcb9d | 20,146 | py | Python | func_moead.py | dynamic-sevn/moead_svm | 0f119d5c0b840d1897b7c8067c4563285fd70031 | [
"BSD-2-Clause"
] | 1 | 2021-07-31T08:54:49.000Z | 2021-07-31T08:54:49.000Z | func_moead.py | dynamic-sevn/moead_svm | 0f119d5c0b840d1897b7c8067c4563285fd70031 | [
"BSD-2-Clause"
] | null | null | null | func_moead.py | dynamic-sevn/moead_svm | 0f119d5c0b840d1897b7c8067c4563285fd70031 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Author: Xi Lin <[email protected]>
website: http://www.cs.cityu.edu.hk/~xilin4/
github:
This code is a demo for this paper:
A Decomposition based Multiobjective Evolutionary Algorithm
with Classification
Xi Lin, Qingfu Zhang, Sam Kwong
Proceedings of the... | 30.570561 | 112 | 0.563983 | 2,385 | 0.118374 | 0 | 0 | 0 | 0 | 0 | 0 | 9,264 | 0.459797 |
ace927c4fc1e25bbda7ec5e5f7a33fa84304d5ec | 9,388 | py | Python | videoServer.py | Hugoargui/eyeDetector | 8c0361f90dacc2e5d8262cca40b34165fdda841a | [
"MIT"
] | null | null | null | videoServer.py | Hugoargui/eyeDetector | 8c0361f90dacc2e5d8262cca40b34165fdda841a | [
"MIT"
] | null | null | null | videoServer.py | Hugoargui/eyeDetector | 8c0361f90dacc2e5d8262cca40b34165fdda841a | [
"MIT"
] | 3 | 2015-04-11T15:23:22.000Z | 2021-02-09T07:19:07.000Z | ## MIT LICENSE
#Copyright (c) 2014 Hugo Arguinariz.
#http://www.hugoargui.com
#
#Permission is hereby granted, free of charge, to any person
#obtaining a copy of this software and associated documentation
#files (the "Software"), to deal in the Software without
#restriction, including without limitation the rights to u... | 46.246305 | 132 | 0.586387 | 3,630 | 0.386664 | 0 | 0 | 0 | 0 | 0 | 0 | 5,991 | 0.638155 |
aceafae6150c02010849d9e6e9cb7de3fd751523 | 733 | py | Python | Dataset/Leetcode/valid/78/302.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/valid/78/302.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/valid/78/302.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution:
def XXX(self, nums: List[int]) -> List[List[int]]:
final = list()
# ----------------------------------------------------
if len(nums)==1:
return [[],nums]
if len(nums)==0:
return []
# ----------------------------------------------------... | 29.32 | 64 | 0.317872 | 731 | 0.997271 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.150068 |
aceb29154c2185e704bf568b3d023bfe66de4e73 | 1,203 | py | Python | ems/utils.py | EMSTrack/EMS-Simulator | 50b0dd60bfa7c5c115fc011e830d275b4eb07ab5 | [
"MIT"
] | 1 | 2020-07-15T00:16:48.000Z | 2020-07-15T00:16:48.000Z | ems/utils.py | EMSTrack/Algorithms | 139160619a935001582a60d3f43c0e33082bce99 | [
"BSD-3-Clause"
] | 40 | 2018-12-06T23:13:52.000Z | 2019-07-11T01:24:13.000Z | ems/utils.py | EMSTrack/Algorithms | 139160619a935001582a60d3f43c0e33082bce99 | [
"BSD-3-Clause"
] | 1 | 2020-04-23T11:17:43.000Z | 2020-04-23T11:17:43.000Z | import pandas as pd
def parse_headered_csv (file: str, desired_keys: list):
"""
Takes a headered CSV file and extracts the columns with the desired keys
:param file: CSV filename
:param desired_keys: Names of columns to extract
:return: pandas dataframe
"""
if file is None:
return... | 25.0625 | 84 | 0.670823 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 565 | 0.469659 |
aced99ea255c2f32d779a17cbc4d6da0683b14ec | 660 | py | Python | plenum/test/bls/test_send_txns_no_bls.py | steptan/indy-plenum | 488bf63c82753a74a92ac6952da784825ffd4a3d | [
"Apache-2.0"
] | null | null | null | plenum/test/bls/test_send_txns_no_bls.py | steptan/indy-plenum | 488bf63c82753a74a92ac6952da784825ffd4a3d | [
"Apache-2.0"
] | null | null | null | plenum/test/bls/test_send_txns_no_bls.py | steptan/indy-plenum | 488bf63c82753a74a92ac6952da784825ffd4a3d | [
"Apache-2.0"
] | null | null | null | from plenum.test.bls.helper import check_bls_multi_sig_after_send
from plenum.test.pool_transactions.conftest import looper, clientAndWallet1, \
client1, wallet1, client1Connected
nodeCount = 4
nodes_wth_bls = 0
def test_each_node_has_bls(txnPoolNodeSet):
for node in txnPoolNodeSet:
assert node.bls_b... | 33 | 78 | 0.689394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
acee87269de38c5afcc9577b696b2d9e96852134 | 149 | py | Python | Questoes/b1_q09_piso.py | viniciusm0raes/python | c4d4f1a08d1e4de105109e1f67fae9fcc20d7fce | [
"MIT"
] | null | null | null | Questoes/b1_q09_piso.py | viniciusm0raes/python | c4d4f1a08d1e4de105109e1f67fae9fcc20d7fce | [
"MIT"
] | null | null | null | Questoes/b1_q09_piso.py | viniciusm0raes/python | c4d4f1a08d1e4de105109e1f67fae9fcc20d7fce | [
"MIT"
] | null | null | null | metros = float(input('Quantos metros de piso vc deseja? '))
preco = 70
total = metros*preco
print('O preço total do pedido é: R$ %.2f' % (total))
| 18.625 | 59 | 0.66443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.490066 |
acf0e5f93f43919ca8a537e46d570aa00d8144da | 1,639 | py | Python | backend/serv/online_data.py | Alliance-Of-Independent-Programmers/acc-book | 3a0f9fa1092d7eee54102e787e2233607c6922cf | [
"MIT"
] | null | null | null | backend/serv/online_data.py | Alliance-Of-Independent-Programmers/acc-book | 3a0f9fa1092d7eee54102e787e2233607c6922cf | [
"MIT"
] | 1 | 2021-11-02T22:22:57.000Z | 2021-11-02T22:22:57.000Z | backend/serv/online_data.py | Alliance-Of-Independent-Programmers/acc-book | 3a0f9fa1092d7eee54102e787e2233607c6922cf | [
"MIT"
] | null | null | null | import base64
import os.path
path=os.path.dirname(__file__)
misha = base64.b64encode(open(os.path.join(path, "../Pics/Miahs.jpg"), "rb").read()).decode("UTF-8")
yaroslav = base64.b64encode(open(os.path.join(path, "../Pics/Yaroslav.jpg"), "rb").read()).decode("UTF-8")
goblin = base64.b64encode(open(os.path.join(path, ... | 21.565789 | 106 | 0.594875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 459 | 0.280049 |
acf0ea081196fdcaa8448d959385eacc3ae88049 | 202 | py | Python | profiles_api/serializers.py | parth-singh71/profiles-rest-api | c415d2fd6c1c6c51674bca601644bcedb67cf72c | [
"MIT"
] | null | null | null | profiles_api/serializers.py | parth-singh71/profiles-rest-api | c415d2fd6c1c6c51674bca601644bcedb67cf72c | [
"MIT"
] | 4 | 2020-04-15T07:14:27.000Z | 2021-06-04T22:31:09.000Z | profiles_api/serializers.py | parth-singh71/profiles-rest-api | c415d2fd6c1c6c51674bca601644bcedb67cf72c | [
"MIT"
] | null | null | null | from rest_framework import serializers
class HelloSerializer(serializers.Serializer):
"""Serializers a name field for testing our APIView"""
name = serializers.CharField(max_length= 10)
| 25.25 | 58 | 0.757426 | 154 | 0.762376 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.267327 |
acf0f05dd07e3d68609ccda5295083be48e3b3c9 | 7,116 | py | Python | xpsi/PostProcessing/_cache.py | DevarshiChoudhury/xpsi | 200b82b4ef4a4e7342fc30dd03c5821cff0031c2 | [
"MIT"
] | 14 | 2019-09-26T12:08:06.000Z | 2021-05-11T15:26:10.000Z | xpsi/PostProcessing/_cache.py | DevarshiChoudhury/xpsi | 200b82b4ef4a4e7342fc30dd03c5821cff0031c2 | [
"MIT"
] | 13 | 2020-01-10T11:03:28.000Z | 2021-10-04T14:44:01.000Z | xpsi/PostProcessing/_cache.py | DevarshiChoudhury/xpsi | 200b82b4ef4a4e7342fc30dd03c5821cff0031c2 | [
"MIT"
] | 9 | 2020-03-04T13:28:05.000Z | 2021-09-28T09:00:50.000Z | from __future__ import division, print_function
from .. import __version__
from ._global_imports import *
try:
import h5py
except ImportError:
print('Install h5py to enable signal caching.')
raise
class _Cache(object):
""" Cache numerical model objects computed during likelihood evaluation.
:pa... | 32.199095 | 77 | 0.51068 | 6,902 | 0.969927 | 1,791 | 0.251686 | 3,813 | 0.535835 | 0 | 0 | 1,899 | 0.266863 |
acf119e7c277821bbc64ba71171fddd1c61cd7ed | 1,234 | py | Python | multiprocessingTest.py | lakshay1296/python-multiprocessing-sample | c42788686168b95b3d98edb417d9071ef3e7eccd | [
"Unlicense"
] | null | null | null | multiprocessingTest.py | lakshay1296/python-multiprocessing-sample | c42788686168b95b3d98edb417d9071ef3e7eccd | [
"Unlicense"
] | null | null | null | multiprocessingTest.py | lakshay1296/python-multiprocessing-sample | c42788686168b95b3d98edb417d9071ef3e7eccd | [
"Unlicense"
] | null | null | null | from multiprocessing import Process, Manager
''' Custom Module Imports '''
from calculator.add import addition
from calculator.subtract import subtraction
from calculator.multiply import multiplication
from calculator.divide import division
class Main:
def __init__(self) -> None:
pass
d... | 28.697674 | 57 | 0.508914 | 901 | 0.730146 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.031605 |
acf4266847f871c1b8280d08536c0e7db9ac800b | 1,797 | py | Python | migrations/d7cd5138bb9b_minor_fixes.py | szkkteam/agrosys | a390332202f7200632d2ff3816e1b0f3cc76f586 | [
"MIT"
] | null | null | null | migrations/d7cd5138bb9b_minor_fixes.py | szkkteam/agrosys | a390332202f7200632d2ff3816e1b0f3cc76f586 | [
"MIT"
] | null | null | null | migrations/d7cd5138bb9b_minor_fixes.py | szkkteam/agrosys | a390332202f7200632d2ff3816e1b0f3cc76f586 | [
"MIT"
] | null | null | null | """minor fixes
Revision ID: d7cd5138bb9b
Revises: 0fed690a57ce
Create Date: 2020-09-18 07:56:14.159782
"""
from alembic import op
import geoalchemy2
import sqlalchemy as sa
import backend
# revision identifiers, used by Alembic.
revision = 'd7cd5138bb9b'
down_revision = '0fed690a57ce'
branch_labels = ()
depends_on ... | 36.673469 | 148 | 0.71675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 771 | 0.429048 |
acf4e2b582ea3797ec2204138be8231ebbf6a6c6 | 8,883 | py | Python | creation/bundles.py | jim-bo/silp2 | 1186a84b2570af0e4ed305ddfff8f931e012eadf | [
"MIT"
] | 1 | 2018-01-29T05:00:43.000Z | 2018-01-29T05:00:43.000Z | creation/bundles.py | jim-bo/silp2 | 1186a84b2570af0e4ed305ddfff8f931e012eadf | [
"MIT"
] | 1 | 2016-01-31T13:13:10.000Z | 2016-02-02T14:16:05.000Z | creation/bundles.py | jim-bo/silp2 | 1186a84b2570af0e4ed305ddfff8f931e012eadf | [
"MIT"
] | null | null | null | #!/usr/bin/python
'''
creates bundle graph from filtered multigraph
'''
### imports ###
import sys
import os
import logging
import networkx as nx
import numpy as np
import scipy.stats as stats
import cPickle
import helpers.io as io
import helpers.misc as misc
### definitions ###
### functions ###
def compress_edg... | 29.808725 | 181 | 0.501745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,376 | 0.267477 |
acf541af1bb3ebd0a182c3839d64f9ce9a19e679 | 903 | py | Python | ParadoxTrading/EngineExt/Futures/__init__.py | yutiansut/ParadoxTrading | b915d1491663443bedbb048017abeed3f7dcd4e2 | [
"MIT"
] | 2 | 2018-01-25T08:33:59.000Z | 2018-05-14T13:59:54.000Z | ParadoxTrading/EngineExt/Futures/__init__.py | yutiansut/ParadoxTrading | b915d1491663443bedbb048017abeed3f7dcd4e2 | [
"MIT"
] | null | null | null | ParadoxTrading/EngineExt/Futures/__init__.py | yutiansut/ParadoxTrading | b915d1491663443bedbb048017abeed3f7dcd4e2 | [
"MIT"
] | null | null | null | from .Arbitrage import ArbitrageEqualFundSimplePortfolio, \
ArbitrageEqualFundVolatilityPortfolio, ArbitrageStrategy
from .BacktestEngine import BacktestEngine
from .BacktestMarketSupply import BacktestMarketSupply
from .BarBacktestExecution import BarBacktestExecution
from .BarPortfolio import BarPortfolio
from .I... | 53.117647 | 69 | 0.890365 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
acf75d195a7f9454dff3256ac3c4f362cd91d9cd | 529 | py | Python | core/network/Swin_T/__init__.py | ViTAE-Transformer/ViTAE-Transformer-Matting | 5cd1574cd46009a4e9660cabdc008718e20bc381 | [
"MIT"
] | 8 | 2022-03-31T05:58:45.000Z | 2022-03-31T13:24:18.000Z | core/network/Swin_T/__init__.py | ViTAE-Transformer/ViTAE-Transformer-Matting | 5cd1574cd46009a4e9660cabdc008718e20bc381 | [
"MIT"
] | null | null | null | core/network/Swin_T/__init__.py | ViTAE-Transformer/ViTAE-Transformer-Matting | 5cd1574cd46009a4e9660cabdc008718e20bc381 | [
"MIT"
] | null | null | null | from .swin_stem_pooling5_transformer import swin_stem_pooling5_encoder
from .swin_stem_pooling5_transformer import SwinStemPooling5TransformerMatting
from .decoder import SwinStemPooling5TransformerDecoderV1
__all__ = ['p3mnet_swin_t']
def p3mnet_swin_t(pretrained=True, img_size=512, **kwargs):
encoder = swin_... | 35.266667 | 92 | 0.835539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.028355 |
acf995ba4adee5652bf497dcac8aaaa0df89b254 | 702 | py | Python | tests/test_day22.py | arcadecoffee/advent-2021 | 57d24cd6ba6e2b4d7e68ea492b955b73eaad7b6a | [
"MIT"
] | null | null | null | tests/test_day22.py | arcadecoffee/advent-2021 | 57d24cd6ba6e2b4d7e68ea492b955b73eaad7b6a | [
"MIT"
] | null | null | null | tests/test_day22.py | arcadecoffee/advent-2021 | 57d24cd6ba6e2b4d7e68ea492b955b73eaad7b6a | [
"MIT"
] | null | null | null | """
Tests for Day 22
"""
from day22.module import part_1, part_2, \
FULL_INPUT_FILE, TEST_INPUT_FILE_1, TEST_INPUT_FILE_2, TEST_INPUT_FILE_3
def test_part_1_1():
result = part_1(TEST_INPUT_FILE_1)
assert result == 39
def test_part_1_2():
result = part_1(TEST_INPUT_FILE_2)
assert result == 59078... | 18.972973 | 76 | 0.720798 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.034188 |
acf99b16735919f2fa01bf50bc4e4be9aea749c8 | 1,441 | py | Python | src/kde_crime/kde_test.py | ras9841/UP-STAT-2018 | cad06bfac3c12b4cb14c3b703e23c52cc391383a | [
"MIT"
] | null | null | null | src/kde_crime/kde_test.py | ras9841/UP-STAT-2018 | cad06bfac3c12b4cb14c3b703e23c52cc391383a | [
"MIT"
] | 1 | 2018-05-08T12:16:50.000Z | 2018-05-08T21:28:40.000Z | src/kde_crime/kde_test.py | ras9841/UP-STAT-2018 | cad06bfac3c12b4cb14c3b703e23c52cc391383a | [
"MIT"
] | null | null | null | from spatial_kde import *
from sklearn.model_selection import train_test_split
import pandas as pd
import matplotlib.pyplot as plt
data_loc = "../../data/RPD_crime2011toNow.csv"
data = process_RPD_data(data_loc)
print("Loaded data")
Y = data[["class"]]
X = data[["X", "Y"]]
print("Starting Predictions")
n_trials = 25... | 29.408163 | 76 | 0.605135 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 288 | 0.199861 |
acfb03705c27649ad1f5865c957917038f62a92e | 2,872 | py | Python | setup.py | C0DK/lightbus | be5cc2771b1058f7c927cca870ed75d4cbbe61a3 | [
"Apache-2.0"
] | null | null | null | setup.py | C0DK/lightbus | be5cc2771b1058f7c927cca870ed75d4cbbe61a3 | [
"Apache-2.0"
] | null | null | null | setup.py | C0DK/lightbus | be5cc2771b1058f7c927cca870ed75d4cbbe61a3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE!
# This file has been autogenerated by dephell <3
# https://github.com/dephell/dephell
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os.path
readme = ""
here = os.path.abspath(os.path.dirname(__file__))
readme_p... | 31.56044 | 81 | 0.607591 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,688 | 0.587744 |
acfb6bea34e4f21d414dc262f6f49c3c957210d9 | 5,840 | py | Python | src/skill_algorithms/trueskill_data_processing.py | EllAchE/nba_tipoff | f3820e391d4a6ddb611efeb6c709f16876771684 | [
"MIT"
] | null | null | null | src/skill_algorithms/trueskill_data_processing.py | EllAchE/nba_tipoff | f3820e391d4a6ddb611efeb6c709f16876771684 | [
"MIT"
] | null | null | null | src/skill_algorithms/trueskill_data_processing.py | EllAchE/nba_tipoff | f3820e391d4a6ddb611efeb6c709f16876771684 | [
"MIT"
] | null | null | null | import ENVIRONMENT
from src.database.database_creation import createPlayerTrueSkillDictionary
from src.skill_algorithms.algorithms import trueSkillMatchWithRawNums, trueSkillTipWinProb
from src.skill_algorithms.common_data_processing import beforeMatchPredictions, runAlgoForSeason, runAlgoForAllSeasons
# backlogtodo... | 62.12766 | 291 | 0.738356 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,250 | 0.214041 |
acfbf91315ae8fa759e47178ec90f3b7a692cd5c | 7,881 | py | Python | warp/utils/config_parsing.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/utils/config_parsing.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/utils/config_parsing.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | # std
import datetime
from copy import deepcopy
from collections import deque
import yaml
# from .lazy_loader import LazyLoader as LL
# yaml = LL('yaml', globals(), 'yaml')
# json = LL('json', globals(), 'json')
# types
from typing import Dict, Any, Union, Tuple
__all__ = [
'load_config_file',
'save_config... | 31.398406 | 112 | 0.597005 | 3,904 | 0.495369 | 147 | 0.018652 | 503 | 0.063824 | 0 | 0 | 2,039 | 0.258724 |
acfc23f9ea827b83951d7b7cd523c92769d23ed2 | 5,223 | py | Python | npword2vec/HuffmanTree.py | qiaoxiu/nlp | 790234d559ed9d5cae5b10dd5013ebd8052b6db9 | [
"Apache-2.0"
] | null | null | null | npword2vec/HuffmanTree.py | qiaoxiu/nlp | 790234d559ed9d5cae5b10dd5013ebd8052b6db9 | [
"Apache-2.0"
] | null | null | null | npword2vec/HuffmanTree.py | qiaoxiu/nlp | 790234d559ed9d5cae5b10dd5013ebd8052b6db9 | [
"Apache-2.0"
] | null | null | null | __author__ = 'multiangle'
# 这是实现 霍夫曼树相关的文件, 主要用于 针对层次softmax进行 word2vec 优化方案的一种
'''
至于 为什么要进行层次softmax 可以简单理解 因为词表很大 针对上完个类别单词进行softmax 计算量大 更新参数过多 无法训练,而采用softmax 层次化 只需要 计算几个有限单词的sigmod 就可以 更新参数也非常少
提高训练速度
什么是霍夫曼树 简单理解就是 将训练文本 进行词频统计 通过构建加权最短路径来构造二叉树 这样 词频高的 位置在前 词频低的位置在后 每一个 霍夫曼编码代表一个词 路径 并且是唯一 不是其他词的前缀
'''
impo... | 35.290541 | 118 | 0.573234 | 5,321 | 0.876462 | 0 | 0 | 0 | 0 | 0 | 0 | 2,583 | 0.425465 |
acfe9f4e0aefbb7c974bcb3beaf946d90910c093 | 14,313 | py | Python | grama/fit/fit_scikitlearn.py | Riya-1/py_grama | caafeac418ce0014b477e6feded06ccc1592b94d | [
"MIT"
] | 13 | 2020-02-24T16:51:51.000Z | 2022-03-30T18:56:55.000Z | grama/fit/fit_scikitlearn.py | zdelrosario/py_grama | 43f1a76dc93dd33f02e8a7f8de3323894beefed0 | [
"MIT"
] | 78 | 2019-12-30T19:13:21.000Z | 2022-02-23T18:17:54.000Z | grama/fit/fit_scikitlearn.py | Riya-1/py_grama | caafeac418ce0014b477e6feded06ccc1592b94d | [
"MIT"
] | 7 | 2020-10-19T17:49:25.000Z | 2021-08-15T20:46:52.000Z | __all__ = [
"fit_gp",
"ft_gp",
"fit_lm",
"ft_lm",
"fit_rf",
"ft_rf",
"fit_kmeans",
"ft_kmeans",
]
## Fitting via sklearn package
try:
from sklearn.base import clone
from sklearn.linear_model import LinearRegression
from sklearn.gaussian_process import GaussianProcessRegresso... | 28.915152 | 96 | 0.593866 | 2,291 | 0.160064 | 0 | 0 | 10,080 | 0.704255 | 0 | 0 | 6,800 | 0.475093 |
acfed52bb6497ce5fb06e49460f94e77f3a7ee78 | 7,306 | py | Python | VideoTranscriptClassification/video_indexer.py | MACEL94/media-services-video-indexer | b4076daa7a7cdad456ce696b50f77ce2f21ead22 | [
"MIT"
] | 54 | 2020-01-16T22:18:07.000Z | 2022-03-24T15:58:16.000Z | VideoTranscriptClassification/video_indexer.py | MACEL94/media-services-video-indexer | b4076daa7a7cdad456ce696b50f77ce2f21ead22 | [
"MIT"
] | 10 | 2020-07-19T19:01:31.000Z | 2022-02-09T09:49:00.000Z | VideoTranscriptClassification/video_indexer.py | MACEL94/media-services-video-indexer | b4076daa7a7cdad456ce696b50f77ce2f21ead22 | [
"MIT"
] | 43 | 2020-02-13T05:36:42.000Z | 2022-03-09T15:39:57.000Z | # Original source code: https://github.com/bklim5/python_video_indexer_lib
import os
import re
import time
import datetime
import requests
def get_retry_after_from_message(message):
match = re.search(r'Try again in (\d+) second', message or '')
if match:
return int(match.group(1))
return 30 # ... | 33.668203 | 118 | 0.571722 | 6,952 | 0.951547 | 0 | 0 | 0 | 0 | 0 | 0 | 1,478 | 0.202299 |
acff916c9c13ec45d8705a7c78687da27d11f532 | 92 | py | Python | parameters_8560.py | ksuhr1/CMPS183-hw3 | d0450827912b7ec355a9e433c0c7e33d1b2610a0 | [
"BSD-3-Clause"
] | null | null | null | parameters_8560.py | ksuhr1/CMPS183-hw3 | d0450827912b7ec355a9e433c0c7e33d1b2610a0 | [
"BSD-3-Clause"
] | null | null | null | parameters_8560.py | ksuhr1/CMPS183-hw3 | d0450827912b7ec355a9e433c0c7e33d1b2610a0 | [
"BSD-3-Clause"
] | null | null | null | password="pbkdf2(1000,20,sha512)$b24904a15adb4514$85f395bc9c1f6be8227d9f7540e54127cd4f0fdf"
| 46 | 91 | 0.891304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.891304 |
acffa281e03e8947e11cd40b36de07ec4e8a852d | 3,086 | py | Python | app/__init__.py | calcutec/netbard | 2c30979ad3ca1cee2f81c521942e8bffea6f81b2 | [
"BSD-3-Clause"
] | null | null | null | app/__init__.py | calcutec/netbard | 2c30979ad3ca1cee2f81c521942e8bffea6f81b2 | [
"BSD-3-Clause"
] | 6 | 2015-05-26T14:03:03.000Z | 2015-05-26T20:22:18.000Z | app/__init__.py | calcutec/netbard | 2c30979ad3ca1cee2f81c521942e8bffea6f81b2 | [
"BSD-3-Clause"
] | null | null | null | import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
from flask.ext.mail import Mail
from config import ADMINS, MAIL_SERVER, MAIL_PORT, MAIL_USERNAME, \
MAIL_PASSWORD, SQLALCHEMY_DATABASE_URI
from .momentjs import momentjs
from flask.json import JSON... | 34.674157 | 79 | 0.697343 | 481 | 0.155865 | 0 | 0 | 0 | 0 | 0 | 0 | 741 | 0.240117 |
4a03ee9eb5b9f1623408d903facb0c0ce55d9557 | 2,904 | py | Python | src/knarrow/cli/__main__.py | InCogNiTo124/knarrow | b0a19273a27e68899d982bcc0bf0938c60d3ec26 | [
"Apache-2.0"
] | 2 | 2021-10-10T11:12:53.000Z | 2021-12-14T13:55:30.000Z | src/knarrow/cli/__main__.py | InCogNiTo124/knarrow | b0a19273a27e68899d982bcc0bf0938c60d3ec26 | [
"Apache-2.0"
] | 17 | 2021-09-30T21:51:28.000Z | 2022-03-27T23:33:17.000Z | src/knarrow/cli/__main__.py | InCogNiTo124/knarrow | b0a19273a27e68899d982bcc0bf0938c60d3ec26 | [
"Apache-2.0"
] | null | null | null | from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser
from collections import Counter
from functools import partial
from pathlib import Path
from knarrow import find_knee
def gte_0(value):
x = float(value)
assert x >= 0.0
return x
METHODS = [
"angle",
"c_method",
"distance",
... | 32.629213 | 115 | 0.608471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 701 | 0.241391 |
4a074a679c554390585d0307ad19621a1d2bbeb2 | 2,129 | py | Python | bitmovin_api_sdk/notifications/webhooks/encoding/encodings/encodings_api.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 11 | 2019-07-03T10:41:16.000Z | 2022-02-25T21:48:06.000Z | bitmovin_api_sdk/notifications/webhooks/encoding/encodings/encodings_api.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 8 | 2019-11-23T00:01:25.000Z | 2021-04-29T12:30:31.000Z | bitmovin_api_sdk/notifications/webhooks/encoding/encodings/encodings_api.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 13 | 2020-01-02T14:58:18.000Z | 2022-03-26T12:10:30.000Z | # coding: utf-8
from __future__ import absolute_import
from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase
from bitmovin_api_sdk.common.poscheck import poscheck_except
from bitmovin_api_sdk.notifications.webhooks.encoding.encodings.finished.finished_api import FinishedApi
from bitmovin_api_sdk.notifica... | 35.483333 | 152 | 0.699389 | 1,317 | 0.6186 | 0 | 0 | 1,284 | 0.6031 | 0 | 0 | 69 | 0.03241 |
4a07acc95882ce20e1dbf86d22afb6b05e9a8741 | 12,581 | py | Python | notus/gtk_dbus/gtk_toaster.py | cnheider/notus | f284132e87d7b274c3ea239f216959987e670910 | [
"Apache-2.0"
] | null | null | null | notus/gtk_dbus/gtk_toaster.py | cnheider/notus | f284132e87d7b274c3ea239f216959987e670910 | [
"Apache-2.0"
] | null | null | null | notus/gtk_dbus/gtk_toaster.py | cnheider/notus | f284132e87d7b274c3ea239f216959987e670910 | [
"Apache-2.0"
] | 2 | 2021-02-04T15:04:16.000Z | 2021-02-04T15:05:30.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import GdkPixbuf
import time
import dbus
__author__ = "Christian Heider Nielsen"
__doc__ = (
"Based on the notifications spec at: http://developer.gnome.org/notification-spec/"
)
__version__ = "0.0.1"
EX... | 30.835784 | 111 | 0.642636 | 7,169 | 0.569828 | 0 | 0 | 323 | 0.025674 | 0 | 0 | 6,137 | 0.487799 |
4a0addc7ea0061a30f327c50cf69e8d1c80df2ec | 2,863 | py | Python | get_Exploitdb_CSV_SUPERSEDED.py | NadimKawwa/CybersecurityThreatIdentification | e088dbb861342676337b4c9d385e6abfb6463291 | [
"MIT"
] | 3 | 2021-01-15T10:28:54.000Z | 2021-11-09T17:55:45.000Z | get_Exploitdb_CSV_SUPERSEDED.py | NadimKawwa/CybersecurityThreatIdentification | e088dbb861342676337b4c9d385e6abfb6463291 | [
"MIT"
] | null | null | null | get_Exploitdb_CSV_SUPERSEDED.py | NadimKawwa/CybersecurityThreatIdentification | e088dbb861342676337b4c9d385e6abfb6463291 | [
"MIT"
] | 2 | 2021-02-05T17:35:48.000Z | 2021-04-23T18:56:21.000Z | from time import sleep
from pymongo import MongoClient
from FakePersona import getPage
base_url = "https://www.exploit-db.com"
def getExploitCategories():
#access page as fake persona
soup = getPage(base_url)
#find all list items <li>
categories = soup.find("ul", {"class":"w-nav-list"}).findAll("li",... | 34.083333 | 121 | 0.567586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 677 | 0.236465 |
4a0c17dcadf4678d289fa2db3d23b33230f5a519 | 2,303 | py | Python | example/django_example/polls/tests.py | dmsimard/dynaconf | ec394ab07e3b522879c8be678c65ebeb05fc2b59 | [
"MIT"
] | null | null | null | example/django_example/polls/tests.py | dmsimard/dynaconf | ec394ab07e3b522879c8be678c65ebeb05fc2b59 | [
"MIT"
] | null | null | null | example/django_example/polls/tests.py | dmsimard/dynaconf | ec394ab07e3b522879c8be678c65ebeb05fc2b59 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.test import TestCase
# Create your tests here.
class SettingsTest(TestCase):
def test_settings(self):
self.assertEqual(settings.SERVER, 'prodserver.com')
self.assertEqual(
settings.STATIC_URL, '/changed/in/settings.toml/by/dynaconf/')
... | 46.06 | 74 | 0.696049 | 2,207 | 0.958315 | 0 | 0 | 0 | 0 | 0 | 0 | 656 | 0.284846 |
4a0d70ed28500ae0edbad8023f3ee20304c7c976 | 869 | py | Python | docker/dempcap/pcapminey/core/ThreadPool/Pool.py | JakubOrzol/dockerfiles | d04ead31d053dbe62b1e98b33e3a2852e335b41c | [
"MIT"
] | 203 | 2016-03-02T14:13:34.000Z | 2022-03-30T06:08:56.000Z | docker/dempcap/pcapminey/core/ThreadPool/Pool.py | Axonius/dockerfiles | f2135e9abb468ee8db339ec27b2ba737acbbaef6 | [
"MIT"
] | 7,201 | 2018-12-24T17:14:17.000Z | 2022-03-31T13:39:12.000Z | docker/dempcap/pcapminey/core/ThreadPool/Pool.py | Axonius/dockerfiles | f2135e9abb468ee8db339ec27b2ba737acbbaef6 | [
"MIT"
] | 94 | 2018-12-17T10:59:21.000Z | 2022-03-29T12:59:30.000Z | # -*- coding: utf8 -*-
__author__ = 'Viktor Winkelmann'
from Queue import Queue
from Worker import Worker
class Pool:
def __init__(self, size):
self.size = size
self.workers = []
self.tasks = Queue()
def _removeDeadWorkers(self):
self.workers = [w for w in self.workers if w.is... | 27.15625 | 91 | 0.604143 | 761 | 0.875719 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.118527 |
4a0dfb98063d6ae4066c076c37f14fe15e355d66 | 1,792 | py | Python | tabnet/download_prepare_covertype.py | kiss2u/google-research | 2cd66234656f9e2f4218ed90a2d8aa9cf3139093 | [
"Apache-2.0"
] | 1 | 2020-02-10T12:50:17.000Z | 2020-02-10T12:50:17.000Z | tabnet/download_prepare_covertype.py | kiss2u/google-research | 2cd66234656f9e2f4218ed90a2d8aa9cf3139093 | [
"Apache-2.0"
] | 7 | 2021-08-25T16:15:53.000Z | 2022-02-10T03:26:55.000Z | tabnet/download_prepare_covertype.py | kiss2u/google-research | 2cd66234656f9e2f4218ed90a2d8aa9cf3139093 | [
"Apache-2.0"
] | 1 | 2021-02-11T06:11:31.000Z | 2021-02-11T06:11:31.000Z | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 34.461538 | 89 | 0.760045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 997 | 0.556362 |
4a0e887c11bff05cc63fa41b81253f35cd3d4db2 | 845 | py | Python | mockapi/test/urls.py | AKSharma01/mock_form | e21ac891fd0f31be37329351ca1f500b512f6251 | [
"Apache-2.0"
] | null | null | null | mockapi/test/urls.py | AKSharma01/mock_form | e21ac891fd0f31be37329351ca1f500b512f6251 | [
"Apache-2.0"
] | null | null | null | mockapi/test/urls.py | AKSharma01/mock_form | e21ac891fd0f31be37329351ca1f500b512f6251 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, request, render_template, url_for
from views import *
app = Flask(__name__)
app.secret_key = "mockapi.dev"
urls = [
('/', ['GET'], Start.as_view('view')),
('/login', ['GET','POST'], Log.as_view('log_alllist')), #- Login into mockapi
('/logout', ['GET'], Logout.as_view('logout')),... | 52.8125 | 108 | 0.618935 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 444 | 0.525444 |