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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7335cb0ff48cfe398a0b353de5f1570850d9c8fa | 3,752 | py | Python | frappe/core/doctype/sms_settings/sms_settings.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | frappe/core/doctype/sms_settings/sms_settings.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | frappe/core/doctype/sms_settings/sms_settings.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, throw, msgprint
from frappe.utils import nowdate
from frappe.model.document import Documen... | 27.188406 | 98 | 0.711354 | 34 | 0.009062 | 0 | 0 | 1,008 | 0.268657 | 0 | 0 | 923 | 0.246002 |
7335d3017f92ccc28bd13ffbbbef33f7a8f4f467 | 481 | py | Python | blog/migrations/0041_auto_20190504_0855.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 1 | 2020-05-20T08:42:49.000Z | 2020-05-20T08:42:49.000Z | blog/migrations/0041_auto_20190504_0855.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 14 | 2020-03-24T17:31:08.000Z | 2022-03-11T23:59:30.000Z | blog/migrations/0041_auto_20190504_0855.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 1 | 2020-04-13T12:37:37.000Z | 2020-04-13T12:37:37.000Z | # Generated by Django 2.1.5 on 2019-05-04 07:55
import blog.formatChecker
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0040_auto_20190504_0840'),
]
operations = [
migrations.AlterField(
model_name='videos',
... | 24.05 | 123 | 0.638254 | 362 | 0.752599 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.214137 |
73360c2d69e50730324e4dc6677481e54cc8e26d | 1,850 | py | Python | tardis/model/tests/test_csvy_model.py | Youssef15015/tardis | adde5b0114f23634fe5afef6937b285174ad6b55 | [
"BSD-3-Clause"
] | null | null | null | tardis/model/tests/test_csvy_model.py | Youssef15015/tardis | adde5b0114f23634fe5afef6937b285174ad6b55 | [
"BSD-3-Clause"
] | 2 | 2019-06-10T11:24:50.000Z | 2019-06-18T17:28:59.000Z | tardis/model/tests/test_csvy_model.py | Youssef15015/tardis | adde5b0114f23634fe5afef6937b285174ad6b55 | [
"BSD-3-Clause"
] | 1 | 2019-06-10T10:21:41.000Z | 2019-06-10T10:21:41.000Z | import numpy as np
import numpy.testing as npt
import tardis
import os
from astropy import units as u
from tardis.io.config_reader import Configuration
from tardis.model import Radial1DModel
import pytest
DATA_PATH = os.path.join(tardis.__path__[0],'model','tests','data')
@pytest.fixture(scope="module", params=['conf... | 44.047619 | 107 | 0.682162 | 0 | 0 | 0 | 0 | 508 | 0.274595 | 0 | 0 | 233 | 0.125946 |
73391ce9c005d2972ce3d22ec1870d858657b9ce | 34,911 | py | Python | wepppy/taudem/topaz_emulator.py | hwbeeson/wepppy | 6358552df99853c75be8911e7ef943108ae6923e | [
"BSD-3-Clause"
] | null | null | null | wepppy/taudem/topaz_emulator.py | hwbeeson/wepppy | 6358552df99853c75be8911e7ef943108ae6923e | [
"BSD-3-Clause"
] | null | null | null | wepppy/taudem/topaz_emulator.py | hwbeeson/wepppy | 6358552df99853c75be8911e7ef943108ae6923e | [
"BSD-3-Clause"
] | null | null | null | from typing import List
import os
import json
from os.path import join as _join
from os.path import exists as _exists
import math
from osgeo import gdal, osr
import numpy as np
from scipy.ndimage import label
from subprocess import Popen, PIPE
from pprint import pprint
from wepppy.all_your_base.geo import read_tif... | 37.619612 | 120 | 0.540661 | 34,098 | 0.976712 | 0 | 0 | 5,046 | 0.144539 | 0 | 0 | 5,517 | 0.15803 |
733a0eff21e557f8f32c9d92815d4f668db0c2d8 | 47,930 | py | Python | PyRSM/utils.py | chdahlqvist/RSMmap | 53984967d612eaf4feb90ba4972109638f6cf70a | [
"MIT"
] | 3 | 2021-05-18T16:40:13.000Z | 2022-03-17T15:32:31.000Z | PyRSM/utils.py | chdahlqvist/RSMmap | 53984967d612eaf4feb90ba4972109638f6cf70a | [
"MIT"
] | null | null | null | PyRSM/utils.py | chdahlqvist/RSMmap | 53984967d612eaf4feb90ba4972109638f6cf70a | [
"MIT"
] | 1 | 2022-01-19T11:04:21.000Z | 2022-01-19T11:04:21.000Z | """
Set of functions used by the PyRSM class to compute detection maps and optimize the parameters
of the RSM algorithm and PSF-subtraction techniques via the auto-RSM and auto-S/N frameworks
"""
__author__ = 'Carl-Henrik Dahlqvist'
from scipy.interpolate import Rbf
import pandas as pd
import numpy.linalg as la
from v... | 38.590982 | 242 | 0.614542 | 6,273 | 0.130878 | 0 | 0 | 221 | 0.004611 | 0 | 0 | 12,292 | 0.256457 |
733a51b0598b93f7ddad878e61c9f58e36f463d6 | 4,618 | py | Python | src/custom_dataset.py | devJWSong/transformer-multiturn-dialogue-pytorch | 4ddedaef45f31d75e88bdb909a4451173faec4c8 | [
"MIT"
] | 11 | 2021-03-22T10:22:42.000Z | 2021-09-15T23:50:46.000Z | src/custom_dataset.py | devjwsong/transformer-chatbot-pytorch | 4ddedaef45f31d75e88bdb909a4451173faec4c8 | [
"MIT"
] | 1 | 2021-12-10T04:52:39.000Z | 2021-12-10T04:52:40.000Z | src/custom_dataset.py | devjwsong/transformer-chatbot-pytorch | 4ddedaef45f31d75e88bdb909a4451173faec4c8 | [
"MIT"
] | null | null | null | from torch.utils.data import Dataset
from tqdm import tqdm
import torch
import pickle
import json
class CustomDataset(Dataset):
def __init__(self, args, tokenizer, data_type):
assert data_type in ["train", "valid", "test"]
print(f"Loading {data_type} data...")
with open(f"{args.t... | 38.483333 | 129 | 0.529017 | 4,506 | 0.975747 | 0 | 0 | 0 | 0 | 0 | 0 | 454 | 0.098311 |
733ab2bdfefcfa168386562dc21d727ee4511840 | 1,588 | py | Python | research/codec/codec_example.py | FXTD-ODYSSEY/QBinder | b4b288e7c0ef09d2382e3d6678a5c41950257b76 | [
"MIT"
] | 13 | 2020-11-29T15:02:57.000Z | 2022-02-11T03:12:25.000Z | research/codec/codec_example.py | FXTD-ODYSSEY/QBinder | b4b288e7c0ef09d2382e3d6678a5c41950257b76 | [
"MIT"
] | 8 | 2020-11-30T02:47:56.000Z | 2021-05-19T03:44:16.000Z | research/codec/codec_example.py | FXTD-ODYSSEY/QtConfig | 978cddf26c0305677b65b04d206138970cb73762 | [
"MIT"
] | 2 | 2020-11-30T01:59:19.000Z | 2021-12-17T06:44:54.000Z | # -*- coding: future_fstrings -*-
import codecs
import pdb
import string
# NOTE https://stackoverflow.com/questions/38777818/how-do-i-properly-create-custom-text-codecs
# prepare map from numbers to letters
_encode_table = {str(number): bytes(letter) for number, letter in enumerate(string.ascii_lowercase)}
# prepar... | 28.872727 | 100 | 0.714736 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 747 | 0.470403 |
733b44cae4895b7b97c2632f68beb2990e9371cb | 370 | py | Python | benchmark_python_lkml.py | Ladvien/rust_lookml_parser | a99a9663f2e0ccd0e7eff0fb6ec4f4496032265c | [
"MIT"
] | null | null | null | benchmark_python_lkml.py | Ladvien/rust_lookml_parser | a99a9663f2e0ccd0e7eff0fb6ec4f4496032265c | [
"MIT"
] | null | null | null | benchmark_python_lkml.py | Ladvien/rust_lookml_parser | a99a9663f2e0ccd0e7eff0fb6ec4f4496032265c | [
"MIT"
] | null | null | null | import lkml
from time import time_ns
from rich import print
FILE_PATH = "/Users/ladvien/rusty_looker/src/resources/test.lkml"
with open(FILE_PATH, "r") as f:
lookml = f.read()
startTime = time_ns() // 1_000_000
result = lkml.load(lookml)
print(result)
executionTime = (time_ns() // 1_000_000) - startTime
print('... | 26.428571 | 65 | 0.735135 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.22973 |
733c41f200ce9ccff635234faca97343a23e5190 | 1,595 | py | Python | Linear_Regression.py | svdeepak99/TSA-Twitter_Sentiment_Analysis | 41c13682ccc110025c5fbd396c0982d54febc6cc | [
"MIT"
] | null | null | null | Linear_Regression.py | svdeepak99/TSA-Twitter_Sentiment_Analysis | 41c13682ccc110025c5fbd396c0982d54febc6cc | [
"MIT"
] | null | null | null | Linear_Regression.py | svdeepak99/TSA-Twitter_Sentiment_Analysis | 41c13682ccc110025c5fbd396c0982d54febc6cc | [
"MIT"
] | null | null | null | from keras.models import Sequential, load_model
from keras.layers import Dense
import csv
import numpy as np
import os
LOAD_MODEL = False
with open("Linear_Regression/Normalized_Attributes.csv", "r", newline='') as fp:
reader = csv.reader(fp)
headings = next(reader)
dataset = np.array(list(read... | 32.55102 | 116 | 0.680251 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 362 | 0.226959 |
733c8d8b8ea4cf5eaafe8785802f0c3c067c38ff | 3,141 | py | Python | UserCode/bressler/multibubblescintillationcheck.py | cericdahl/SBCcode | 90a7841a5c1208d64f71a332289d9005a011aa21 | [
"MIT"
] | 4 | 2018-08-27T18:02:34.000Z | 2020-06-09T21:19:04.000Z | UserCode/bressler/multibubblescintillationcheck.py | SBC-Collaboration/SBC-Analysis | 90a7841a5c1208d64f71a332289d9005a011aa21 | [
"MIT"
] | null | null | null | UserCode/bressler/multibubblescintillationcheck.py | SBC-Collaboration/SBC-Analysis | 90a7841a5c1208d64f71a332289d9005a011aa21 | [
"MIT"
] | 4 | 2019-06-20T21:36:26.000Z | 2020-11-10T17:23:14.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 2 19:33:02 2021
@author: bressler
"""
import SBCcode as sbc
import numpy as np
import pulse_integrator as pi
import gc
def check_multibub_scintillation(run, event, at0, PMTgain, PMTwindow):
tstart = PMTwindow[0]
t_end= PMTwindow[1]
sc... | 36.523256 | 97 | 0.539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,196 | 0.38077 |
733cfbac832497fb734f7d0cde01792ad3325cd5 | 4,038 | py | Python | app/core/models.py | echosisdev/openmrs-disa-sync | 077331c5b96394f15cc90aba7ce4018e10d5608d | [
"MIT"
] | null | null | null | app/core/models.py | echosisdev/openmrs-disa-sync | 077331c5b96394f15cc90aba7ce4018e10d5608d | [
"MIT"
] | null | null | null | app/core/models.py | echosisdev/openmrs-disa-sync | 077331c5b96394f15cc90aba7ce4018e10d5608d | [
"MIT"
] | null | null | null | from django.db import models
from django.db.models.signals import pre_save, post_save
from core.utils.constants import Constants
from core.utils.data_convertion import DataConversion
class ExcelFile(models.Model):
file_name = models.FileField(upload_to='uploads')
date_created = models.DateTimeField(auto_now_... | 38.826923 | 78 | 0.733779 | 3,567 | 0.883358 | 0 | 0 | 0 | 0 | 0 | 0 | 461 | 0.114165 |
733e97b6658e7e2eb8c13752d62cc0a274acaa1f | 1,533 | py | Python | ceibacli/job_schedulers/slurm.py | cffbots/ceiba-cli | 7e77199c1fe919f024c4707b65578fec320713a6 | [
"Apache-2.0"
] | 2 | 2020-11-10T08:52:15.000Z | 2020-11-10T08:52:17.000Z | ceibacli/job_schedulers/slurm.py | cffbots/ceiba-cli | 7e77199c1fe919f024c4707b65578fec320713a6 | [
"Apache-2.0"
] | 24 | 2020-09-22T09:58:38.000Z | 2021-01-14T11:02:33.000Z | ceibacli/job_schedulers/slurm.py | cffbots/ceiba-cli | 7e77199c1fe919f024c4707b65578fec320713a6 | [
"Apache-2.0"
] | 1 | 2022-02-03T13:46:07.000Z | 2022-02-03T13:46:07.000Z | """Interface to the `SLURM job scheduler <https://slurm.schedmd.com/documentation.html>`_
.. autofunction:: create_slurm_script
"""
from pathlib import Path
from typing import Any, Dict, List
from ..utils import Options
def create_slurm_script(opts: Options, jobs: List[Dict[str, Any]], jobs_metadata: List[Options]... | 29.480769 | 104 | 0.666014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 634 | 0.413568 |
733ee42203016605540515b9f13fedcc898ddec0 | 5,290 | py | Python | thumbor/url.py | wking/thumbor | 97a55594a67e3cf3b5e7d09cde5944bc821eeb1e | [
"MIT"
] | null | null | null | thumbor/url.py | wking/thumbor | 97a55594a67e3cf3b5e7d09cde5944bc821eeb1e | [
"MIT"
] | null | null | null | thumbor/url.py | wking/thumbor | 97a55594a67e3cf3b5e7d09cde5944bc821eeb1e | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import re
from urllib import quote
class Url(object):
unsafe_o... | 31.117647 | 119 | 0.479017 | 5,001 | 0.945369 | 0 | 0 | 4,201 | 0.79414 | 0 | 0 | 1,416 | 0.267675 |
733f199984f8b993cc317085788a45b7c591ad8b | 1,084 | py | Python | Projects/herdimmunity/Person.py | Tech-at-DU/ACS-1111.1-Object-Oriented-Programming | e4405678282b7fbd78a3b8337116b61083417343 | [
"MIT"
] | null | null | null | Projects/herdimmunity/Person.py | Tech-at-DU/ACS-1111.1-Object-Oriented-Programming | e4405678282b7fbd78a3b8337116b61083417343 | [
"MIT"
] | null | null | null | Projects/herdimmunity/Person.py | Tech-at-DU/ACS-1111.1-Object-Oriented-Programming | e4405678282b7fbd78a3b8337116b61083417343 | [
"MIT"
] | 1 | 2021-11-01T21:04:52.000Z | 2021-11-01T21:04:52.000Z | import random
from Virus import Virus
class Person:
''' The simulation will contain people who will make up a population.'''
def __init__(self, is_vaccinated, infection=None):
''' We start out with is_alive = True
All other values will be set by the simulation through the parameters when
... | 37.37931 | 86 | 0.665129 | 1,035 | 0.954797 | 0 | 0 | 0 | 0 | 0 | 0 | 763 | 0.703875 |
733fd1e0e78df5be2052554568f783ebcd9a6ad0 | 1,741 | py | Python | Cursos/Alura/Python3_Avancando_na_orientacao_a_objetos/models_playlist3.py | ramonvaleriano/python- | ada70918e945e8f2d3b59555e9ccc35cf0178dbd | [
"MIT"
] | null | null | null | Cursos/Alura/Python3_Avancando_na_orientacao_a_objetos/models_playlist3.py | ramonvaleriano/python- | ada70918e945e8f2d3b59555e9ccc35cf0178dbd | [
"MIT"
] | null | null | null | Cursos/Alura/Python3_Avancando_na_orientacao_a_objetos/models_playlist3.py | ramonvaleriano/python- | ada70918e945e8f2d3b59555e9ccc35cf0178dbd | [
"MIT"
] | null | null | null | class Programa:
def __init__(self, nome, ano):
self._nome = nome.title()
self.ano = ano
self._likes = 0
@property
def likes(self):
return self._likes
def dar_like(self):
self._likes += 1
@property
def nome(self):
return self._nome
@nome.set... | 24.871429 | 88 | 0.638713 | 1,303 | 0.747991 | 0 | 0 | 258 | 0.148106 | 0 | 0 | 318 | 0.182549 |
73401ec9a9c7c85f7251558930f267232a9f7bb1 | 3,275 | py | Python | blackjack/game.py | cuiqui/blackjack | 5ecb0ae1c065fa284c2209222f6f958e1f514249 | [
"MIT"
] | null | null | null | blackjack/game.py | cuiqui/blackjack | 5ecb0ae1c065fa284c2209222f6f958e1f514249 | [
"MIT"
] | null | null | null | blackjack/game.py | cuiqui/blackjack | 5ecb0ae1c065fa284c2209222f6f958e1f514249 | [
"MIT"
] | null | null | null | import constants as c
from deck import Deck
from player import Human, RandomAI
class Game:
def __init__(self):
self.deck = None
self.players = None
self.scores = None
self.rounds_left = None
self.game_over = False
def new(self):
self.game_over = F... | 31.490385 | 102 | 0.487328 | 3,113 | 0.950534 | 0 | 0 | 0 | 0 | 0 | 0 | 846 | 0.258321 |
73407d37b530e40b65a5d94f1bc5d3086355dead | 1,084 | py | Python | numba/tests/__init__.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2019-12-04T07:13:18.000Z | 2019-12-04T07:13:18.000Z | numba/tests/__init__.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | numba/tests/__init__.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-09-18T15:03:46.000Z | 2020-09-18T15:03:46.000Z | from numba import unittest_support as unittest
import gc
from os.path import dirname, join
import multiprocessing
import sys
import time
import warnings
from unittest.suite import TestSuite
from numba.testing import load_testsuite
from numba.testing import ddt # for backward compatibility
try:
import faulthandl... | 27.1 | 64 | 0.737085 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 261 | 0.240775 |
7340e2ed735c34bf4441bf796759a517ee89ee90 | 5,377 | py | Python | src/clustar/fit.py | clustar/Clustar | 83e155feffc10c4bf172f8ec769fb3c5ffe1d579 | [
"MIT"
] | 4 | 2021-02-24T17:27:25.000Z | 2021-06-28T04:45:32.000Z | src/clustar/fit.py | clustar/Clustar | 83e155feffc10c4bf172f8ec769fb3c5ffe1d579 | [
"MIT"
] | 3 | 2021-04-05T14:53:26.000Z | 2021-06-27T20:17:14.000Z | src/clustar/fit.py | clustar/Clustar | 83e155feffc10c4bf172f8ec769fb3c5ffe1d579 | [
"MIT"
] | 1 | 2021-02-15T16:13:05.000Z | 2021-02-15T16:13:05.000Z | """
Clustar module for fitting-related methods.
This module is designed for the 'ClustarData' object. All listed methods take
an input parameter of a 'ClustarData' object and return a 'ClustarData' object
after processing the method. As a result, all changes are localized within the
'ClustarData' object.
Visit <https... | 29.382514 | 78 | 0.563139 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,641 | 0.305189 |
73411a436e5f2edebb124c6122419fcdeef298b3 | 970 | py | Python | tests/wizard/namedwizardtests/urls.py | felixxm/django-formtools | ba62c6fa14edbd4197bda8ed0d23eb006ebebeba | [
"BSD-3-Clause"
] | null | null | null | tests/wizard/namedwizardtests/urls.py | felixxm/django-formtools | ba62c6fa14edbd4197bda8ed0d23eb006ebebeba | [
"BSD-3-Clause"
] | null | null | null | tests/wizard/namedwizardtests/urls.py | felixxm/django-formtools | ba62c6fa14edbd4197bda8ed0d23eb006ebebeba | [
"BSD-3-Clause"
] | 1 | 2019-11-04T22:52:19.000Z | 2019-11-04T22:52:19.000Z | from django.conf.urls import url
from .forms import (
CookieContactWizard, Page1, Page2, Page3, Page4, SessionContactWizard,
)
def get_named_session_wizard():
return SessionContactWizard.as_view(
[('form1', Page1), ('form2', Page2), ('form3', Page3), ('form4', Page4)],
url_name='nwiz_session'... | 32.333333 | 90 | 0.670103 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.290722 |
73418fc41479ed48faa479be47ae0461c5d41885 | 907 | py | Python | setup.py | ajayp10/derive_event_pm4py | d1fd16c65081348b617dc0697b372a294c91023a | [
"MIT"
] | null | null | null | setup.py | ajayp10/derive_event_pm4py | d1fd16c65081348b617dc0697b372a294c91023a | [
"MIT"
] | null | null | null | setup.py | ajayp10/derive_event_pm4py | d1fd16c65081348b617dc0697b372a294c91023a | [
"MIT"
] | null | null | null | import pathlib
from setuptools import setup
CURRENT_PATH = pathlib.Path(__file__).parent
README = (CURRENT_PATH/"README.md").read_text()
setup(
name="derive_event_pm4py",
version="1.0.1",
description="It derives new events based on rules provided as inputs.",
long_description=README,
long_descrip... | 28.34375 | 75 | 0.651599 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 406 | 0.44763 |
73425bf1b2ce90f77e267345bd3b090b0208b790 | 16,334 | py | Python | tests/service/ai/test_not_killing_itself_ai.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 3 | 2021-01-17T23:32:07.000Z | 2022-01-30T14:49:16.000Z | tests/service/ai/test_not_killing_itself_ai.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-01-17T13:37:56.000Z | 2021-04-14T12:28:49.000Z | tests/service/ai/test_not_killing_itself_ai.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-04-02T14:53:38.000Z | 2021-04-20T11:10:17.000Z | import unittest
from datetime import datetime, timezone
from typing import List
from chillow.service.ai.not_killing_itself_ai import NotKillingItselfAI
from chillow.model.action import Action
from chillow.model.cell import Cell
from chillow.model.direction import Direction
from chillow.model.game import Game
from chil... | 52.185304 | 120 | 0.53355 | 15,927 | 0.975083 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.006245 |
73441d4a3b24e3d3313825da48a3c91f2e8b65de | 1,123 | py | Python | setup.py | meisanggou/ldapuser | 45a9e5eba8bbf173ce2ec87f9a32cff8db549e7c | [
"MIT"
] | null | null | null | setup.py | meisanggou/ldapuser | 45a9e5eba8bbf173ce2ec87f9a32cff8db549e7c | [
"MIT"
] | null | null | null | setup.py | meisanggou/ldapuser | 45a9e5eba8bbf173ce2ec87f9a32cff8db549e7c | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# coding: utf-8
# __author__ = 'meisanggou'
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
if sys.version_info <= (2, 7):
sys.stderr.write("ERROR: ldap-user requires Python Version 2.7 or above.\n")
sys.stderr.write("Your Pyt... | 25.522727 | 81 | 0.685663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 415 | 0.369546 |
73455aa40d8fdaf8fad425f0bc60becf47571215 | 4,387 | py | Python | tests/test_infection.py | chinapnr/covid-19-data | 409fa260c16e09b7ef820435c5086207bb5e40ef | [
"MIT"
] | 3 | 2020-05-27T01:21:50.000Z | 2020-08-20T07:54:42.000Z | tests/test_infection.py | chinapnr/covid-19-data | 409fa260c16e09b7ef820435c5086207bb5e40ef | [
"MIT"
] | 24 | 2020-03-26T10:45:34.000Z | 2020-04-06T06:13:50.000Z | tests/test_infection.py | chinapnr/covid-19-data | 409fa260c16e09b7ef820435c5086207bb5e40ef | [
"MIT"
] | null | null | null | import json
import pytest
@pytest.mark.usefixtures('client', 'headers')
class TestInfection:
def test_infection_region_tc01(self, client, headers):
# db has data BETWEEN 2020-03-22 2020-03-24
region = 'China'
payload = {
'region': region,
'start_date': '2020-03-22... | 35.096 | 90 | 0.581947 | 4,311 | 0.982676 | 0 | 0 | 4,357 | 0.993162 | 0 | 0 | 1,161 | 0.264646 |
734586c386b99571285203cdfc4477ce123175a7 | 19,442 | py | Python | tests/test_util_owsutil.py | TimFranken/pydov | da393129207c93ab845a28525864c13374459dbf | [
"MIT"
] | null | null | null | tests/test_util_owsutil.py | TimFranken/pydov | da393129207c93ab845a28525864c13374459dbf | [
"MIT"
] | null | null | null | tests/test_util_owsutil.py | TimFranken/pydov | da393129207c93ab845a28525864c13374459dbf | [
"MIT"
] | null | null | null | """Module grouping tests for the pydov.util.owsutil module."""
import copy
import re
import pytest
from numpy.compat import unicode
from owslib.etree import etree
from owslib.fes import (
PropertyIsEqualTo,
FilterRequest,
)
from owslib.iso import MD_Metadata
from owslib.util import nspath_eval
from pydov.util... | 40.419958 | 79 | 0.620152 | 17,939 | 0.922693 | 0 | 0 | 0 | 0 | 0 | 0 | 10,898 | 0.560539 |
7347c43851f55966f151bfafefba0299301f676e | 1,430 | py | Python | manage.py | jessekl/twiliochallenge | 2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f | [
"MIT"
] | null | null | null | manage.py | jessekl/twiliochallenge | 2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f | [
"MIT"
] | null | null | null | manage.py | jessekl/twiliochallenge | 2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
manage
~~~~~~
Flask-Script Manager
"""
import os
from flask.ext.script import Manager
from flask.ext.migrate import MigrateCommand
from fbone import create_app
from fbone.extensions import db
from fbone.utils import PROJECT_PATH, MALE
from fbone.modules.user import User, ADMI... | 23.442623 | 94 | 0.692308 | 0 | 0 | 0 | 0 | 586 | 0.40979 | 0 | 0 | 294 | 0.205594 |
7347cda8008de4de3e2356287a34d7f4b9da7478 | 444 | py | Python | llvmsqlite_util/benchmarking/micro/aggregate.py | KowalskiThomas/LLVMSQLite | a36b85dfadf44b0a4008d9f01ebd79d5ca2cace4 | [
"blessing"
] | null | null | null | llvmsqlite_util/benchmarking/micro/aggregate.py | KowalskiThomas/LLVMSQLite | a36b85dfadf44b0a4008d9f01ebd79d5ca2cace4 | [
"blessing"
] | null | null | null | llvmsqlite_util/benchmarking/micro/aggregate.py | KowalskiThomas/LLVMSQLite | a36b85dfadf44b0a4008d9f01ebd79d5ca2cace4 | [
"blessing"
] | null | null | null | import os
sql_files = [x for x in os.listdir(".") if x.endswith("sql")]
sql_files = list(sorted(sql_files, key = lambda x : int(x.split('.')[0])))
result = ""
for i, f in enumerate(sql_files):
i = i + 1
i = f.replace(".sql", "")
with open(f) as sql:
result += f"--- Query {i}\n"
result += s... | 26.117647 | 74 | 0.554054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.13964 |
73486adc08d97e3620d3c9533949d0a3a23b6c00 | 2,882 | py | Python | demos/crane/main.py | Starli8ht/KivyMD | 5a3425d4e39e8615a0ba8b879db1eb5d7bfb3b49 | [
"MIT"
] | null | null | null | demos/crane/main.py | Starli8ht/KivyMD | 5a3425d4e39e8615a0ba8b879db1eb5d7bfb3b49 | [
"MIT"
] | null | null | null | demos/crane/main.py | Starli8ht/KivyMD | 5a3425d4e39e8615a0ba8b879db1eb5d7bfb3b49 | [
"MIT"
] | null | null | null | """
MDCrane demo
=============
.. seealso::
`Material Design spec,
Crane <https://material.io/design/material-studies/crane.html#>`
Crane is a travel app that helps users find and book travel, lodging, and
restaurant options that match their input preferences.
"""
import os
import sys
from pathlib i... | 29.408163 | 77 | 0.519084 | 1,849 | 0.641568 | 0 | 0 | 0 | 0 | 0 | 0 | 1,058 | 0.367106 |
7349101381b3dbb9e23adbac5458b1fa8f012f0b | 8,368 | py | Python | tasks/lgutil/graph_net.py | HimmelStein/lg-flask | 562adfe16c3dd718faf694b8233586422d035e17 | [
"MIT"
] | null | null | null | tasks/lgutil/graph_net.py | HimmelStein/lg-flask | 562adfe16c3dd718faf694b8233586422d035e17 | [
"MIT"
] | null | null | null | tasks/lgutil/graph_net.py | HimmelStein/lg-flask | 562adfe16c3dd718faf694b8233586422d035e17 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from nltk.parse import DependencyGraph
from collections import defaultdict
import random
import sys
import copy
from json import dumps
from pprint import pprint
try:
from .lg_graph import LgGraph
except:
sys.path.append("/Users/tdong/git/lg-flask/tasks/lgutil")
from .lg_graph import... | 34.866667 | 113 | 0.518164 | 7,779 | 0.929613 | 142 | 0.016969 | 0 | 0 | 0 | 0 | 2,453 | 0.293141 |
7349161371152ef9656dab45ddf6d709b3bf142a | 5,517 | py | Python | utils/transformations/char_level/char_dces_substitute.py | Yzx835/AISafety | eb09551814898c7f6d86641b47faf7845c948640 | [
"MIT"
] | null | null | null | utils/transformations/char_level/char_dces_substitute.py | Yzx835/AISafety | eb09551814898c7f6d86641b47faf7845c948640 | [
"MIT"
] | null | null | null | utils/transformations/char_level/char_dces_substitute.py | Yzx835/AISafety | eb09551814898c7f6d86641b47faf7845c948640 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# coding=UTF-8
"""
@Author: WEN Hao
@LastEditors: WEN Hao
@Description:
@Date: 2021-09-24
@LastEditTime: 2022-04-17
源自OpenAttack的DCESSubstitute
"""
import random
from typing import NoReturn, List, Any, Optional
import numpy as np
from utils.transformations.base import CharSubstitute
from uti... | 23.576923 | 84 | 0.518035 | 3,893 | 0.704871 | 0 | 0 | 81 | 0.014666 | 0 | 0 | 1,057 | 0.191381 |
734ac6f57c878180c7a2282d8eb947a2ce6b549f | 2,588 | py | Python | piptools/repositories/base.py | LaudateCorpus1/pip-tools | 53c927262d816c336664afee9b03996bfb8f9c44 | [
"BSD-3-Clause"
] | 2 | 2021-12-02T11:41:02.000Z | 2021-12-27T12:01:53.000Z | piptools/repositories/base.py | LaudateCorpus1/pip-tools | 53c927262d816c336664afee9b03996bfb8f9c44 | [
"BSD-3-Clause"
] | 3 | 2020-11-20T18:42:20.000Z | 2021-06-20T09:38:27.000Z | piptools/repositories/base.py | LaudateCorpus1/pip-tools | 53c927262d816c336664afee9b03996bfb8f9c44 | [
"BSD-3-Clause"
] | 2 | 2021-07-13T08:53:43.000Z | 2022-02-02T14:10:58.000Z | import optparse
from abc import ABCMeta, abstractmethod
from contextlib import contextmanager
from typing import Iterator, Optional, Set
from pip._internal.index.package_finder import PackageFinder
from pip._internal.models.index import PyPI
from pip._internal.network.session import PipSession
from pip._internal.req i... | 34.506667 | 88 | 0.693199 | 2,240 | 0.865533 | 0 | 0 | 2,009 | 0.776275 | 0 | 0 | 1,259 | 0.486476 |
734b4343088715a23f5435206ac174b0bc22413c | 11,371 | py | Python | tfx/orchestration/portable/execution_publish_utils.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/portable/execution_publish_utils.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/portable/execution_publish_utils.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 43.734615 | 97 | 0.735731 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,443 | 0.478674 |
734bd8fdc6b5e208d672c4c4eac90f446f5043c6 | 6,220 | py | Python | src/dctm/datasets.py | spotify-research/dctm | e813aca23c3f54bc55ace5b3342aaec5cc7dad60 | [
"Apache-2.0"
] | 11 | 2020-08-11T10:18:48.000Z | 2021-12-23T15:34:46.000Z | src/dctm/datasets.py | spotify-research/dctm | e813aca23c3f54bc55ace5b3342aaec5cc7dad60 | [
"Apache-2.0"
] | null | null | null | src/dctm/datasets.py | spotify-research/dctm | e813aca23c3f54bc55ace5b3342aaec5cc7dad60 | [
"Apache-2.0"
] | 2 | 2020-09-02T23:02:11.000Z | 2020-11-17T05:16:29.000Z | #
# Copyright 2020 Spotify AB
# 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, s... | 32.910053 | 79 | 0.635852 | 412 | 0.066238 | 0 | 0 | 0 | 0 | 0 | 0 | 1,385 | 0.222669 |
734d1d2e2ae1a6d7737d630a4bc5c6e70adf63d2 | 28,079 | py | Python | billingbudgets/google/cloud/billing_budgets_v1beta1/proto/budget_model_pb2.py | hugovk/google-cloud-python | b387134827dbc3be0e1b431201e0875798002fda | [
"Apache-2.0"
] | 1 | 2019-12-09T11:40:28.000Z | 2019-12-09T11:40:28.000Z | billingbudgets/google/cloud/billing_budgets_v1beta1/proto/budget_model_pb2.py | hugovk/google-cloud-python | b387134827dbc3be0e1b431201e0875798002fda | [
"Apache-2.0"
] | 1 | 2019-03-29T22:03:48.000Z | 2019-04-02T22:24:45.000Z | billingbudgets/google/cloud/billing_budgets_v1beta1/proto/budget_model_pb2.py | hugovk/google-cloud-python | b387134827dbc3be0e1b431201e0875798002fda | [
"Apache-2.0"
] | 1 | 2019-03-29T18:26:16.000Z | 2019-03-29T18:26:16.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/billing/budgets_v1beta1/proto/budget_model.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
from google.protobuf import descriptor as _descriptor
from google.proto... | 36.849081 | 2,327 | 0.654795 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11,861 | 0.422415 |
734e2605b9fe6651d724a46a3b07b21d5d438537 | 4,010 | py | Python | torchreid/optim/sam.py | opencv/deep-person-reid | ccc305614e968d4b64cc7d4b6664eb42267e6250 | [
"MIT"
] | 1 | 2020-07-07T19:22:17.000Z | 2020-07-07T19:22:17.000Z | torchreid/optim/sam.py | opencv/deep-person-reid | ccc305614e968d4b64cc7d4b6664eb42267e6250 | [
"MIT"
] | 1 | 2020-06-04T15:22:09.000Z | 2020-06-04T15:22:09.000Z | torchreid/optim/sam.py | opencv/deep-person-reid | ccc305614e968d4b64cc7d4b6664eb42267e6250 | [
"MIT"
] | 4 | 2020-07-02T09:23:11.000Z | 2020-08-21T08:24:13.000Z | # Copyright 2020 Google Research
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
'''
Imported from: https://github.com/google-research/sam
'''
import torch
class SAM(torch.optim.Optimizer):
def __init__(self, params, base_optimizer, rho... | 37.830189 | 131 | 0.56783 | 3,773 | 0.940898 | 0 | 0 | 2,735 | 0.682045 | 0 | 0 | 1,167 | 0.291022 |
735158944908fbafce88d97668526717a22003eb | 11,958 | py | Python | src/konfiger_stream.py | konfiger/konfiger-python | 294fb2fed8a46f7e242825fc0b723b0ff7132c8c | [
"MIT"
] | 4 | 2019-09-25T02:18:43.000Z | 2020-01-21T19:16:05.000Z | src/konfiger_stream.py | keyvaluedb/key-value-db-python | 294fb2fed8a46f7e242825fc0b723b0ff7132c8c | [
"MIT"
] | null | null | null | src/konfiger_stream.py | keyvaluedb/key-value-db-python | 294fb2fed8a46f7e242825fc0b723b0ff7132c8c | [
"MIT"
] | null | null | null |
"""
The MIT License
Copyright 2020 Adewale Azeez <azeezadewale98@gmail.com>.
"""
import os.path
from .konfiger_util import type_of, is_string, is_char, is_bool, escape_string, un_escape_string
def file_stream(file_path, delimiter = '=', separator = '\n', err_tolerance = False):
return KonfigerStream(file... | 45.816092 | 150 | 0.511373 | 11,052 | 0.924235 | 0 | 0 | 0 | 0 | 0 | 0 | 1,257 | 0.105118 |
735211327e137e292f3ce5c7750409c77a35d0dd | 2,674 | py | Python | matematik.py | Drummersbrother/math_for_school | 5eaa22320298d59b770e68b9640b34a525875132 | [
"MIT"
] | null | null | null | matematik.py | Drummersbrother/math_for_school | 5eaa22320298d59b770e68b9640b34a525875132 | [
"MIT"
] | null | null | null | matematik.py | Drummersbrother/math_for_school | 5eaa22320298d59b770e68b9640b34a525875132 | [
"MIT"
] | null | null | null | import math
import numpy as np
import collections
import scipy.stats as sst
import matplotlib.pyplot as plt
def plot(*args, **kwargs):
plt.plot(*args, **kwargs)
plt.show()
def linregshow(x, y, col: str="r"):
linregresult = sst.linregress(list(zip(x, y)))
plot(x, y, col, x, [(val * linregresult.slope) ... | 33.848101 | 139 | 0.628646 | 0 | 0 | 0 | 0 | 1,051 | 0.393044 | 0 | 0 | 893 | 0.333957 |
7352cdca72cd11a42b689b908ad454fb587ad295 | 5,362 | py | Python | docly/ioutils/__init__.py | autosoft-dev/docly | 0bd6216b8a9735e9fa76bffd4ffea6cec6cc4a01 | [
"MIT"
] | 29 | 2020-12-31T08:27:32.000Z | 2022-02-15T08:48:51.000Z | docly/ioutils/__init__.py | autosoft-dev/docly | 0bd6216b8a9735e9fa76bffd4ffea6cec6cc4a01 | [
"MIT"
] | 4 | 2020-12-30T18:18:54.000Z | 2021-08-03T14:42:35.000Z | docly/ioutils/__init__.py | autosoft-dev/docly | 0bd6216b8a9735e9fa76bffd4ffea6cec6cc4a01 | [
"MIT"
] | 2 | 2022-01-04T17:58:22.000Z | 2022-02-05T13:04:14.000Z | import os
from pathlib import Path
import requests
import shutil
import sys
from distutils.version import LooseVersion
import time
from tqdm import tqdm
from docly.parser import parser as py_parser
from docly.tokenizers import tokenize_code_string
from docly import __version__
# from c2nl.objects import Code
UPDATE_... | 31.356725 | 82 | 0.610966 | 0 | 0 | 1,074 | 0.200298 | 0 | 0 | 0 | 0 | 1,105 | 0.20608 |
735333a22976a616b2a1727e7723502f1d1387bb | 21 | bzl | Python | java/version.bzl | symonk/selenium | 38e89630f1c4b1a0d3ac6e17765a6ccb58160f83 | [
"Apache-2.0"
] | null | null | null | java/version.bzl | symonk/selenium | 38e89630f1c4b1a0d3ac6e17765a6ccb58160f83 | [
"Apache-2.0"
] | null | null | null | java/version.bzl | symonk/selenium | 38e89630f1c4b1a0d3ac6e17765a6ccb58160f83 | [
"Apache-2.0"
] | null | null | null | SE_VERSION = "4.2.1"
| 10.5 | 20 | 0.619048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.333333 |
735414eb5a0cf25ba65326dd7cc3a0b2acaea272 | 2,978 | py | Python | scripts/preprocess_for_prediction.py | jmueller95/deepgrind | 1fdca224a5256b820fa817a529e79b70c8808d65 | [
"Apache-2.0"
] | null | null | null | scripts/preprocess_for_prediction.py | jmueller95/deepgrind | 1fdca224a5256b820fa817a529e79b70c8808d65 | [
"Apache-2.0"
] | null | null | null | scripts/preprocess_for_prediction.py | jmueller95/deepgrind | 1fdca224a5256b820fa817a529e79b70c8808d65 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import utils
def check_msms_model_name(converter):
def wrapper(*args, **kwargs):
if kwargs['style'] not in ["pdeep", "prosit"]:
raise Exception("MSMS model must be 'pdeep' or 'prosit'")
converter(*args, **kwargs)
return wrapper
@check_msms_model_name... | 46.53125 | 131 | 0.624244 | 0 | 0 | 0 | 0 | 1,614 | 0.541974 | 0 | 0 | 840 | 0.282069 |
7354ded194b9ee5cde59d94c66a6556bf76f8b32 | 1,497 | py | Python | GettingStarted/gettingstarted.py | rohitp934/roadtoadatascientist | 50724b63c2692659cdd48e9ed20e856c231695fd | [
"MIT"
] | null | null | null | GettingStarted/gettingstarted.py | rohitp934/roadtoadatascientist | 50724b63c2692659cdd48e9ed20e856c231695fd | [
"MIT"
] | null | null | null | GettingStarted/gettingstarted.py | rohitp934/roadtoadatascientist | 50724b63c2692659cdd48e9ed20e856c231695fd | [
"MIT"
] | null | null | null | #importing necessary modules
from sklearn.linear_model import Perceptron
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
import numpy as np
# Data and labels
Xtrain = [[182, 80, 34], [176, 70, 33], [161, 60, 28], [154, 55, 27], [166, 63, 30], [189, 90, 36], [175, 63, 28], ... | 38.384615 | 174 | 0.676687 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 526 | 0.351369 |
7356af2b787834d2216080e3079e961a0d62871f | 909 | py | Python | libs/optimizers.py | bxtkezhan/AILabs | 6328aa65a3ce5f450389a5a848b641ba36f0e9c5 | [
"MIT"
] | null | null | null | libs/optimizers.py | bxtkezhan/AILabs | 6328aa65a3ce5f450389a5a848b641ba36f0e9c5 | [
"MIT"
] | null | null | null | libs/optimizers.py | bxtkezhan/AILabs | 6328aa65a3ce5f450389a5a848b641ba36f0e9c5 | [
"MIT"
] | null | null | null | import numpy as np
class SGD:
def __init__(self, lr=0.01, momentum=0.0, decay=0.0, nesterov=False,
maximum=None, minimum=None):
self.lr = lr
self.momentum = momentum
self.decay = decay
self.nesterov = nesterov
self.idx = None
self.maximum = maximum ... | 31.344828 | 72 | 0.563256 | 896 | 0.977099 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.062159 |
735716881d6460c9c4e13489b7256920b070c665 | 122,809 | py | Python | pennylane/transforms/qcut.py | therooler/pennylane | 88a8a5960a2ffd218a12f85ace632021eef2abf5 | [
"Apache-2.0"
] | null | null | null | pennylane/transforms/qcut.py | therooler/pennylane | 88a8a5960a2ffd218a12f85ace632021eef2abf5 | [
"Apache-2.0"
] | null | null | null | pennylane/transforms/qcut.py | therooler/pennylane | 88a8a5960a2ffd218a12f85ace632021eef2abf5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Xanadu Quantum Technologies Inc.
#
# 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 a... | 38.741009 | 117 | 0.629905 | 18,050 | 0.143137 | 0 | 0 | 51,302 | 0.406826 | 0 | 0 | 82,413 | 0.653537 |
735799fe024faf41da595642a3d8bdb3ba238a42 | 1,693 | py | Python | tools/SDKTool/src/ui/dialog/progress_bar_dialog.py | Passer-D/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 1,210 | 2020-08-18T07:57:36.000Z | 2022-03-31T15:06:05.000Z | tools/SDKTool/src/ui/dialog/progress_bar_dialog.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 37 | 2020-08-24T02:48:38.000Z | 2022-01-30T06:41:52.000Z | tools/SDKTool/src/ui/dialog/progress_bar_dialog.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 275 | 2020-08-18T08:35:16.000Z | 2022-03-31T15:06:07.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making GameAISDK available.
This source code file is licensed under the GNU General Public License Version 3.
For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package.
Copyright... | 31.351852 | 111 | 0.705848 | 1,216 | 0.718252 | 0 | 0 | 0 | 0 | 0 | 0 | 394 | 0.232723 |
7358c21d44c9b2e4044c283c45da55bafa2452ee | 2,469 | py | Python | 9/main.py | misterwilliam/advent-of-code | b8ddcbc5efcf62c7e5e4244339029783ac9f90b6 | [
"MIT"
] | null | null | null | 9/main.py | misterwilliam/advent-of-code | b8ddcbc5efcf62c7e5e4244339029783ac9f90b6 | [
"MIT"
] | null | null | null | 9/main.py | misterwilliam/advent-of-code | b8ddcbc5efcf62c7e5e4244339029783ac9f90b6 | [
"MIT"
] | null | null | null | import itertools
import unittest
data = """Faerun to Norrath = 129
Faerun to Tristram = 58
Faerun to AlphaCentauri = 13
Faerun to Arbre = 24
Faerun to Snowdin = 60
Faerun to Tambi = 71
Faerun to Straylight = 67
Norrath to Tristram = 142
Norrath to AlphaCentauri = 15
Norrath to Arbre = 135
Norrath to Snowdin = 75
Norra... | 26.548387 | 85 | 0.665857 | 464 | 0.18793 | 320 | 0.129607 | 0 | 0 | 0 | 0 | 849 | 0.343864 |
73592c3ecd42d5c4a472b3d8242eb4b399af73f6 | 1,000 | py | Python | 100-Exercicios/ex039.py | thedennerdev/ExerciciosPython-Iniciante | de36c4a09700353a9a1daa7f1320e416c6201a5c | [
"MIT"
] | null | null | null | 100-Exercicios/ex039.py | thedennerdev/ExerciciosPython-Iniciante | de36c4a09700353a9a1daa7f1320e416c6201a5c | [
"MIT"
] | null | null | null | 100-Exercicios/ex039.py | thedennerdev/ExerciciosPython-Iniciante | de36c4a09700353a9a1daa7f1320e416c6201a5c | [
"MIT"
] | null | null | null | #Exercício Python 39: Faça um programa que leia o ano de nascimento de um jovem e informe, de acordo com a sua idade, se ele ainda vai se alistar ao serviço militar, se é a hora exata de se alistar ou se já passou do tempo do alistamento. Seu programa também deverá mostrar o tempo que falta ou que passou do prazo.
imp... | 62.5 | 315 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 753 | 0.738235 |
735938898c03a603b4b3dd0bb3da69ebc37d8938 | 10,903 | py | Python | fish_dashboard/scrapyd/scrapyd_service.py | SylvanasSun/FishFishJump | 696212d242d8d572f3f1b43925f3d8ab8acc6a2d | [
"MIT"
] | 60 | 2018-03-09T07:06:10.000Z | 2021-11-18T15:53:04.000Z | fish_dashboard/scrapyd/scrapyd_service.py | qiubaiying/FishFishJump | 696212d242d8d572f3f1b43925f3d8ab8acc6a2d | [
"MIT"
] | 1 | 2018-04-03T11:05:54.000Z | 2018-04-03T20:06:41.000Z | fish_dashboard/scrapyd/scrapyd_service.py | qiubaiying/FishFishJump | 696212d242d8d572f3f1b43925f3d8ab8acc6a2d | [
"MIT"
] | 8 | 2018-03-12T03:07:00.000Z | 2021-06-11T05:16:11.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from fish_core.utils.common_utils import format_dict_to_str, get_current_date, list_to_str, str_to_list
from fish_dashboard.scrapyd.model import ScrapydStatusVO, JobListDO, JobStatus, JobPriority, ProjectListVO, SpiderListVO
from fish_dashboard.scrapyd.scrapyd_db import Sql... | 46.199153 | 120 | 0.604879 | 902 | 0.08273 | 0 | 0 | 0 | 0 | 0 | 0 | 1,761 | 0.161515 |
7359bba7e09630706e6e5d4a81fb814a396993e5 | 1,750 | py | Python | apps/shared/storage.py | bensternthal/affiliates | e234b0ab925b33d71cb5ded3d51dccbcbb0e59c1 | [
"BSD-3-Clause"
] | null | null | null | apps/shared/storage.py | bensternthal/affiliates | e234b0ab925b33d71cb5ded3d51dccbcbb0e59c1 | [
"BSD-3-Clause"
] | null | null | null | apps/shared/storage.py | bensternthal/affiliates | e234b0ab925b33d71cb5ded3d51dccbcbb0e59c1 | [
"BSD-3-Clause"
] | null | null | null | import os
from tempfile import mkstemp
from django.conf import settings
from django.core.files import locks
from django.core.files.move import file_move_safe
from django.core.files.storage import FileSystemStorage
from django.utils.text import get_valid_filename
class OverwritingStorage(FileSystemStorage):
"""
... | 32.407407 | 79 | 0.652571 | 1,484 | 0.848 | 0 | 0 | 0 | 0 | 0 | 0 | 385 | 0.22 |
735a0631d562698eec79867185c8831049a8bf3f | 3,783 | py | Python | bin/dupeFinder.py | kebman/dupe-finder-py | 3ac23da711577466043b5032a4022516f4ccef95 | [
"BSD-3-Clause"
] | 1 | 2018-02-17T09:00:48.000Z | 2018-02-17T09:00:48.000Z | bin/dupeFinder.py | kebman/dupe-finder-py | 3ac23da711577466043b5032a4022516f4ccef95 | [
"BSD-3-Clause"
] | null | null | null | bin/dupeFinder.py | kebman/dupe-finder-py | 3ac23da711577466043b5032a4022516f4ccef95 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
import os
import hashlib
import datetime
import sqlite3
from sqlite3 import Error
def sha256(fname):
"""Return sha256 hash from input file (fname).
:param fname:
:return: Sha256 hash digest in hexadecimal"""
hash_sha256 = hashlib.sha256()
with open(fname, "rb") as f:
for chunk in iter(lam... | 29.787402 | 111 | 0.694422 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,790 | 0.473169 |
735afc924941206a74f98559fb49787e7b5af8e7 | 309 | py | Python | Python/factorialIterative.py | Ricardoengithub/Factorial | 0c45201bbe1ad94bf0d090381eb662cf2a281fda | [
"MIT"
] | null | null | null | Python/factorialIterative.py | Ricardoengithub/Factorial | 0c45201bbe1ad94bf0d090381eb662cf2a281fda | [
"MIT"
] | null | null | null | Python/factorialIterative.py | Ricardoengithub/Factorial | 0c45201bbe1ad94bf0d090381eb662cf2a281fda | [
"MIT"
] | null | null | null | def factorial(n):
fact = 1
for i in range(2,n+1):
fact*= i
return fact
def main():
n = int(input("Enter a number: "))
if n >= 0:
print(f"Factorial: {factorial(n)}")
else:
print(f"Choose another number")
if __name__ == "__main__":
main()
| 15.45 | 43 | 0.501618 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.2589 |
735c291e6927c7998102106ab071603c6808076b | 5,919 | py | Python | code_old/sort.py | benwoo1110/A-List-of-Sorts-v2 | 2d404bda6c6ddc689e705cad6966f2a656ddac2f | [
"MIT"
] | 6 | 2020-06-29T01:57:44.000Z | 2022-01-14T09:00:03.000Z | code_old/sort.py | benwoo1110/A-List-of-Sorts-v2 | 2d404bda6c6ddc689e705cad6966f2a656ddac2f | [
"MIT"
] | null | null | null | code_old/sort.py | benwoo1110/A-List-of-Sorts-v2 | 2d404bda6c6ddc689e705cad6966f2a656ddac2f | [
"MIT"
] | 1 | 2021-03-26T04:30:37.000Z | 2021-03-26T04:30:37.000Z | ######################################
# Import and initialize the librarys #
#####################################
from code.pygame_objects import *
from code.algorithm.bubblesort import bubblesort
from code.algorithm.insertionsort import insertionsort
from code.algorithm.bogosort import bogosort
from code.algorithm.m... | 31.994595 | 112 | 0.487751 | 1,542 | 0.260517 | 0 | 0 | 1,525 | 0.257645 | 0 | 0 | 1,078 | 0.182125 |
735e36175591a886d021d1f42c7e0f23a0bc609d | 489 | py | Python | catkin_ws/src/tutorials/scripts/number_sub.py | vipulkumbhar/AuE893Spring19_VipulKumbhar | f741d5299b2804fd541b2bba64b8a4fba8521f33 | [
"MIT"
] | 3 | 2020-12-04T22:00:12.000Z | 2022-02-09T15:53:14.000Z | catkin_ws/src/tutorials/scripts/number_sub.py | vipulkumbhar/AuE893Spring19_VipulKumbhar | f741d5299b2804fd541b2bba64b8a4fba8521f33 | [
"MIT"
] | 1 | 2020-04-15T19:58:30.000Z | 2020-04-15T19:58:30.000Z | catkin_ws/src/tutorials/scripts/number_sub.py | vipulkumbhar/AuE893Spring19_VipulKumbhar | f741d5299b2804fd541b2bba64b8a4fba8521f33 | [
"MIT"
] | 1 | 2020-05-21T21:59:21.000Z | 2020-05-21T21:59:21.000Z | #!/usr/bin/env python
import rospy
from std_msgs.msg import Int64
counter = 0
pub = None
def callback_number(msg):
global counter
counter += msg.data
new_msg = Int64()
new_msg.data = counter
pub.publish(new_msg)
rospy.loginfo(counter)
if __name__ == '__main__':
rospy.init_node('... | 18.807692 | 66 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.145194 |
735e8db4e1d5d21ba03d9d6374f1111bc5cde6f4 | 806 | py | Python | setup.py | eddo888/perdy | 616473e9bde3ad58dc1ebf054fb78a7cc48c3adf | [
"MIT"
] | null | null | null | setup.py | eddo888/perdy | 616473e9bde3ad58dc1ebf054fb78a7cc48c3adf | [
"MIT"
] | null | null | null | setup.py | eddo888/perdy | 616473e9bde3ad58dc1ebf054fb78a7cc48c3adf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import codecs
from os import path
from setuptools import setup
pwd = path.abspath(path.dirname(__file__))
with codecs.open(path.join(pwd, 'README.md'), 'r', encoding='utf8') as input:
long_description = input.read()
version='1.7'
setup(
name='Perdy',
version=version,
license='MIT',
... | 19.190476 | 77 | 0.682382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 310 | 0.384615 |
736056399bf64b21d6f7dca419596b81048da99f | 2,658 | py | Python | utils/slack_send.py | IntelliGrape/pennypincher | d0d503eb8a480bf28f308ff52834170cca5a53d7 | [
"MIT"
] | null | null | null | utils/slack_send.py | IntelliGrape/pennypincher | d0d503eb8a480bf28f308ff52834170cca5a53d7 | [
"MIT"
] | null | null | null | utils/slack_send.py | IntelliGrape/pennypincher | d0d503eb8a480bf28f308ff52834170cca5a53d7 | [
"MIT"
] | null | null | null | from tabulate import tabulate
from slack.errors import SlackApiError
import sys
import logging
import slack
class Slackalert:
"""To send cost report on slack."""
def __init__(self, channel=None, slack_token=None):
self.channel = channel
self.slack_token = slack_token
logging.basicConfi... | 45.050847 | 122 | 0.598947 | 2,547 | 0.958239 | 0 | 0 | 0 | 0 | 0 | 0 | 751 | 0.282543 |
73612698a39e054c2b652bdecf1e853efdbc6d55 | 526 | py | Python | src/importer/importer.py | tiefenauer/ip7-python | 512105ba39110ec77d2ea0961dd7c2a42d4ec26d | [
"MIT"
] | null | null | null | src/importer/importer.py | tiefenauer/ip7-python | 512105ba39110ec77d2ea0961dd7c2a42d4ec26d | [
"MIT"
] | null | null | null | src/importer/importer.py | tiefenauer/ip7-python | 512105ba39110ec77d2ea0961dd7c2a42d4ec26d | [
"MIT"
] | null | null | null | import logging
from abc import ABC, abstractmethod
from pony.orm import db_session, commit
log = logging.getLogger(__name__)
class Importer(ABC):
def __init__(self, TargetEntity):
self.TargetEntity = TargetEntity
@db_session
def truncate(self):
log.info('Truncating target tables...')
... | 21.04 | 52 | 0.653992 | 396 | 0.752852 | 0 | 0 | 284 | 0.539924 | 0 | 0 | 78 | 0.148289 |
73617c822f5af71e4276c1b4c85554260d13ae06 | 982 | py | Python | news/pybo/migrations/0006_auto_20211010_0322.py | Smashh712/nrib | 375c9625e9efa6bb9a6f466312de3c6fcd5818a4 | [
"MIT"
] | null | null | null | news/pybo/migrations/0006_auto_20211010_0322.py | Smashh712/nrib | 375c9625e9efa6bb9a6f466312de3c6fcd5818a4 | [
"MIT"
] | null | null | null | news/pybo/migrations/0006_auto_20211010_0322.py | Smashh712/nrib | 375c9625e9efa6bb9a6f466312de3c6fcd5818a4 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-10-09 18:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pybo', '0005_auto_20211010_0320'),
]
operations = [
migrations.AddField(
model_name='issue',
name='agree_representor... | 28.882353 | 73 | 0.580448 | 889 | 0.905295 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.205703 |
7361d838090b7ba746e73857fad1d1b69e7ce317 | 852 | py | Python | anno_gen/modify_filesprocessed.py | KevinQian97/diva_toolbox | de83de7f7602665c92dca943ab2a0b4c1b2fdfde | [
"Apache-2.0"
] | null | null | null | anno_gen/modify_filesprocessed.py | KevinQian97/diva_toolbox | de83de7f7602665c92dca943ab2a0b4c1b2fdfde | [
"Apache-2.0"
] | null | null | null | anno_gen/modify_filesprocessed.py | KevinQian97/diva_toolbox | de83de7f7602665c92dca943ab2a0b4c1b2fdfde | [
"Apache-2.0"
] | 1 | 2021-09-29T04:10:10.000Z | 2021-09-29T04:10:10.000Z | import json
import os
def get_file_index(filesProcessed):
new_dict = {}
for f in filesProcessed:
new_dict[f]={"framerate": 30.0, "selected": {"0": 1, "9000": 0}}
return new_dict
ref = json.load(open("/home/lijun/downloads/kf1_meta/references/kf1_all.json","r"))
files = ref["filesProcessed"]
print... | 32.769231 | 107 | 0.738263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.433099 |
73622863ce396d64c3c5ebe2afec91bcbe2b4043 | 2,561 | py | Python | monotone_bipartition/search.py | mvcisback/monotone-bipartition | c92262fac14258ed25619681ebcb0f8734044d22 | [
"MIT"
] | 1 | 2017-05-17T22:47:33.000Z | 2017-05-17T22:47:33.000Z | monotone_bipartition/search.py | mvcisback/multidim-threshold | c92262fac14258ed25619681ebcb0f8734044d22 | [
"MIT"
] | 10 | 2019-04-01T17:05:14.000Z | 2020-05-01T17:23:18.000Z | monotone_bipartition/search.py | mvcisback/monotone-bipartition | c92262fac14258ed25619681ebcb0f8734044d22 | [
"MIT"
] | 4 | 2017-02-03T01:30:03.000Z | 2018-04-25T22:28:23.000Z | from enum import Enum, auto
import funcy as fn
import numpy as np
from monotone_bipartition import rectangles as mdtr
from monotone_bipartition import refine
EPS = 1e-4
class SearchResultType(Enum):
TRIVIALLY_FALSE = auto()
TRIVIALLY_TRUE = auto()
NON_TRIVIAL = auto()
def diagonal_convex_comb(r):
... | 28.775281 | 77 | 0.636861 | 111 | 0.043342 | 0 | 0 | 0 | 0 | 0 | 0 | 311 | 0.121437 |
73623a0c8d94829ad21399f5bae6f22979a769e7 | 1,562 | py | Python | api/web/apps/auth/views.py | procool/itstructure | 6aa3a43e1a759f5509f130ddf911779645dc89d0 | [
"BSD-2-Clause"
] | null | null | null | api/web/apps/auth/views.py | procool/itstructure | 6aa3a43e1a759f5509f130ddf911779645dc89d0 | [
"BSD-2-Clause"
] | null | null | null | api/web/apps/auth/views.py | procool/itstructure | 6aa3a43e1a759f5509f130ddf911779645dc89d0 | [
"BSD-2-Clause"
] | null | null | null | from flask import url_for
from flaskcbv.view import View
from flaskcbv.conf import settings
from misc.mixins import HelperMixin
from misc.views import JSONView
class authView(JSONView):
def helper(self):
return """Authorizaion handler
Use "login" and "passwd" arguments by GET or POST to get ses... | 26.474576 | 107 | 0.608195 | 1,380 | 0.883483 | 0 | 0 | 0 | 0 | 0 | 0 | 356 | 0.227913 |
7363b08e9959a774b4c96272382532b62b203a94 | 2,069 | py | Python | tests/test_heart_forest.py | RainingComputers/pykitml | 1c3e50cebcdb6c4da63979ef9a812b44d23a4857 | [
"MIT"
] | 34 | 2020-03-06T07:53:43.000Z | 2022-03-13T06:12:29.000Z | tests/test_heart_forest.py | RainingComputers/pykitml | 1c3e50cebcdb6c4da63979ef9a812b44d23a4857 | [
"MIT"
] | 6 | 2021-06-08T22:43:23.000Z | 2022-03-08T13:57:33.000Z | tests/test_heart_forest.py | RainingComputers/pykitml | 1c3e50cebcdb6c4da63979ef9a812b44d23a4857 | [
"MIT"
] | 1 | 2020-11-30T21:20:32.000Z | 2020-11-30T21:20:32.000Z | from pykitml.testing import pktest_graph, pktest_nograph
@pktest_graph
def test_heart_forest():
import os.path
import numpy as np
import pykitml as pk
from pykitml.datasets import heartdisease
# Download the dataset
if(not os.path.exists('heartdisease.pkl')): heartdisease.get()
# Lo... | 29.140845 | 88 | 0.685839 | 0 | 0 | 0 | 0 | 1,844 | 0.891252 | 0 | 0 | 627 | 0.303045 |
736486ab642c356a4d5f9aa4e677a035c93276d3 | 25,682 | py | Python | pdf_audit.py | marctjones/perception | 9a9fe4e5cef6a2aa66544066d8c03e0e9c3b0528 | [
"MIT"
] | null | null | null | pdf_audit.py | marctjones/perception | 9a9fe4e5cef6a2aa66544066d8c03e0e9c3b0528 | [
"MIT"
] | null | null | null | pdf_audit.py | marctjones/perception | 9a9fe4e5cef6a2aa66544066d8c03e0e9c3b0528 | [
"MIT"
] | null | null | null | from globals import Globals
import os
import subprocess
import datetime as dt
from urllib import \
request as request
# urlopen
from io import \
StringIO, BytesIO
import string
import requests
import re
import csv
import threading
import utils as utils
import time
import datetime as datetime
import multiproces... | 43.825939 | 133 | 0.50035 | 24,867 | 0.968266 | 0 | 0 | 0 | 0 | 0 | 0 | 4,904 | 0.190951 |
7df69847b16a72c401c8d03768fb93c74d01b5c9 | 2,114 | py | Python | morepath/tests/test_method_directive.py | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | null | null | null | morepath/tests/test_method_directive.py | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | null | null | null | morepath/tests/test_method_directive.py | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | null | null | null | import morepath
from webtest import TestApp as Client
def test_implicit_function():
class app(morepath.App):
@morepath.dispatch_method()
def one(self):
return "Default one"
@morepath.dispatch_method()
def two(self):
return "Default two"
@app.path(path=... | 21.793814 | 72 | 0.580889 | 702 | 0.332072 | 0 | 0 | 1,293 | 0.611637 | 0 | 0 | 211 | 0.099811 |
7df6fe1ea2b65847f447c2f9cd2b5b13e71d4aef | 14,020 | py | Python | edb/edgeql/tracer.py | hyperdrivetech/edgedb | 6d84d607889eca771e902f28c2329e388fd172b0 | [
"Apache-2.0"
] | null | null | null | edb/edgeql/tracer.py | hyperdrivetech/edgedb | 6d84d607889eca771e902f28c2329e388fd172b0 | [
"Apache-2.0"
] | null | null | null | edb/edgeql/tracer.py | hyperdrivetech/edgedb | 6d84d607889eca771e902f28c2329e388fd172b0 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2015-present MagicStack Inc. and the EdgeDB 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... | 27.984032 | 78 | 0.604922 | 1,513 | 0.107917 | 0 | 0 | 10,029 | 0.715335 | 0 | 0 | 1,460 | 0.104137 |
7df75836ee916a28f4a031535dcb56b53a8daeb4 | 255 | py | Python | libraries/website/docs/snippets/envs/tree_to_list.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 95 | 2020-01-02T23:02:34.000Z | 2022-03-08T18:57:24.000Z | libraries/website/docs/snippets/envs/tree_to_list.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 44 | 2020-01-05T03:07:45.000Z | 2021-08-11T20:45:53.000Z | libraries/website/docs/snippets/envs/tree_to_list.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 5 | 2020-04-04T16:46:36.000Z | 2022-03-30T08:10:02.000Z | from typing import List
from mathy_core import ExpressionParser, MathExpression
parser = ExpressionParser()
expression: MathExpression = parser.parse("4 + 2x")
nodes: List[MathExpression] = expression.to_list()
# len([4,+,2,*,x])
assert len(nodes) == 5
| 25.5 | 55 | 0.74902 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.101961 |
7df75aa4524bb4f5a708857ab0d660fb8ccedfb8 | 603 | py | Python | math/0x04-convolutions_and_pooling/test/2-main.py | cbarros7/holbertonschool-machine_learning | 1edb4c253441f6319b86c9c590d1e7dd3fc32bf4 | [
"MIT"
] | 1 | 2022-03-09T19:12:22.000Z | 2022-03-09T19:12:22.000Z | math/0x04-convolutions_and_pooling/test/2-main.py | cbarros7/holbertonschool-machine_learning | 1edb4c253441f6319b86c9c590d1e7dd3fc32bf4 | [
"MIT"
] | null | null | null | math/0x04-convolutions_and_pooling/test/2-main.py | cbarros7/holbertonschool-machine_learning | 1edb4c253441f6319b86c9c590d1e7dd3fc32bf4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
convolve_grayscale_padding = __import__(
'2-convolve_grayscale_padding').convolve_grayscale_padding
if __name__ == '__main__':
dataset = np.load('../../supervised_learning/data/MNIST.npz')
images = dataset['X_train']
print(ima... | 27.409091 | 68 | 0.6733 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.207297 |
7df78eabcc3fb72c6b36049cdb0e6b3517bdbd8a | 2,950 | py | Python | code.py | surojitnath/olympic-hero | aee1ddf291bf5097fa7fd5442483fbbe87ec001f | [
"MIT"
] | null | null | null | code.py | surojitnath/olympic-hero | aee1ddf291bf5097fa7fd5442483fbbe87ec001f | [
"MIT"
] | null | null | null | code.py | surojitnath/olympic-hero | aee1ddf291bf5097fa7fd5442483fbbe87ec001f | [
"MIT"
] | null | null | null | # --------------
#Importing header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Path of the file
data=pd.read_csv(path)
data.rename(columns={'Total':'Total_Medals'},inplace =True)
data.head(10)
#Code starts here
# --------------
try:
data['Better_Event'] = np.where(... | 27.570093 | 109 | 0.694915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,149 | 0.389492 |
7df8cceb59a2bcfb8715aedd4215b42ada0971fd | 7,096 | py | Python | planes/kissSlope/kissSlopeWing2.py | alexpGH/blenderCadCamTools | 1db2a750ed227d46e174350a2e37c4951c669867 | [
"MIT"
] | 3 | 2020-12-28T11:58:26.000Z | 2021-05-31T03:03:04.000Z | planes/kissSlope/kissSlopeWing2.py | alexpGH/blenderCadCamTools | 1db2a750ed227d46e174350a2e37c4951c669867 | [
"MIT"
] | null | null | null | planes/kissSlope/kissSlopeWing2.py | alexpGH/blenderCadCamTools | 1db2a750ed227d46e174350a2e37c4951c669867 | [
"MIT"
] | null | null | null | import bpy
import math
import numpy as np
#=== add scripts dir to path
import sys
import os
#=== define path of scripts dir
libDir=bpy.path.abspath("//../../scripts/") # version1: relative to current file
#libDir="/where/you/placed/blenderCadCam/scripts/" #version 2: usa an absolute path
if not libDir in sys.path:
... | 29.322314 | 140 | 0.567644 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,396 | 0.478579 |
7dfb15185b5928b42e0c69caa80b31116a8fea1a | 1,715 | py | Python | saleor/order/migrations/0072_django_price_2.py | elwoodxblues/saleor | 5e4e4a4259a011d24b04ebd24c77c689de843fa1 | [
"CC-BY-4.0"
] | 19 | 2019-12-03T17:28:07.000Z | 2021-09-10T21:30:52.000Z | saleor/order/migrations/0072_django_price_2.py | elwoodxblues/saleor | 5e4e4a4259a011d24b04ebd24c77c689de843fa1 | [
"CC-BY-4.0"
] | 51 | 2019-12-06T08:06:07.000Z | 2021-05-06T02:10:50.000Z | saleor/order/migrations/0072_django_price_2.py | elwoodxblues/saleor | 5e4e4a4259a011d24b04ebd24c77c689de843fa1 | [
"CC-BY-4.0"
] | 20 | 2020-02-03T00:38:59.000Z | 2022-01-03T13:07:52.000Z | # Generated by Django 2.2.4 on 2019-08-14 09:13
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("order", "0071_order_gift_cards")]
operations = [
migrations.RenameField(
model_name="order",
old... | 31.181818 | 85 | 0.58484 | 1,589 | 0.926531 | 0 | 0 | 0 | 0 | 0 | 0 | 407 | 0.237318 |
7dfb769eb03d5be318cb102a630728947e956816 | 9,382 | py | Python | miping/training/features.py | mclgoerg/MiningPersonalityInGerman | 4c5811a0f72100b7afef9695475a6de9251444b7 | [
"Apache-2.0"
] | 1 | 2020-09-11T01:11:19.000Z | 2020-09-11T01:11:19.000Z | miping/training/features.py | mclgoerg/MiningPersonalityInGerman | 4c5811a0f72100b7afef9695475a6de9251444b7 | [
"Apache-2.0"
] | null | null | null | miping/training/features.py | mclgoerg/MiningPersonalityInGerman | 4c5811a0f72100b7afef9695475a6de9251444b7 | [
"Apache-2.0"
] | 2 | 2020-08-12T15:57:06.000Z | 2020-12-17T18:11:03.000Z | import numpy as np
from sklearn.preprocessing import FunctionTransformer
from sklearn.pipeline import Pipeline
from sklearn.pipeline import FeatureUnion
from sklearn.preprocessing import StandardScaler
from ..models.profile import Profile
from ..interfaces.helper import Helper
from ..interfaces.glove import GloVe
fro... | 32.351724 | 77 | 0.588361 | 9,013 | 0.960669 | 0 | 0 | 0 | 0 | 0 | 0 | 4,574 | 0.487529 |
7dfc55af75328775b1d9e9abc358301541231f7c | 1,383 | py | Python | tests/unit/test_serializers.py | launchpadrecruits/placebo | 7b6db70a341d935a2e250b76d1ea47e56e8c9d92 | [
"Apache-2.0"
] | 1 | 2019-06-10T13:52:41.000Z | 2019-06-10T13:52:41.000Z | tests/unit/test_serializers.py | launchpadrecruits/placebo | 7b6db70a341d935a2e250b76d1ea47e56e8c9d92 | [
"Apache-2.0"
] | 1 | 2018-10-01T13:11:50.000Z | 2018-10-01T13:11:50.000Z | tests/unit/test_serializers.py | launchpadrecruits/lpr-placebo | 7b6db70a341d935a2e250b76d1ea47e56e8c9d92 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Mitch Garnaat
#
# 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 wri... | 33.731707 | 187 | 0.707158 | 353 | 0.255242 | 0 | 0 | 0 | 0 | 0 | 0 | 784 | 0.566884 |
7dfc5fe7b48790825f5784ca8956028cbaaac9a8 | 1,267 | py | Python | Chapter11/web_03.py | vabyte/Modern-Python-Standard-Library-Cookbook | 4f53e3ab7b61aca1cca9343e7421e170280cd5b5 | [
"MIT"
] | 84 | 2018-08-09T09:30:03.000Z | 2022-01-04T23:20:38.000Z | Chapter11/web_03.py | jiro74/Modern-Python-Standard-Library-Cookbook | 4f53e3ab7b61aca1cca9343e7421e170280cd5b5 | [
"MIT"
] | 1 | 2019-11-04T18:57:40.000Z | 2020-09-07T08:52:25.000Z | Chapter11/web_03.py | jiro74/Modern-Python-Standard-Library-Cookbook | 4f53e3ab7b61aca1cca9343e7421e170280cd5b5 | [
"MIT"
] | 33 | 2018-09-26T11:05:55.000Z | 2022-03-15T10:31:10.000Z | import urllib.request
import urllib.parse
import json
def http_request(url, query=None, method=None, headers={}, data=None):
"""Perform an HTTP request and return the associated response."""
parts = vars(urllib.parse.urlparse(url))
if query:
parts['query'] = urllib.parse.urlencode(query)
url ... | 31.675 | 75 | 0.594317 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 272 | 0.21468 |
7dfda8cef5923a2a0d78158e8c874838389cfd46 | 3,678 | py | Python | src/oci/dns/models/external_master.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/dns/models/external_master.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/dns/models/external_master.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 27.244444 | 245 | 0.609027 | 3,138 | 0.853181 | 0 | 0 | 3,168 | 0.861338 | 0 | 0 | 2,370 | 0.644372 |
7dff476f5b07538c175407ac6793f4c21aad8c8f | 899 | py | Python | cinder/tests/unit/backup/fake_service_with_verify.py | puremudassir/cinder | 99aad0d094e726d328ea815cea8ebdc14957da8c | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/backup/fake_service_with_verify.py | puremudassir/cinder | 99aad0d094e726d328ea815cea8ebdc14957da8c | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/backup/fake_service_with_verify.py | puremudassir/cinder | 99aad0d094e726d328ea815cea8ebdc14957da8c | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2014 Deutsche Telekom AG
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 37.458333 | 78 | 0.719689 | 174 | 0.193548 | 0 | 0 | 0 | 0 | 0 | 0 | 624 | 0.694105 |
b400a722c717d6322475d075e5e6ca07343e213f | 2,195 | py | Python | src/fasttick.py | JevinJ/Bittrex-Notify | ea1057fa2fd59d191893eb7a4c31f35db789ba29 | [
"MIT"
] | 12 | 2017-08-15T08:40:44.000Z | 2018-01-30T20:55:20.000Z | src/fasttick.py | alimogh/BittrexNotify | ea1057fa2fd59d191893eb7a4c31f35db789ba29 | [
"MIT"
] | 5 | 2017-08-30T15:46:03.000Z | 2018-02-16T09:18:27.000Z | src/fasttick.py | alimogh/BittrexNotify | ea1057fa2fd59d191893eb7a4c31f35db789ba29 | [
"MIT"
] | 3 | 2017-08-28T17:58:03.000Z | 2017-12-05T02:05:18.000Z | import config
import misc
def heartbeat():
"""
Processes data from Bittrex into a simpler dictionary,
calls the save function on it, deletes the oldest
saved dictionary(if it's out of lookback range), and finally
creates a list of the best coins to be used in tkinter listboxes.
:return: A list... | 45.729167 | 99 | 0.615034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 698 | 0.317995 |
b4012c4378e508ce63325920dec3916fc3ec12bc | 2,325 | py | Python | src/mlb_statsapi/model/api/game.py | power-edge/mlb_statsapi_etl | 9cca2ae059e8aab98ed460e7b71ad6eeeed09ffe | [
"Apache-2.0"
] | null | null | null | src/mlb_statsapi/model/api/game.py | power-edge/mlb_statsapi_etl | 9cca2ae059e8aab98ed460e7b71ad6eeeed09ffe | [
"Apache-2.0"
] | null | null | null | src/mlb_statsapi/model/api/game.py | power-edge/mlb_statsapi_etl | 9cca2ae059e8aab98ed460e7b71ad6eeeed09ffe | [
"Apache-2.0"
] | null | null | null | """
created by nikos at 4/26/21
"""
import datetime
from ..base import MLBStatsAPIEndpointModel
from mlb_statsapi.utils.stats_api_object import configure_api
YMDTHMS = '%Y-%m-%dT%H:%M:%SZ'
YYYYMMDD_HHMMSS = '%Y%m%d_%H%M%S'
MMDDYYYY_HHMMSS = '%m%d%Y_%H%M%S'
class GameModel(MLBStatsAPIEndpointModel):
date_forma... | 25.549451 | 64 | 0.667957 | 2,062 | 0.886882 | 0 | 0 | 1,757 | 0.755699 | 0 | 0 | 137 | 0.058925 |
b401775f5af0e9b7b7978646db33631b271d516f | 4,351 | py | Python | scripts/build_folding_map.py | tsieprawski/md4c | 9d99b1262de3353f0530ac6b31d8c6934003b61f | [
"MIT"
] | 475 | 2016-11-27T18:37:51.000Z | 2022-03-30T19:46:29.000Z | scripts/build_folding_map.py | tsieprawski/md4c | 9d99b1262de3353f0530ac6b31d8c6934003b61f | [
"MIT"
] | 173 | 2016-12-05T01:38:37.000Z | 2022-01-14T10:06:30.000Z | scripts/build_folding_map.py | tsieprawski/md4c | 9d99b1262de3353f0530ac6b31d8c6934003b61f | [
"MIT"
] | 110 | 2016-11-29T20:02:16.000Z | 2022-03-30T23:51:58.000Z | #!/usr/bin/env python3
import os
import sys
import textwrap
self_path = os.path.dirname(os.path.realpath(__file__));
f = open(self_path + "/unicode/CaseFolding.txt", "r")
status_list = [ "C", "F" ]
folding_list = [ dict(), dict(), dict() ]
# Filter the foldings for "full" folding.
for line in f:
comment_off =... | 35.958678 | 107 | 0.6302 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,198 | 0.275339 |
b4024d84d4513279dde8eeb7b78e3491e9770d6e | 1,038 | py | Python | app/api/v1/models/user_model.py | munniomer/Send-IT-Api-v1 | 17041c987638c7e47c7c2ebed29bf7e2b5156bed | [
"CNRI-Python",
"OML"
] | null | null | null | app/api/v1/models/user_model.py | munniomer/Send-IT-Api-v1 | 17041c987638c7e47c7c2ebed29bf7e2b5156bed | [
"CNRI-Python",
"OML"
] | null | null | null | app/api/v1/models/user_model.py | munniomer/Send-IT-Api-v1 | 17041c987638c7e47c7c2ebed29bf7e2b5156bed | [
"CNRI-Python",
"OML"
] | 1 | 2019-02-05T07:44:19.000Z | 2019-02-05T07:44:19.000Z | users = []
class UserModel(object):
"""Class user models."""
def __init__(self):
self.db = users
def add_user(self, fname, lname, email, phone, password, confirm_password, city):
""" Method for saving user to the dictionary """
payload = {
"userId": len(self.db)+1,
... | 26.615385 | 85 | 0.531792 | 1,023 | 0.985549 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.232177 |
b402736fe41a1923f5e1f2be2b9ac727b56303ec | 6,644 | py | Python | Codigo/pruebas/Jose_Gonzalez/Solucion_PruebaTipoPiso.py | JoaquinRodriguez2006/RoboCup_Junior_Material | 04f295010272fb8287c8f214bf69f1a61ee2b7cf | [
"MIT"
] | null | null | null | Codigo/pruebas/Jose_Gonzalez/Solucion_PruebaTipoPiso.py | JoaquinRodriguez2006/RoboCup_Junior_Material | 04f295010272fb8287c8f214bf69f1a61ee2b7cf | [
"MIT"
] | null | null | null | Codigo/pruebas/Jose_Gonzalez/Solucion_PruebaTipoPiso.py | JoaquinRodriguez2006/RoboCup_Junior_Material | 04f295010272fb8287c8f214bf69f1a61ee2b7cf | [
"MIT"
] | 1 | 2022-03-19T22:57:33.000Z | 2022-03-19T22:57:33.000Z | from controller import Robot
from controller import Motor
from controller import PositionSensor
from controller import Robot, DistanceSensor, GPS, Camera, Receiver, Emitter
import cv2
import numpy as np
import math
import time
robot = Robot()
timeStep = 32
tile_size = 0.12
speed = 6.28
media_baldoza = 0.06
estado = 1
... | 28.033755 | 124 | 0.615593 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,043 | 0.307495 |
b403104a45ede1110a9c5cca95878c43993fc086 | 433 | py | Python | drip/migrations/0002_querysetrule_rule_type.py | RentFreeMedia/django-drip-campaigns | a71e5d3a3f242c04a6f7f921b85aa01daff467f8 | [
"MIT"
] | 46 | 2020-07-23T17:47:33.000Z | 2021-11-25T16:57:35.000Z | drip/migrations/0002_querysetrule_rule_type.py | RentFreeMedia/django-drip-campaigns | a71e5d3a3f242c04a6f7f921b85aa01daff467f8 | [
"MIT"
] | 54 | 2020-06-19T17:57:42.000Z | 2021-09-22T19:34:48.000Z | drip/migrations/0002_querysetrule_rule_type.py | kaozdl/django-drip | a71e5d3a3f242c04a6f7f921b85aa01daff467f8 | [
"MIT"
] | 19 | 2020-08-30T05:29:13.000Z | 2022-02-08T20:27:17.000Z | # Generated by Django 3.0.7 on 2020-11-25 13:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('drip', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='querysetrule',
name='rule_type',
... | 22.789474 | 104 | 0.577367 | 340 | 0.785219 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.265589 |
b4040d06558b8483134d9ca3f4c2ab385bbdc016 | 3,393 | py | Python | venv/lib/python3.6/site-packages/cligj/__init__.py | booklover98/A-_pathfinding | 09afebfc953ce9773bc4fc781eb6d0496caccfba | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/cligj/__init__.py | booklover98/A-_pathfinding | 09afebfc953ce9773bc4fc781eb6d0496caccfba | [
"MIT"
] | 7 | 2021-06-04T23:45:15.000Z | 2022-03-12T00:44:14.000Z | virtual/Lib/site-packages/cligj/__init__.py | owenabrams/bluemoonkampala | 8801df64e91683a2641f2cd4bcbe03ebc7f40828 | [
"MIT"
] | null | null | null | # cligj
# Shared arguments and options.
import click
from .features import normalize_feature_inputs
# Arguments.
# Multiple input files.
files_in_arg = click.argument(
'files',
nargs=-1,
type=click.Path(resolve_path=True),
required=True,
metavar="INPUTS...")
# Multiple files, last of which is... | 24.586957 | 78 | 0.660183 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,640 | 0.483348 |
b404133dc455d3af035e0832fd933c69627e3b05 | 2,031 | py | Python | setup.py | ELC/testnbdev | 571400a9308ba91f05f6fabad5d3f79fd4417ab1 | [
"Apache-2.0"
] | 1 | 2021-02-19T15:34:58.000Z | 2021-02-19T15:34:58.000Z | setup.py | ELC/testnbdev | 571400a9308ba91f05f6fabad5d3f79fd4417ab1 | [
"Apache-2.0"
] | 2 | 2021-09-28T05:49:28.000Z | 2022-02-26T10:24:52.000Z | setup.py | ELC/nbdev_template | 571400a9308ba91f05f6fabad5d3f79fd4417ab1 | [
"Apache-2.0"
] | null | null | null | from pkg_resources import parse_version
from configparser import ConfigParser
import setuptools
assert parse_version(setuptools.__version__)>=parse_version('36.2')
# note: all settings are in settings.ini; edit there, not here
config = ConfigParser(delimiters=['='])
config.read('settings.ini')
config = config['DEFAULT... | 39.823529 | 116 | 0.681438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 802 | 0.394879 |
b40507b05e0b887443fd6d70a1bf0020514bacc1 | 3,730 | py | Python | amaascore/tools/generate_party.py | amaas-fintech/amaas-core-sdk-python | bd77884de6e5ab05d864638addeb4bb338a51183 | [
"Apache-2.0"
] | null | null | null | amaascore/tools/generate_party.py | amaas-fintech/amaas-core-sdk-python | bd77884de6e5ab05d864638addeb4bb338a51183 | [
"Apache-2.0"
] | 8 | 2017-06-06T09:42:41.000Z | 2018-01-16T10:16:16.000Z | amaascore/tools/generate_party.py | amaas-fintech/amaas-core-sdk-python | bd77884de6e5ab05d864638addeb4bb338a51183 | [
"Apache-2.0"
] | 8 | 2017-01-18T04:14:01.000Z | 2017-12-01T08:03:10.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
from amaasutils.random_utils import random_string, random_decimal
import random
from amaascore.core.reference import Reference
from amaascore.parties.asset_manager import AssetManager
from amaascore.parties.broker import Broker
from am... | 44.404762 | 113 | 0.746917 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 299 | 0.080161 |
b405b1ef752a1702183bea0b47a0bc6616babde1 | 9,291 | py | Python | fitgrid/utils/lmer.py | vishalbelsare/fitgrid | 0197e7a3fc2c937da03d768b5c91220eebe54a22 | [
"BSD-3-Clause"
] | 10 | 2020-02-01T22:58:32.000Z | 2022-03-29T11:31:00.000Z | fitgrid/utils/lmer.py | vishalbelsare/fitgrid | 0197e7a3fc2c937da03d768b5c91220eebe54a22 | [
"BSD-3-Clause"
] | 161 | 2018-09-11T16:41:30.000Z | 2021-08-03T19:26:23.000Z | fitgrid/utils/lmer.py | vishalbelsare/fitgrid | 0197e7a3fc2c937da03d768b5c91220eebe54a22 | [
"BSD-3-Clause"
] | 4 | 2019-02-27T08:11:31.000Z | 2021-07-21T20:50:36.000Z | # -*- coding: utf-8 -*-
"""User functions to streamline working with selected pymer4 LMER fit
attributes from lme4::lmer and lmerTest for ``fitgrid.lmer`` grids.
"""
import functools
import re
import warnings
import numpy as np
import pandas as pd
import matplotlib as mpl
from matplotlib import pyplot as plt
import f... | 32.486014 | 103 | 0.633839 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,705 | 0.506404 |
b405ca5c19bd60bffd27ebed33907aa4cbf83da9 | 2,055 | py | Python | pyesasky/jupyter_server.py | pierfra-ro/pyesasky | a9342efcaa5cca088ed9a5afa2c98d3e9aa4bd0f | [
"BSD-3-Clause"
] | 13 | 2019-05-30T19:57:37.000Z | 2021-09-10T09:43:49.000Z | pyesasky/jupyter_server.py | pierfra-ro/pyesasky | a9342efcaa5cca088ed9a5afa2c98d3e9aa4bd0f | [
"BSD-3-Clause"
] | 21 | 2019-06-21T18:55:25.000Z | 2022-02-27T14:48:13.000Z | pyesasky/jupyter_server.py | pierfra-ro/pyesasky | a9342efcaa5cca088ed9a5afa2c98d3e9aa4bd0f | [
"BSD-3-Clause"
] | 8 | 2019-05-30T12:20:48.000Z | 2022-03-04T04:01:20.000Z | import os
import json
from hashlib import md5
from tornado import web
from notebook.utils import url_path_join
from notebook.base.handlers import IPythonHandler
__all__ = ['load_jupyter_server_extension']
STATIC_DIR = os.path.join(os.path.dirname(__file__), 'nbextension', 'static');
CONFIG = os.path.expanduser('~/.py... | 27.77027 | 79 | 0.620925 | 862 | 0.419465 | 0 | 0 | 0 | 0 | 0 | 0 | 349 | 0.16983 |
b4073a213da55b416141036502c3d25e2d22ed63 | 3,552 | py | Python | pingpongskill/pingpongskill.py | Garvys/PingPongSkill | 71749a34772326dd83121bb0ab6fad52b7d8d694 | [
"MIT"
] | 1 | 2017-09-22T13:30:20.000Z | 2017-09-22T13:30:20.000Z | pingpongskill/pingpongskill.py | Garvys/PingPongSkill | 71749a34772326dd83121bb0ab6fad52b7d8d694 | [
"MIT"
] | null | null | null | pingpongskill/pingpongskill.py | Garvys/PingPongSkill | 71749a34772326dd83121bb0ab6fad52b7d8d694 | [
"MIT"
] | null | null | null | # -*-: coding utf-8 -*-
""" Skeleton Snips skill. """
import re
import json
import os
import datetime
from text2num import text2num
from collections import defaultdict
FORMAT = '%Y.%m.%dT%H:%M:%S'
class PingPongSkill(object):
""" Skeleton Snips skill. """
def __init__(self):
pass
def handle_lo... | 30.62069 | 79 | 0.566441 | 2,486 | 0.699887 | 0 | 0 | 0 | 0 | 0 | 0 | 486 | 0.136824 |
b407548d1539781a310dd11a278698c4338d7000 | 13,006 | py | Python | xarray/backends/npy_io.py | martinResearch/xarray | e921d1bfa4785b10310f8b5d46a1efacba7e1cc9 | [
"Apache-2.0"
] | null | null | null | xarray/backends/npy_io.py | martinResearch/xarray | e921d1bfa4785b10310f8b5d46a1efacba7e1cc9 | [
"Apache-2.0"
] | null | null | null | xarray/backends/npy_io.py | martinResearch/xarray | e921d1bfa4785b10310f8b5d46a1efacba7e1cc9 | [
"Apache-2.0"
] | null | null | null |
import numpy as np
import xarray as xr
import pandas as pd
import sys
import json
import os
import datetime
from xarray.core.utils import (
decode_numpy_dict_values,
either_dict_or_kwargs,
ensure_us_time_resolution,
)
from numpy.compat import (
asbytes, asstr, asunicode, bytes, basestring, os_fspath,... | 39.531915 | 267 | 0.541827 | 3,381 | 0.259957 | 0 | 0 | 0 | 0 | 0 | 0 | 2,030 | 0.156082 |
b408eeeaec183c35458c8ea0619e1ec8dfb285b7 | 14,222 | py | Python | applications/popart/bert/bert_data/squad_dataset.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | applications/popart/bert/bert_data/squad_dataset.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | applications/popart/bert/bert_data/squad_dataset.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | # Copyright (c) 2019 Graphcore Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 36.84456 | 141 | 0.592181 | 7,293 | 0.512797 | 0 | 0 | 0 | 0 | 0 | 0 | 2,230 | 0.156799 |
b40913984e0d9a08276edd74c8a43fc4a6017a70 | 9,921 | py | Python | utils.py | sWizad/HashNeRF-pytorch | e8fe9b4879fc6ef3cdfa8fd3d268a92c4fa0d910 | [
"MIT"
] | null | null | null | utils.py | sWizad/HashNeRF-pytorch | e8fe9b4879fc6ef3cdfa8fd3d268a92c4fa0d910 | [
"MIT"
] | null | null | null | utils.py | sWizad/HashNeRF-pytorch | e8fe9b4879fc6ef3cdfa8fd3d268a92c4fa0d910 | [
"MIT"
] | null | null | null | import json
import numpy as np
import pdb
import torch
from ray_utils import get_rays, get_ray_directions, get_ndc_rays
BOX_OFFSETS = torch.tensor([[[i,j,k] for i in [0, 1] for j in [0, 1] for k in [0, 1]]],
device='cuda')
SQR_OFFSETS = torch.tensor([[[i,j] for i in [0, 1] for j in [0,... | 40.493878 | 123 | 0.627961 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,974 | 0.299768 |
b4091bea05e2b9f2e78f9f40870c9ac7e8a9cac3 | 15,755 | py | Python | eval.py | dawnchen123/VS-Net | 21aa8873e32351716302934887f6a08e7d568ea2 | [
"Apache-2.0"
] | 55 | 2021-04-17T08:15:06.000Z | 2022-03-30T02:38:27.000Z | eval.py | dawnchen123/VS-Net | 21aa8873e32351716302934887f6a08e7d568ea2 | [
"Apache-2.0"
] | 3 | 2021-05-30T03:29:01.000Z | 2022-03-03T00:47:33.000Z | eval.py | dawnchen123/VS-Net | 21aa8873e32351716302934887f6a08e7d568ea2 | [
"Apache-2.0"
] | 11 | 2021-07-01T15:15:23.000Z | 2022-02-12T06:47:26.000Z | import os
import cv2
import time
import json
import random
import inspect
import argparse
import numpy as np
from tqdm import tqdm
from dataloaders import make_data_loader
from models.sync_batchnorm.replicate import patch_replication_callback
from models.vs_net import *
from utils.loss import loss_dict
from utils.lr_s... | 45.403458 | 124 | 0.548588 | 13,034 | 0.826978 | 0 | 0 | 0 | 0 | 0 | 0 | 2,690 | 0.170674 |
b40a24b1b84590432a339ee0e8fac4f84e897ac1 | 2,692 | py | Python | data/__init__.py | Joaomlg/multilayer-perceptron-mnist | 0454c4970c3a06a37ac7c20787a1bdf1cda7da0f | [
"MIT"
] | 13 | 2021-05-15T04:22:04.000Z | 2022-03-29T10:55:32.000Z | data/__init__.py | Joaomlg/multilayer-perceptron-mnist | 0454c4970c3a06a37ac7c20787a1bdf1cda7da0f | [
"MIT"
] | null | null | null | data/__init__.py | Joaomlg/multilayer-perceptron-mnist | 0454c4970c3a06a37ac7c20787a1bdf1cda7da0f | [
"MIT"
] | 4 | 2021-05-18T07:48:52.000Z | 2021-07-10T10:11:41.000Z | import numpy as np
import gzip
import pickle
import os
import urllib.request
class MNIST:
host = 'http://yann.lecun.com/exdb/mnist/'
filenames = {
'train': ('train-images-idx3-ubyte.gz', 'train-labels-idx1-ubyte.gz'),
'test': ('t10k-images-idx3-ubyte.gz', 't10k-labels-idx1-ubyte.gz'),
}
dataset_filen... | 32.829268 | 110 | 0.686478 | 2,613 | 0.970654 | 0 | 0 | 0 | 0 | 0 | 0 | 422 | 0.156761 |
b40aad26fdc784cc5dfaf249f1c167e4160e4887 | 2,279 | py | Python | Exemple.py | LVWolff/Python_Lesson_2 | ece186f988c94a1aaa1656a1e6e1093c3d5b6251 | [
"MIT"
] | null | null | null | Exemple.py | LVWolff/Python_Lesson_2 | ece186f988c94a1aaa1656a1e6e1093c3d5b6251 | [
"MIT"
] | null | null | null | Exemple.py | LVWolff/Python_Lesson_2 | ece186f988c94a1aaa1656a1e6e1093c3d5b6251 | [
"MIT"
] | null | null | null | #Задачи на циклы и оператор условия------
#----------------------------------------
'''
Задача 1
Вывести на экран циклом пять строк из нулей, причем каждая строка должна быть пронумерована.
'''
for i in range(1, 6):
print(i, '0000000000000000000000000000000000000000000')
'''
Задача 2
Пользователь в цикле вводит 1... | 18.087302 | 92 | 0.67749 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,448 | 0.515119 |
b40bc88be7d9975ca6ad22574a73918dc37e3371 | 11,368 | py | Python | push_exp/main_CrouchSimulationForCOT.py | snumrl/DeepPushRecovery | dceb7f3114d4314cf3be875f43723255819e12a3 | [
"Apache-2.0"
] | null | null | null | push_exp/main_CrouchSimulationForCOT.py | snumrl/DeepPushRecovery | dceb7f3114d4314cf3be875f43723255819e12a3 | [
"Apache-2.0"
] | null | null | null | push_exp/main_CrouchSimulationForCOT.py | snumrl/DeepPushRecovery | dceb7f3114d4314cf3be875f43723255819e12a3 | [
"Apache-2.0"
] | 1 | 2021-07-26T15:08:58.000Z | 2021-07-26T15:08:58.000Z | import os
import numpy as np
import time
import multiprocessing as mp
import csv
import socket
import datetime
import math
import glob
from pypushexp import PushSim
# # input - [recorded item]
# [weight] : 48
# [height] : 160
# [crouch_angle] (deg)
# [step_length_ratio]
# [halfcycle_duration_rati... | 34.344411 | 139 | 0.598522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,980 | 0.350106 |
b40c71ed0a4ab0b122f61556dae6f792302c5678 | 776 | py | Python | lepiota/lepiota/urls.py | sgelias/lepiota | 4b30aa25ac5308229f6d41f1720e1af02557826e | [
"MIT"
] | null | null | null | lepiota/lepiota/urls.py | sgelias/lepiota | 4b30aa25ac5308229f6d41f1720e1af02557826e | [
"MIT"
] | null | null | null | lepiota/lepiota/urls.py | sgelias/lepiota | 4b30aa25ac5308229f6d41f1720e1af02557826e | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, re_path
from django.conf.urls import include
from django.views.generic import TemplateView, RedirectView
urlpatterns = [
# Administration
path('admin/', admin.site.urls),... | 29.846154 | 74 | 0.716495 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.238402 |
b40c87bef3a1437769ac688f07452b9daed5f901 | 189 | py | Python | src/base/admin.py | dhavall13/Decode | 8b9cbec72ade727d62edb90c3a38152e0285fe90 | [
"MIT"
] | null | null | null | src/base/admin.py | dhavall13/Decode | 8b9cbec72ade727d62edb90c3a38152e0285fe90 | [
"MIT"
] | null | null | null | src/base/admin.py | dhavall13/Decode | 8b9cbec72ade727d62edb90c3a38152e0285fe90 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Room, Topic, Message, User
admin.site.register(Room)
admin.site.register(Topic)
admin.site.register(Message)
admin.site.register(User)
| 23.625 | 46 | 0.804233 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b40e2538e7eca239f3b41df3368718122f54c302 | 10,744 | py | Python | gorilla/config/_config.py | sunjiahao1999/gorilla-core | bf43e3a49c7f79834ae969db38edd50f17ef5288 | [
"MIT"
] | 4 | 2021-07-28T04:50:26.000Z | 2021-09-23T12:59:01.000Z | gorilla/config/_config.py | sunjiahao1999/gorilla-core | bf43e3a49c7f79834ae969db38edd50f17ef5288 | [
"MIT"
] | null | null | null | gorilla/config/_config.py | sunjiahao1999/gorilla-core | bf43e3a49c7f79834ae969db38edd50f17ef5288 | [
"MIT"
] | 2 | 2021-08-05T04:01:12.000Z | 2021-12-25T02:17:03.000Z | # Copyright (c) Open-MMLab. All rights reserved.
import os
import json
import tempfile
import warnings
from typing import Optional
from argparse import Namespace
from addict import Dict
from ..utils import check_file
BASE_KEY = "_base_"
RESERVED_KEYS = ["filename", "text"]
class ConfigDict(Dict):
r"""ConfigDic... | 34.770227 | 112 | 0.560964 | 9,504 | 0.884587 | 0 | 0 | 4,165 | 0.387658 | 0 | 0 | 4,267 | 0.397152 |
b40e4f7e84bc53160bafd291d5c8ea6b4b1f43bd | 2,643 | py | Python | Kaspa/modules/extension_modules/spotify_module/spotifyModuleEn.py | karim-awad/kaspa | 701d935dd215bfd9a4810a4430973b33fecec257 | [
"MIT"
] | null | null | null | Kaspa/modules/extension_modules/spotify_module/spotifyModuleEn.py | karim-awad/kaspa | 701d935dd215bfd9a4810a4430973b33fecec257 | [
"MIT"
] | null | null | null | Kaspa/modules/extension_modules/spotify_module/spotifyModuleEn.py | karim-awad/kaspa | 701d935dd215bfd9a4810a4430973b33fecec257 | [
"MIT"
] | null | null | null | from Kaspa.modules.abstract_modules.abstractSubmodule import AbstractSubmodule
from Kaspa.modules.exceptions.impossibleActionError import ImpossibleActionError
from Kaspa.config import Config
class SpotifyModuleEn(AbstractSubmodule):
module_name = "Spotify"
language = "en"
key_regexes = dict()
def ... | 36.205479 | 99 | 0.596292 | 2,448 | 0.92622 | 0 | 0 | 0 | 0 | 0 | 0 | 455 | 0.172153 |
b40e9592fe62c2017e79612d2b201dbc82a4fb4e | 2,768 | py | Python | screenshot-server/app/main.py | martindines/ScreenshotServer | 21d1529157f4625cd26196000c4a30342ab4d713 | [
"MIT"
] | 1 | 2019-12-31T18:43:08.000Z | 2019-12-31T18:43:08.000Z | screenshot-server/app/main.py | martindines/ScreenshotServer | 21d1529157f4625cd26196000c4a30342ab4d713 | [
"MIT"
] | 1 | 2019-12-31T19:35:24.000Z | 2019-12-31T19:35:24.000Z | screenshot-server/app/main.py | martindines/ScreenshotServer | 21d1529157f4625cd26196000c4a30342ab4d713 | [
"MIT"
] | null | null | null | import os
import sys
import pathlib
from utilities import get_random_hash
from flask import Flask, flash, request, redirect, url_for, send_from_directory, jsonify, Response
UPLOAD_FOLDER = os.environ.get('UPLOAD_FOLDER') if os.environ.get('UPLOAD_FOLDER') else '/tmp'
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', '... | 24.936937 | 98 | 0.610549 | 0 | 0 | 0 | 0 | 1,468 | 0.530347 | 0 | 0 | 447 | 0.161488 |
b40ee079a577a77555888197b34380d7e63acfd3 | 517 | py | Python | src/waldur_mastermind/notifications/migrations/0002_json_field.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | 2 | 2017-01-20T15:26:25.000Z | 2017-08-03T04:38:08.000Z | src/waldur_mastermind/notifications/migrations/0002_json_field.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | null | null | null | src/waldur_mastermind/notifications/migrations/0002_json_field.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2022-01-31 14:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('notifications', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='notification',
name='emails',
... | 21.541667 | 45 | 0.560928 | 426 | 0.823985 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.226306 |
b41042e5988e8d27b58649ccaf22e396c4b031cb | 2,800 | py | Python | gitgoggles/utils.py | nowells/git-goggles | 022dc0cd6dfe8f1641ccb33e85ab05309dba7dbf | [
"MIT"
] | 13 | 2015-03-10T08:48:51.000Z | 2019-04-16T09:06:55.000Z | gitgoggles/utils.py | nowells/git-goggles | 022dc0cd6dfe8f1641ccb33e85ab05309dba7dbf | [
"MIT"
] | null | null | null | gitgoggles/utils.py | nowells/git-goggles | 022dc0cd6dfe8f1641ccb33e85ab05309dba7dbf | [
"MIT"
] | 3 | 2016-04-29T05:38:56.000Z | 2020-07-06T13:04:05.000Z | import copy
import subprocess
import sys
import unicodedata
def disable_colored_func(text, *args, **kwargs):
return text
try:
from termcolor import colored as colored_func
except ImportError:
print 'You should run "pip install termcolor" to fully utilize these utilities.'
colored_func = disable_colore... | 32.183908 | 127 | 0.658571 | 495 | 0.176786 | 0 | 0 | 0 | 0 | 0 | 0 | 501 | 0.178929 |
b410813c6c4297c46c6ca2597443a122ba6dda59 | 4,308 | py | Python | test/unit/tools/test_basisconstructors.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | 73 | 2016-01-28T05:02:05.000Z | 2022-03-30T07:46:33.000Z | test/unit/tools/test_basisconstructors.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | 113 | 2016-02-25T15:32:18.000Z | 2022-03-31T13:18:13.000Z | test/unit/tools/test_basisconstructors.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | 41 | 2016-03-15T19:32:07.000Z | 2022-02-16T10:22:05.000Z | import numpy as np
import pygsti.baseobjs.basisconstructors as bc
from ..util import BaseCase
class BasisConstructorsTester(BaseCase):
def test_GellMann(self):
id2x2 = np.array([[1, 0], [0, 1]])
sigmax = np.array([[0, 1], [1, 0]])
sigmay = np.array([[0, -1.0j], [1.0j, 0]])
sigmaz ... | 40.261682 | 109 | 0.597957 | 4,210 | 0.977252 | 0 | 0 | 0 | 0 | 0 | 0 | 666 | 0.154596 |
b4130d04b43c706ebb56a9d6ede2201a268db5d7 | 7,913 | py | Python | tensorflow/contrib/training/python/training/hparam_test.py | DEVESHTARASIA/tensorflow | d3edb8c60ed4fd831d62833ed22f5c23486c561c | [
"Apache-2.0"
] | 384 | 2017-02-21T18:38:04.000Z | 2022-02-22T07:30:25.000Z | tensorflow/contrib/training/python/training/hparam_test.py | DEVESHTARASIA/tensorflow | d3edb8c60ed4fd831d62833ed22f5c23486c561c | [
"Apache-2.0"
] | 15 | 2017-03-01T20:18:43.000Z | 2020-05-07T10:33:51.000Z | tensorflow/contrib/training/python/training/hparam_test.py | DEVESHTARASIA/tensorflow | d3edb8c60ed4fd831d62833ed22f5c23486c561c | [
"Apache-2.0"
] | 81 | 2017-02-21T19:31:19.000Z | 2022-02-22T07:30:24.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.372449 | 80 | 0.65841 | 6,923 | 0.874889 | 0 | 0 | 0 | 0 | 0 | 0 | 2,086 | 0.263617 |