hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b3100d65adacd7054c8de611ff54f81327ab317b | 5,201 | py | Python | grab_closest_rmsd.py | Miro-Astore/mdanalysis_scripts | faf59c7b3b63ab103a709941e5cc2e5d7c1d0b23 | [
"MIT"
] | 1 | 2021-06-16T11:34:29.000Z | 2021-06-16T11:34:29.000Z | grab_closest_rmsd.py | Miro-Astore/mdanalysis_scripts | faf59c7b3b63ab103a709941e5cc2e5d7c1d0b23 | [
"MIT"
] | null | null | null | grab_closest_rmsd.py | Miro-Astore/mdanalysis_scripts | faf59c7b3b63ab103a709941e5cc2e5d7c1d0b23 | [
"MIT"
] | 1 | 2021-06-16T11:34:31.000Z | 2021-06-16T11:34:31.000Z | import MDAnalysis as mda
import MDAnalysis.analysis.rms
import numpy as np
ref = mda.Universe ('./pca_2_ref.pdb')
traj_u = mda.Universe ('ionized.psf','sum.xtc')
ref_sel = "name CA and resid 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 8... | 305.941176 | 4,705 | 0.766583 |
b310942ec473743eb33ea648c960c10e28fedd79 | 712 | py | Python | self_paced_ensemble/canonical_resampling/__init__.py | thulio/self-paced-ensemble | 0270edecc2f88783e2f4657510e089c2cacfcabe | [
"MIT"
] | 203 | 2019-06-04T07:43:25.000Z | 2022-03-30T22:16:32.000Z | self_paced_ensemble/canonical_resampling/__init__.py | thulio/self-paced-ensemble | 0270edecc2f88783e2f4657510e089c2cacfcabe | [
"MIT"
] | 14 | 2020-02-26T09:42:46.000Z | 2022-01-11T12:25:16.000Z | self_paced_ensemble/canonical_resampling/__init__.py | thulio/self-paced-ensemble | 0270edecc2f88783e2f4657510e089c2cacfcabe | [
"MIT"
] | 46 | 2019-11-25T01:13:31.000Z | 2021-12-29T06:49:07.000Z | """
--------------------------------------------------------------------------
The `self_paced_ensemble.canonical_resampling` module implement a
resampling-based classifier for imbalanced classification.
15 resampling algorithms are included:
'RUS', 'CNN', 'ENN', 'NCR', 'Tomek', 'ALLKNN', 'OSS',
'NM', 'CC', 'SMOTE', ... | 32.363636 | 74 | 0.585674 |
b31196095333800e20e0d5857b88125a542e315e | 3,902 | py | Python | omsdk/sdkps.py | DanielFroehlich/omsdk | 475d925e4033104957fdc64480fe8f9af0ab6b8a | [
"Apache-2.0"
] | 61 | 2018-02-21T00:02:20.000Z | 2022-01-26T03:47:19.000Z | omsdk/sdkps.py | DanielFroehlich/omsdk | 475d925e4033104957fdc64480fe8f9af0ab6b8a | [
"Apache-2.0"
] | 31 | 2018-03-24T05:43:39.000Z | 2022-03-16T07:10:37.000Z | omsdk/sdkps.py | DanielFroehlich/omsdk | 475d925e4033104957fdc64480fe8f9af0ab6b8a | [
"Apache-2.0"
] | 25 | 2018-03-13T10:06:12.000Z | 2022-01-26T03:47:21.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
#
# Copyright 2018 Dell Inc. or its subsidiaries. All rights reserved.
# Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries.
# Other trademarks may be trademarks of their respective owners.
#
# Licensed under the Apache License, Vers... | 36.811321 | 99 | 0.535879 |
b311980089ca2553183d98a9aa947954a5430613 | 3,166 | py | Python | popita/location/serializers.py | gpiechnik2/popita | ad044f0884d1dcac6943e036187d867d5209ffd1 | [
"Apache-2.0"
] | null | null | null | popita/location/serializers.py | gpiechnik2/popita | ad044f0884d1dcac6943e036187d867d5209ffd1 | [
"Apache-2.0"
] | null | null | null | popita/location/serializers.py | gpiechnik2/popita | ad044f0884d1dcac6943e036187d867d5209ffd1 | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers
from djoser.serializers import UserSerializer
from math import cos, asin, sqrt, pi
from accounts.models import User
from .models import Localization
| 34.043011 | 223 | 0.628869 |
b312241b809985558a61adf947e84c53f8e2bb9c | 997 | py | Python | python/ql/test/query-tests/Security/CWE-089/sql_injection.py | p-snft/ql | 6243c722c6d18f152fe47d2c800540d5bc5c3c3f | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2021-07-12T09:23:48.000Z | 2021-10-04T10:05:46.000Z | python/ql/test/query-tests/Security/CWE-089/sql_injection.py | p-snft/ql | 6243c722c6d18f152fe47d2c800540d5bc5c3c3f | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-02-21T16:20:02.000Z | 2019-05-01T12:10:05.000Z | python/ql/test/query-tests/Security/CWE-089/sql_injection.py | p-snft/ql | 6243c722c6d18f152fe47d2c800540d5bc5c3c3f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
from django.conf.urls import patterns, url
from django.db import connection, models
from django.db.models.expressions import RawSQL
urlpatterns = patterns(url(r'^save_name/$',
save_name, name='save_name'))
| 34.37931 | 93 | 0.620863 |
b312c7d194c215be37c90d51e5fc14dc91cf0b28 | 3,325 | py | Python | qdev_wrappers/transmon/sweep_helpers.py | GateBuilder/qdev-wrappers | 2f4cfbad74d40d5bdb13dd68feec5ad319b209c5 | [
"MIT"
] | 13 | 2018-01-10T09:32:50.000Z | 2022-01-24T00:15:59.000Z | qdev_wrappers/transmon/sweep_helpers.py | GateBuilder/qdev-wrappers | 2f4cfbad74d40d5bdb13dd68feec5ad319b209c5 | [
"MIT"
] | 122 | 2017-11-01T10:17:50.000Z | 2020-09-28T06:33:39.000Z | qdev_wrappers/transmon/sweep_helpers.py | GateBuilder/qdev-wrappers | 2f4cfbad74d40d5bdb13dd68feec5ad319b209c5 | [
"MIT"
] | 30 | 2017-10-31T12:25:32.000Z | 2022-03-20T04:43:37.000Z | import qcodes as qc
from qdev_wrappers.sweep_functions import _do_measurement, _do_measurement_single, \
_select_plottables
def measure(meas_param, do_plots=True):
"""
Function which measures the specified parameter and optionally
plots the results.
Args:
meas_param: parameter to measure
... | 33.928571 | 84 | 0.663459 |
b312fd40137f1f88994faa7dd28816b492eac96b | 18,544 | py | Python | ocrj/misc/nihongo.py | eggplants/OCR_Japanease | 15ed5df66a66047fa877ded2e935f7b2fb006c2b | [
"MIT"
] | 2 | 2021-08-08T07:14:36.000Z | 2021-08-08T07:25:43.000Z | ocrj/misc/nihongo.py | eggplants/ocrj | 15ed5df66a66047fa877ded2e935f7b2fb006c2b | [
"MIT"
] | null | null | null | ocrj/misc/nihongo.py | eggplants/ocrj | 15ed5df66a66047fa877ded2e935f7b2fb006c2b | [
"MIT"
] | null | null | null | import string
hiragana = \
['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '',... | 61 | 79 | 0.303117 |
b314c64792d73fb80b9c2aaecf28ca4b8f5356a3 | 4,293 | py | Python | emlearn/distance.py | Brax94/emlearn | cc5fd962f5af601c02dfe0ec9203d1b30e6b3aef | [
"MIT"
] | 161 | 2019-03-12T16:07:20.000Z | 2022-03-31T06:24:38.000Z | emlearn/distance.py | Brax94/emlearn | cc5fd962f5af601c02dfe0ec9203d1b30e6b3aef | [
"MIT"
] | 35 | 2019-05-14T11:34:04.000Z | 2022-02-04T20:09:34.000Z | emlearn/distance.py | Brax94/emlearn | cc5fd962f5af601c02dfe0ec9203d1b30e6b3aef | [
"MIT"
] | 27 | 2019-03-11T01:09:27.000Z | 2021-12-27T22:56:04.000Z |
import os.path
import os
import numpy
from . import common, cgen
"""
References
https://github.com/scikit-learn/scikit-learn/blob/15a949460dbf19e5e196b8ef48f9712b72a3b3c3/sklearn/covariance/_empirical_covariance.py#L297
https://github.com/scikit-learn/scikit-learn/blob/15a949460dbf19e5e196b8ef48f9712b72a3b3c3/skl... | 28.430464 | 139 | 0.63126 |
b315ac276441ccfb8b05f770a418eb36163f6159 | 929 | py | Python | scripts/dbload_profiles.py | tonykipkemboi/LinkedIn_NSBE_Hackathon | 9375196fd2c89fe3376fbdc8964a59676ef1a43d | [
"MIT"
] | null | null | null | scripts/dbload_profiles.py | tonykipkemboi/LinkedIn_NSBE_Hackathon | 9375196fd2c89fe3376fbdc8964a59676ef1a43d | [
"MIT"
] | null | null | null | scripts/dbload_profiles.py | tonykipkemboi/LinkedIn_NSBE_Hackathon | 9375196fd2c89fe3376fbdc8964a59676ef1a43d | [
"MIT"
] | null | null | null | from db_connection import DbConnection
import random | 32.034483 | 147 | 0.702906 |
b318379a0dd3c97eba087c2682c3a79eb0cce153 | 2,666 | py | Python | application.py | iamsashank09/handwritten-digit-recognizer-cnn | b168eb2337397364de366952f5289998731abe04 | [
"MIT"
] | null | null | null | application.py | iamsashank09/handwritten-digit-recognizer-cnn | b168eb2337397364de366952f5289998731abe04 | [
"MIT"
] | null | null | null | application.py | iamsashank09/handwritten-digit-recognizer-cnn | b168eb2337397364de366952f5289998731abe04 | [
"MIT"
] | 1 | 2021-08-10T07:49:01.000Z | 2021-08-10T07:49:01.000Z | import sys
from keras.models import load_model
import cv2
from preprocessors import x_cord_contour, makeSquare, resize_to_pixel
import pyfiglet
if __name__ == "__main__":
try:
filename = sys.argv[1]
except:
print('''Mention the file name while running the app.
Usage: pyth... | 33.325 | 100 | 0.570893 |
b31a614e9fdad950b6103bf4c802c1acbca2334e | 1,122 | py | Python | Packs/ShiftLeft/Integrations/shiftleft/shiftleft_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ShiftLeft/Integrations/shiftleft/shiftleft_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ShiftLeft/Integrations/shiftleft/shiftleft_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | """Base Integration for ShiftLeft CORE - Cortex XSOAR Extension
"""
import json
import io
from shiftleft import list_app_findings_command, ShiftLeftClient
def test_list_app_findings_command(requests_mock):
"""Tests list_app_findings_command function.
Checks the output of the command function with the expec... | 28.769231 | 114 | 0.682709 |
b31ad98a0700b36b49c1882b67967d373ee628c9 | 2,625 | py | Python | app/auth/forms.py | karomag/microblog | 7511dbd99c4fec6558fd4a94249622ebffdf52ac | [
"MIT"
] | null | null | null | app/auth/forms.py | karomag/microblog | 7511dbd99c4fec6558fd4a94249622ebffdf52ac | [
"MIT"
] | null | null | null | app/auth/forms.py | karomag/microblog | 7511dbd99c4fec6558fd4a94249622ebffdf52ac | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""Forms auth."""
from flask_babel import _
from flask_babel import lazy_gettext as _l
from flask_wtf import FlaskForm
from wtforms import (
BooleanField,
PasswordField,
StringField,
SubmitField,
)
from wtforms.validators import (
DataRequired,
Email,
EqualTo,
Va... | 28.225806 | 80 | 0.656 |
b31ca78650faf7f0d3a1fa21464ede27682437eb | 621 | py | Python | rescale-video.py | abhra2020-smart/ba-title-bar | 71521849d6376fee70eaeefffdb59edfbcedd94e | [
"MIT"
] | null | null | null | rescale-video.py | abhra2020-smart/ba-title-bar | 71521849d6376fee70eaeefffdb59edfbcedd94e | [
"MIT"
] | null | null | null | rescale-video.py | abhra2020-smart/ba-title-bar | 71521849d6376fee70eaeefffdb59edfbcedd94e | [
"MIT"
] | null | null | null | import cv2
# used to scale down the video resolution
# the repo doesn't include vid 480x360 file,
# but you can get if from https://www.youtube.com/watch?v=FtutLA63Cp8
cap = cv2.VideoCapture('bad_apple_480x360.mp4')
fourcc = cv2.VideoWriter_fourcc(*'MP4V')
out = cv2.VideoWriter('bad_apple_48x36.mp4', four... | 28.227273 | 91 | 0.650564 |
b31d9833c06a2ca7f76b3f73d870e38b35b71e27 | 632 | py | Python | scripts/nabeatu.py | yuzukiimai/robosys2 | 2634c9c43966ab5a158d45d89f07faf358b8e092 | [
"BSD-3-Clause"
] | null | null | null | scripts/nabeatu.py | yuzukiimai/robosys2 | 2634c9c43966ab5a158d45d89f07faf358b8e092 | [
"BSD-3-Clause"
] | null | null | null | scripts/nabeatu.py | yuzukiimai/robosys2 | 2634c9c43966ab5a158d45d89f07faf358b8e092 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import rospy
from std_msgs.msg import Int32
n = 0
rospy.init_node('nabe')
sub = rospy.Subscriber('rand_number', Int32, cb)
pub = rospy.Publisher('atu', Int32, queue_size=1)
rate = rospy.Rate(1)
while not rospy.is_shutdown():
if n % 3 == 0 and n != 0:
print('%d !!!!!\n' % n)
el... | 22.571429 | 72 | 0.544304 |
b31df60e00166612398f3b8eb16174c35e86d989 | 42,680 | py | Python | competition/scenarios.py | xfuzzycomp/FuzzyChallenge2021 | 5876450fdb913c6707352bfe9fcc25748f041f52 | [
"MIT"
] | null | null | null | competition/scenarios.py | xfuzzycomp/FuzzyChallenge2021 | 5876450fdb913c6707352bfe9fcc25748f041f52 | [
"MIT"
] | null | null | null | competition/scenarios.py | xfuzzycomp/FuzzyChallenge2021 | 5876450fdb913c6707352bfe9fcc25748f041f52 | [
"MIT"
] | null | null | null | from fuzzy_asteroids.util import Scenario
import numpy as np
# "Simple" Scenarios --------------------------------------------------------------------------------------------------#
# Threat priority tests
threat_test_1 = Scenario(
name="threat_test_1",
asteroid_states=[{"position": (0, 300), "angle": -90.0, ... | 43.462322 | 120 | 0.471954 |
b31e1295214eda15108196ecd3b6619c813ed189 | 5,473 | py | Python | guess_movie/quizz/models.py | tanguyesteoule/movizz | 1b3bc00fcdd6f0c566fdffabf56c4117fa790b02 | [
"MIT"
] | 1 | 2022-01-29T20:14:28.000Z | 2022-01-29T20:14:28.000Z | guess_movie/quizz/models.py | renauddahou/movizz | 1b3bc00fcdd6f0c566fdffabf56c4117fa790b02 | [
"MIT"
] | null | null | null | guess_movie/quizz/models.py | renauddahou/movizz | 1b3bc00fcdd6f0c566fdffabf56c4117fa790b02 | [
"MIT"
] | 1 | 2022-01-16T13:45:40.000Z | 2022-01-16T13:45:40.000Z | from django.db import models
# class Game(models.Model):
# name = models.CharField(max_length=200)
#
# def __str__(self):
# return self.name
| 36.731544 | 108 | 0.723004 |
b31e77923a41068a3cef4c14e6a23d2de634a6cd | 386 | py | Python | front_end/migrations/0002_rename_nome_popular_especies_nome_popular.py | majubr/website_Django | eb0683459af82e4abb3e8ccb016d52d4365ff729 | [
"MIT"
] | null | null | null | front_end/migrations/0002_rename_nome_popular_especies_nome_popular.py | majubr/website_Django | eb0683459af82e4abb3e8ccb016d52d4365ff729 | [
"MIT"
] | null | null | null | front_end/migrations/0002_rename_nome_popular_especies_nome_popular.py | majubr/website_Django | eb0683459af82e4abb3e8ccb016d52d4365ff729 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-15 03:08
from django.db import migrations
| 20.315789 | 48 | 0.562176 |
b31f0c338718475bf6c2006b77b19c324343a773 | 24,889 | py | Python | ronin_3d/source/ronin_lstm_tcn.py | zju3dv/rnin-vio | b030ecc94f151159973a9086c8ba76e22bdbc56e | [
"Apache-2.0"
] | 10 | 2022-03-01T12:21:18.000Z | 2022-03-23T08:55:55.000Z | ronin_3d/source/ronin_lstm_tcn.py | zju3dv/rnin-vio | b030ecc94f151159973a9086c8ba76e22bdbc56e | [
"Apache-2.0"
] | 2 | 2022-03-07T09:43:41.000Z | 2022-03-31T14:34:53.000Z | ronin_3d/source/ronin_lstm_tcn.py | zju3dv/rnin-vio | b030ecc94f151159973a9086c8ba76e22bdbc56e | [
"Apache-2.0"
] | 4 | 2022-03-01T12:20:20.000Z | 2022-03-19T12:33:22.000Z | import json
import os
import sys
import time
from os import path as osp
from pathlib import Path
from shutil import copyfile
import numpy as np
import torch
from torch.optim.lr_scheduler import ReduceLROnPlateau
from torch.utils.data import DataLoader
from tqdm import tqdm
from model_temporal import LSTMSeqNetwork, B... | 42.472696 | 177 | 0.608783 |
b3231dd9d1c15c0eaaa1376b68c6482d2fb00f29 | 104 | py | Python | constants.py | pvantonov/kodi-amvnews | 504eeb59dc0b2b9fe60a0aa7debbe35140dc4156 | [
"MIT"
] | 3 | 2019-05-14T21:41:18.000Z | 2020-08-06T13:25:45.000Z | constants.py | pvantonov/kodi-amvnews | 504eeb59dc0b2b9fe60a0aa7debbe35140dc4156 | [
"MIT"
] | null | null | null | constants.py | pvantonov/kodi-amvnews | 504eeb59dc0b2b9fe60a0aa7debbe35140dc4156 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Definition of constants.
"""
from xbmcswift2.plugin import Plugin
PLUGIN = Plugin()
| 13 | 36 | 0.721154 |
b3234231c15b5185c9a6303b3c3d18e7683e4414 | 1,021 | py | Python | python/chaosencrypt/test/discrete_pisarchik.py | nfejes/chaotic-image-encryption | c7b7bc8230e4b18227a27e5e19f2588766b3f53b | [
"MIT"
] | 3 | 2021-11-29T17:03:13.000Z | 2022-01-10T13:56:02.000Z | python/chaosencrypt/test/discrete_pisarchik.py | nfejes/chaotic-image-encryption | c7b7bc8230e4b18227a27e5e19f2588766b3f53b | [
"MIT"
] | null | null | null | python/chaosencrypt/test/discrete_pisarchik.py | nfejes/chaotic-image-encryption | c7b7bc8230e4b18227a27e5e19f2588766b3f53b | [
"MIT"
] | 4 | 2018-04-12T04:30:35.000Z | 2021-02-22T22:59:39.000Z | from scipy.misc import imread,imshow
import chaosencrypt as cenc
import numpy as np
from chaosencrypt.discrete_pisarchik import bitexpand,bitreduce
# Read image
print('Loading image...')
im_org = imread('../image.jpg')
# Downsample
im = im_org[::3,::3,:].copy()
# Key
key = {'a':3.8,'n':10,'r':3,'bits':32}
# Encryp... | 23.744186 | 96 | 0.682664 |
b32342c6d36a233f788e221c35a9371d05ba8ac7 | 76 | py | Python | exercicios/Curso_Udemy_Python/sec3_aula66.py | IgoPereiraBarros/maratona-data-science-brasil | cc07476579134a2764f00d229d415657555dcdd1 | [
"MIT"
] | null | null | null | exercicios/Curso_Udemy_Python/sec3_aula66.py | IgoPereiraBarros/maratona-data-science-brasil | cc07476579134a2764f00d229d415657555dcdd1 | [
"MIT"
] | null | null | null | exercicios/Curso_Udemy_Python/sec3_aula66.py | IgoPereiraBarros/maratona-data-science-brasil | cc07476579134a2764f00d229d415657555dcdd1 | [
"MIT"
] | null | null | null | lista = ['python', 'c', 'c++', 'ruby', 'php']
print(sorted(lista, key=len)) | 25.333333 | 45 | 0.552632 |
b3240e96d503aecba5fa6738ed7f723f65cd5c2c | 77 | py | Python | src/fate_of_dice/system/call_of_cthulhu/__init__.py | bonczeq/FateOfDice | ce1704ac490f55bc600c0963958d4175104e85e5 | [
"MIT"
] | null | null | null | src/fate_of_dice/system/call_of_cthulhu/__init__.py | bonczeq/FateOfDice | ce1704ac490f55bc600c0963958d4175104e85e5 | [
"MIT"
] | null | null | null | src/fate_of_dice/system/call_of_cthulhu/__init__.py | bonczeq/FateOfDice | ce1704ac490f55bc600c0963958d4175104e85e5 | [
"MIT"
] | null | null | null | from .skill_check import check_skill, SkillCheckResult, SkillCheckResultType
| 38.5 | 76 | 0.883117 |
b327c58748a0a44c36ab794d83e81277cb12cd44 | 1,258 | py | Python | setup.py | dvd7587/listthedocs | b4734be11977ea971e0ad5fa2e9920cc63e54ec0 | [
"MIT"
] | 3 | 2019-08-12T13:46:13.000Z | 2020-03-20T08:09:16.000Z | setup.py | dvd7587/listthedocs | b4734be11977ea971e0ad5fa2e9920cc63e54ec0 | [
"MIT"
] | 7 | 2019-08-12T13:06:32.000Z | 2020-03-28T14:33:16.000Z | setup.py | dvd7587/listthedocs | b4734be11977ea971e0ad5fa2e9920cc63e54ec0 | [
"MIT"
] | 2 | 2019-09-26T14:31:09.000Z | 2019-10-01T08:49:47.000Z | from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='listthedocs',
version='2.0.1',
author='Alessandro Bacchini',
author_email='allebacco@gmail.com',
description='List your documentations',
long_description=long_descriptio... | 27.955556 | 57 | 0.601749 |
b328226b7a463946689852a8e54f45bd61fef3b4 | 14,450 | py | Python | tests/test_table_aggregation/test_schema_matcher.py | afcarl/corvid | e257074edeac1e8dce4a737b60e93a9bea37b6b9 | [
"Apache-2.0"
] | 1 | 2019-04-15T13:49:39.000Z | 2019-04-15T13:49:39.000Z | tests/test_table_aggregation/test_schema_matcher.py | afcarl/corvid | e257074edeac1e8dce4a737b60e93a9bea37b6b9 | [
"Apache-2.0"
] | null | null | null | tests/test_table_aggregation/test_schema_matcher.py | afcarl/corvid | e257074edeac1e8dce4a737b60e93a9bea37b6b9 | [
"Apache-2.0"
] | 1 | 2020-09-02T13:49:52.000Z | 2020-09-02T13:49:52.000Z | import unittest
from corvid.types.table import Token, Cell, Table
from corvid.table_aggregation.pairwise_mapping import PairwiseMapping
from corvid.table_aggregation.schema_matcher import SchemaMatcher, \
ColNameSchemaMatcher
| 50.173611 | 77 | 0.554879 |
b328bfacdff8f1f770e34a14c19b52872f8eed25 | 4,827 | py | Python | jiggle_version/parse_version/parse_dunder_version.py | matthewdeanmartin/jiggle_version | 7bb82b75321e007f9e9e6d52a7bc569a5fe41052 | [
"MIT"
] | 1 | 2019-02-23T16:13:56.000Z | 2019-02-23T16:13:56.000Z | jiggle_version/parse_version/parse_dunder_version.py | matthewdeanmartin/jiggle_version | 7bb82b75321e007f9e9e6d52a7bc569a5fe41052 | [
"MIT"
] | 17 | 2018-07-14T17:04:49.000Z | 2022-03-24T15:59:11.000Z | jiggle_version/parse_version/parse_dunder_version.py | matthewdeanmartin/jiggle_version | 7bb82b75321e007f9e9e6d52a7bc569a5fe41052 | [
"MIT"
] | 1 | 2019-12-01T02:18:36.000Z | 2019-12-01T02:18:36.000Z | """
A whole file dedicated to parsing __version__ in all it's weird possible ways
1) Only acts on source, no file handling.
2) some functions for *by line*
3) some functions for *by file*
4) Handle quotes
5) Handle whitespace
6) Handle version as tuple
"""
import ast
import re
from typing import Any, Optional, T... | 27.582857 | 116 | 0.57862 |
b328d4402e25c702ac70b4a9a12fa0081138d156 | 1,025 | py | Python | guppy/__init__.py | EhsanKia/guppy3 | 87bb2e5b9e3d76c8b1c6698c40fdd395b1ee3cd3 | [
"MIT"
] | null | null | null | guppy/__init__.py | EhsanKia/guppy3 | 87bb2e5b9e3d76c8b1c6698c40fdd395b1ee3cd3 | [
"MIT"
] | null | null | null | guppy/__init__.py | EhsanKia/guppy3 | 87bb2e5b9e3d76c8b1c6698c40fdd395b1ee3cd3 | [
"MIT"
] | null | null | null | """\
Top level package of Guppy, a library and programming environment
currently providing in particular the Heapy subsystem, which supports
object and heap memory sizing, profiling and debugging.
What is exported is the following:
hpy() Create an object that provides a Heapy entry point.
Root() Create an object t... | 27.702703 | 69 | 0.718049 |
b32a7ddcce779b4404e4e3304054b0b32c70d5ff | 11,115 | py | Python | constrained_attack.py | ameya005/Semantic_Adversarial_Attacks | 3459c0eafbad39baff3fec034dca0611f21989b7 | [
"MIT"
] | 9 | 2019-11-02T17:17:10.000Z | 2022-03-15T08:22:06.000Z | constrained_attack.py | ameya005/Semantic_Adversarial_Attacks | 3459c0eafbad39baff3fec034dca0611f21989b7 | [
"MIT"
] | 4 | 2020-03-24T17:34:42.000Z | 2021-09-08T01:17:35.000Z | constrained_attack.py | ameya005/Semantic_Adversarial_Attacks | 3459c0eafbad39baff3fec034dca0611f21989b7 | [
"MIT"
] | 1 | 2020-10-26T20:37:47.000Z | 2020-10-26T20:37:47.000Z | """
Attacking the model using a Fader Network
Note: We are basically searching for the interpolation values
which allow us to break a simple classifier.
"""
import argparse
import json
import logging
import os
from collections import OrderedDict
from datetime import datetime
import numpy as np
import torch
import to... | 40.565693 | 153 | 0.619793 |
b32a9291641b2be9820f1e8aa540ae73a72b18c4 | 290 | py | Python | Ejercicio5.py | mariagarciau/introduccion-algoritmica | 1543005a290daca8969f8ca3364f46d8149f8434 | [
"Apache-2.0"
] | null | null | null | Ejercicio5.py | mariagarciau/introduccion-algoritmica | 1543005a290daca8969f8ca3364f46d8149f8434 | [
"Apache-2.0"
] | null | null | null | Ejercicio5.py | mariagarciau/introduccion-algoritmica | 1543005a290daca8969f8ca3364f46d8149f8434 | [
"Apache-2.0"
] | null | null | null | descuento()
| 24.166667 | 54 | 0.631034 |
b32bac57ca8d636728e4c8f5baeac6b0cfea964f | 3,857 | py | Python | experiments/graph/data_loader.py | t3hseus/ariadne | b4471a37741000e22281c4d6ff647d65ab9e1914 | [
"MIT"
] | 6 | 2020-08-28T22:44:07.000Z | 2022-01-24T20:53:00.000Z | experiments/graph/data_loader.py | t3hseus/ariadne | b4471a37741000e22281c4d6ff647d65ab9e1914 | [
"MIT"
] | 1 | 2021-02-20T09:38:46.000Z | 2021-02-20T09:38:46.000Z | experiments/graph/data_loader.py | t3hseus/ariadne | b4471a37741000e22281c4d6ff647d65ab9e1914 | [
"MIT"
] | 2 | 2021-10-04T09:25:06.000Z | 2022-02-09T09:09:09.000Z | import logging
from torch import multiprocessing
from typing import Callable
import gin
from torch.utils.data import random_split, Subset, DataLoader
from ariadne.graph_net.dataset import GraphBatchBucketSampler
from ariadne_v2 import jit_cacher
from ariadne_v2.data_loader import BaseDataLoader
from experiments.grap... | 37.813725 | 114 | 0.618356 |
b32c5cd5fbfe4f285fdd52d173c46b83f38134cf | 3,403 | py | Python | murano-7.0.0/murano/policy/modify/actions/action_manager.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 91 | 2015-04-26T16:05:03.000Z | 2021-12-28T07:12:33.000Z | murano-7.0.0/murano/policy/modify/actions/action_manager.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | murano-7.0.0/murano/policy/modify/actions/action_manager.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 61 | 2015-05-19T22:56:34.000Z | 2021-06-01T05:38:53.000Z | # Copyright (c) 2015 OpenStack Foundation.
# 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 re... | 35.821053 | 78 | 0.640317 |
b32f8859e3ed1181b4a6089919d01fcaa1f90e87 | 17,034 | py | Python | wsgi_basic/common/wsgi.py | QthCN/wsgi-basic | e080304aeaa9922fc9367dbb5cb57a7ab9494b38 | [
"Apache-2.0"
] | null | null | null | wsgi_basic/common/wsgi.py | QthCN/wsgi-basic | e080304aeaa9922fc9367dbb5cb57a7ab9494b38 | [
"Apache-2.0"
] | null | null | null | wsgi_basic/common/wsgi.py | QthCN/wsgi-basic | e080304aeaa9922fc9367dbb5cb57a7ab9494b38 | [
"Apache-2.0"
] | null | null | null | import copy
import itertools
import wsgiref.util
from oslo_config import cfg
from oslo_log import log
from oslo_serialization import jsonutils
from oslo_utils import importutils
import routes.middleware
import six
import webob.dec
import webob.exc
from wsgi_basic import exception
from wsgi_basic.common import authori... | 35.561587 | 79 | 0.619702 |
b33225ce37303284a53f4130678fc85ff6b91c0c | 4,410 | py | Python | data/nyu-depth-v2/extract.py | fferflo/tf-semseg | b392cac2e8cca5389e7a099e8f7a87d72f4a70fc | [
"MIT"
] | null | null | null | data/nyu-depth-v2/extract.py | fferflo/tf-semseg | b392cac2e8cca5389e7a099e8f7a87d72f4a70fc | [
"MIT"
] | null | null | null | data/nyu-depth-v2/extract.py | fferflo/tf-semseg | b392cac2e8cca5389e7a099e8f7a87d72f4a70fc | [
"MIT"
] | null | null | null | import h5py, imageio, argparse, os
import numpy as np
parser = argparse.ArgumentParser()
parser.add_argument("--nyu", type=str, required=True, help="Path to nyu_depth_v2_labeled.mat file")
args = parser.parse_args()
map_894_to_40 = np.array([0, 40, 40, 3, 22, 5, 40, 12, 38, 40, 40, 2, 39, 40, 40, 26, 40, 24, 4... | 176.4 | 3,597 | 0.535147 |
b33276f850ff627d90b9b5474ba0f791c30a646f | 3,579 | py | Python | OLD/datasets/cityscapes/legacy/1_downscale_images.py | ivankreso/semseg | fcd2889a1e9e03c3d1a71d19d68d15ce25a5dc79 | [
"MIT"
] | 2 | 2017-11-17T06:55:44.000Z | 2019-06-11T13:07:05.000Z | OLD/datasets/cityscapes/legacy/1_downscale_images.py | ivankreso/semseg | fcd2889a1e9e03c3d1a71d19d68d15ce25a5dc79 | [
"MIT"
] | null | null | null | OLD/datasets/cityscapes/legacy/1_downscale_images.py | ivankreso/semseg | fcd2889a1e9e03c3d1a71d19d68d15ce25a5dc79 | [
"MIT"
] | null | null | null | import sys
sys.path.append('../..')
import os
import pickle
import numpy as np
import tensorflow as tf
#from pgmagick import Image
import skimage as ski
import skimage.data, skimage.transform
from tqdm import trange
from cityscapes_info import class_info, class_color_map
from datasets.dataset_helper import convert_col... | 36.520408 | 92 | 0.685666 |
b332bec0aafd1a4e7888591cd080fe917d2d4267 | 4,701 | py | Python | applications/init/modules/Paginater.py | himelpdas/Practice-Genie | b87ea53a9476a5ad36e93e8fb166c6c38d6f7259 | [
"BSD-3-Clause"
] | null | null | null | applications/init/modules/Paginater.py | himelpdas/Practice-Genie | b87ea53a9476a5ad36e93e8fb166c6c38d6f7259 | [
"BSD-3-Clause"
] | null | null | null | applications/init/modules/Paginater.py | himelpdas/Practice-Genie | b87ea53a9476a5ad36e93e8fb166c6c38d6f7259 | [
"BSD-3-Clause"
] | null | null | null | import math
from gluon import URL, SPAN
| 52.820225 | 233 | 0.629866 |
b33442383156f3c0acad7de6e549de783efa735c | 836 | py | Python | application/file/routes.py | h4k1m0u/flask-webapp | d095449a3d324c50de745f7ac5f84b6fa2cb08b4 | [
"MIT"
] | null | null | null | application/file/routes.py | h4k1m0u/flask-webapp | d095449a3d324c50de745f7ac5f84b6fa2cb08b4 | [
"MIT"
] | null | null | null | application/file/routes.py | h4k1m0u/flask-webapp | d095449a3d324c50de745f7ac5f84b6fa2cb08b4 | [
"MIT"
] | null | null | null | from flask import Blueprint, render_template, url_for, redirect
from flask import current_app as app
from .forms import UploadForm
from werkzeug.utils import secure_filename
import os
file_bp = Blueprint('file', __name__,
template_folder='templates', static_folder='static')
| 26.125 | 72 | 0.688995 |
b3351bdda16da9303d9cddacd8c6b55abf47ec70 | 5,060 | py | Python | src/operator/transformer/align.py | k-harada/abstraction-and-reasoning-challenge | 42828a3f39be3c77bd0f4e1648b2cb1d9d15ed95 | [
"MIT"
] | 3 | 2020-05-28T03:46:23.000Z | 2020-05-29T22:53:32.000Z | src/operator/transformer/align.py | k-harada/abstraction-and-reasoning-challenge | 42828a3f39be3c77bd0f4e1648b2cb1d9d15ed95 | [
"MIT"
] | null | null | null | src/operator/transformer/align.py | k-harada/abstraction-and-reasoning-challenge | 42828a3f39be3c77bd0f4e1648b2cb1d9d15ed95 | [
"MIT"
] | 2 | 2020-05-29T07:22:22.000Z | 2020-05-29T22:53:36.000Z | from heapq import heappop, heappush
import numpy as np
from src.data import Problem, Case, Matter
from src.operator.mapper.map_connect import MapConnect
if __name__ == "__main__":
x0_ = np.array([0, 0])
x1_ = np.array([1, 1])
y0_ = np.array([0, 2])
y1_ = np.array([1, 3])
c_ = np.array([4, 5])
... | 28.111111 | 114 | 0.534387 |
b336dfd4f06633eb05d75f4fdb5a06c0dcb65ff7 | 1,590 | py | Python | python_experiments/paper_figures/tkde/data_legacy/eval_varying_eps_c_pcg.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/paper_figures/tkde/data_legacy/eval_varying_eps_c_pcg.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/paper_figures/tkde/data_legacy/eval_varying_eps_c_pcg.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | import json
if __name__ == '__main__':
with open('varying_eps_c.dicts') as ifs:
pcg_varying_eps_cpu = eval(ifs.readline())
pcg_varying_eps_mem = eval(ifs.readline())
pcg_varying_c_cpu = eval(ifs.readline())
pcg_varying_c_mem = eval(ifs.readline())
pcg_tag = 'pcg'
... | 27.894737 | 58 | 0.445283 |
b337fc90d9c521913630b0b32189385248da44bc | 5,747 | py | Python | mir/tools/utils.py | fenrir-z/ymir-cmd | 6fbffd3c1ff5dd1c9a44b55de411523b50567661 | [
"Apache-2.0"
] | 1 | 2022-01-12T03:12:47.000Z | 2022-01-12T03:12:47.000Z | mir/tools/utils.py | fenrir-z/ymir-cmd | 6fbffd3c1ff5dd1c9a44b55de411523b50567661 | [
"Apache-2.0"
] | null | null | null | mir/tools/utils.py | fenrir-z/ymir-cmd | 6fbffd3c1ff5dd1c9a44b55de411523b50567661 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import pathlib
import requests
import shutil
from typing import Dict, List, Optional, Union
from PIL import Image, UnidentifiedImageError
from mir import scm
# project
# mir repo infos
def mir_repo_head_name(git: Union[str, scm.CmdScm]) -> Optional[str]:
""" get current mir repo head ... | 36.839744 | 109 | 0.655124 |
b33850aba2836a183da06d1f438221c324a27842 | 172 | py | Python | seniorproject/preprocessing/preprocess_sample.py | teammanicotti/writingstyle | 001fecf34ed3db3699b53a586e5078dbf190a72f | [
"MIT"
] | null | null | null | seniorproject/preprocessing/preprocess_sample.py | teammanicotti/writingstyle | 001fecf34ed3db3699b53a586e5078dbf190a72f | [
"MIT"
] | 4 | 2020-11-13T18:49:50.000Z | 2022-02-10T01:26:11.000Z | seniorproject/preprocessing/preprocess_sample.py | teammanicotti/writingstyle | 001fecf34ed3db3699b53a586e5078dbf190a72f | [
"MIT"
] | null | null | null | """Preprocessing Sample."""
__author__ = 'Devon Welcheck'
def preprocess(req, resp, resource, params): # pylint: disable=unused-argument
"""Preprocess skeleton."""
| 21.5 | 79 | 0.703488 |
b3386087966e76df474b5ed6cb60a9ae1c8443b0 | 484 | py | Python | Topic08-plots/rp-debt.py | mizydorek/pands-problems-2020 | a418dcc58e49dfbcb269e4524f676c1c6a0a6255 | [
"MIT"
] | null | null | null | Topic08-plots/rp-debt.py | mizydorek/pands-problems-2020 | a418dcc58e49dfbcb269e4524f676c1c6a0a6255 | [
"MIT"
] | null | null | null | Topic08-plots/rp-debt.py | mizydorek/pands-problems-2020 | a418dcc58e49dfbcb269e4524f676c1c6a0a6255 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
main()
plt.show() | 25.473684 | 75 | 0.636364 |
b3392521392bb0d5241c9e791d0081276aa30c9e | 454 | py | Python | src/plot_results.py | andrea-gasparini/backdoor-federated-learning | 52dbeeb328282e7cd132ca4de7931d618d243994 | [
"Apache-2.0"
] | 2 | 2021-12-30T19:59:51.000Z | 2021-12-31T15:50:43.000Z | src/plot_results.py | andrea-gasparini/backdoor-federated-learning | 52dbeeb328282e7cd132ca4de7931d618d243994 | [
"Apache-2.0"
] | null | null | null | src/plot_results.py | andrea-gasparini/backdoor-federated-learning | 52dbeeb328282e7cd132ca4de7931d618d243994 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Load in the data
df = pd.read_csv("results.txt", header=None)
df.columns = ["poison_perc", "success_rate", "auc"]
# Plot the data
plt.plot(df['poison_perc'], df['success_rate'], label="Success rate")
plt.plot(df['poison_perc'], df['auc'], label=... | 25.222222 | 69 | 0.715859 |
b33cf42bd0fd23988f48859e9516133f47659bcc | 481 | py | Python | src/richie/apps/courses/migrations/0017_auto_20200827_1011.py | leduong/richie | bf7ed379b7e2528cd790dadcec10ac2656efd189 | [
"MIT"
] | 174 | 2018-04-14T23:36:01.000Z | 2022-03-10T09:27:01.000Z | src/richie/apps/courses/migrations/0017_auto_20200827_1011.py | leduong/richie | bf7ed379b7e2528cd790dadcec10ac2656efd189 | [
"MIT"
] | 631 | 2018-04-04T11:28:53.000Z | 2022-03-31T11:18:31.000Z | src/richie/apps/courses/migrations/0017_auto_20200827_1011.py | leduong/richie | bf7ed379b7e2528cd790dadcec10ac2656efd189 | [
"MIT"
] | 64 | 2018-06-27T08:35:01.000Z | 2022-03-10T09:27:43.000Z | # Generated by Django 2.2.15 on 2020-08-27 08:11
from django.db import migrations, models
| 22.904762 | 83 | 0.590437 |
b3422c9627e413c2af84a60838fdb43e2d877f43 | 2,718 | py | Python | proxyclient/experiments/timer_test.py | EricRabil/m1n1 | 0a1a9348c32e2e44374720cd9d68cbe81cf696df | [
"MIT"
] | 1,604 | 2021-01-14T19:04:59.000Z | 2022-03-31T18:34:16.000Z | proxyclient/experiments/timer_test.py | EricRabil/m1n1 | 0a1a9348c32e2e44374720cd9d68cbe81cf696df | [
"MIT"
] | 105 | 2021-01-15T03:52:27.000Z | 2022-03-30T22:16:52.000Z | proxyclient/experiments/timer_test.py | EricRabil/m1n1 | 0a1a9348c32e2e44374720cd9d68cbe81cf696df | [
"MIT"
] | 96 | 2021-01-14T21:13:53.000Z | 2022-03-31T12:14:14.000Z | #!/usr/bin/env python3
# SPDX-License-Identifier: MIT
import sys, pathlib
sys.path.append(str(pathlib.Path(__file__).resolve().parents[1]))
from m1n1.setup import *
HV_VTMR_CTL = (3, 5, 15, 1, 3)
HV_VTMR_CTL_VMASK = (1 << 0)
HV_VTMR_CTL_PMASK = (1 << 1)
HV_VTMR_LIST = (3, 5, 15, 1, 2)
TGE = (1<<27)
u.msr(CNTHCTL_E... | 24.709091 | 109 | 0.597498 |
b343279a8195c95b740ea2b5b46901eb458edfeb | 8,799 | py | Python | nrf5_mesh/CMake/SES/SESGenerator.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 15 | 2019-02-25T20:25:29.000Z | 2021-02-27T17:57:38.000Z | nrf5_mesh/CMake/SES/SESGenerator.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 3 | 2020-02-21T22:35:38.000Z | 2020-10-05T02:25:30.000Z | nrf5_mesh/CMake/SES/SESGenerator.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 5 | 2019-06-29T21:03:57.000Z | 2021-06-15T06:16:20.000Z | #!/usr/bin/env python3
# Usage: python SESGenerator.py <target_configuration>.json <output_directory>
#
# <target_configuration>.json is a json file generated from CMake on the form:
# {
# "target": {
# "name": "light_control_client_nrf52832_xxAA_s132_5.0.0",
# "sources": "main.c;provisioner.c;..",... | 37.763948 | 152 | 0.642459 |
b344553cf35913d934c9423d0a59566943fcaa1d | 1,446 | py | Python | PythonFIAP/Capitulo5_Manipula_Arquivos/Boston.py | DanielGMesquita/StudyPath | 0b3d0bb1deac7eb0d1b301edca5e5ed320568f4c | [
"MIT"
] | null | null | null | PythonFIAP/Capitulo5_Manipula_Arquivos/Boston.py | DanielGMesquita/StudyPath | 0b3d0bb1deac7eb0d1b301edca5e5ed320568f4c | [
"MIT"
] | null | null | null | PythonFIAP/Capitulo5_Manipula_Arquivos/Boston.py | DanielGMesquita/StudyPath | 0b3d0bb1deac7eb0d1b301edca5e5ed320568f4c | [
"MIT"
] | null | null | null | #Anlise do relatrio de vos e viagens do aeroporto de Boston com base nos relatrios econmicos oficiais
with open('economic-indicators.csv', 'r') as boston:
total_voos = 0
maior = 0
total_passageiros = 0
maior_media_diaria = 0
ano_usuario = input('Qual ano deseja pesquisar?: ')
#Retornar o total ... | 45.1875 | 106 | 0.64592 |
b3459b788b9b0f9bc1d67f711ca82a899ecdbfb0 | 9,008 | py | Python | source/rttov_test/profile-datasets-py/div52/011.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | null | null | null | source/rttov_test/profile-datasets-py/div52/011.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | 1 | 2022-03-12T12:19:59.000Z | 2022-03-12T12:19:59.000Z | source/rttov_test/profile-datasets-py/div52/011.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | null | null | null | """
Profile ../profile-datasets-py/div52/011.py
file automaticaly created by prof_gen.py script
"""
self["ID"] = "../profile-datasets-py/div52/011.py"
self["Q"] = numpy.array([ 1.60776800e+00, 5.75602400e+00, 7.00189400e+00,
7.33717600e+00, 6.76175900e+00, 8.41951900e+00,
6.5464... | 54.26506 | 92 | 0.571603 |
b345e48eaa39766f1b731f4fbeab11fa0907ab5a | 463 | py | Python | Tag_17.py | Gravitar64/Advent-of-Code-2015 | 423ef65815ecd92dc15ae8edd64c2af346bf8fcc | [
"Apache-2.0"
] | null | null | null | Tag_17.py | Gravitar64/Advent-of-Code-2015 | 423ef65815ecd92dc15ae8edd64c2af346bf8fcc | [
"Apache-2.0"
] | null | null | null | Tag_17.py | Gravitar64/Advent-of-Code-2015 | 423ef65815ecd92dc15ae8edd64c2af346bf8fcc | [
"Apache-2.0"
] | null | null | null | from time import perf_counter as pfc
from itertools import combinations
puzzle = load_puzzle('Tag_17.txt')
start = pfc()
print(solve(puzzle), pfc()-start) | 21.045455 | 36 | 0.669546 |
b347b691c3c4c7996f91f105edcfcd1839de843a | 1,464 | py | Python | blog/templatetags/blog_tags.py | josephdubon/boilerplate_dubon_django_blog | 1dbe470006be066b12dd6486eb26a41d304206f8 | [
"Unlicense",
"MIT"
] | null | null | null | blog/templatetags/blog_tags.py | josephdubon/boilerplate_dubon_django_blog | 1dbe470006be066b12dd6486eb26a41d304206f8 | [
"Unlicense",
"MIT"
] | 2 | 2021-06-10T20:43:00.000Z | 2021-09-22T19:55:41.000Z | blog/templatetags/blog_tags.py | josephdubon/boilerplate_dubon_django_blog | 1dbe470006be066b12dd6486eb26a41d304206f8 | [
"Unlicense",
"MIT"
] | null | null | null | from django import template
from django.db.models import Count
from django.utils.safestring import mark_safe
import markdown
from ..models import Post
register = template.Library()
####
# Register as simple tags
####
# A simple template tag that returns the number of posts published so far.=
# A simple template ... | 26.618182 | 88 | 0.734973 |
b347c2e19c64fdbc38703b93493ffd39b10d1790 | 104 | py | Python | gpt/config.py | jimth001/formality_emnlp19 | fa2f48f2ac6efd98c0cf986681747ea41adbac48 | [
"MIT"
] | 22 | 2019-08-28T16:36:51.000Z | 2022-01-13T07:30:36.000Z | gpt/config.py | jimth001/formality_emnlp19 | fa2f48f2ac6efd98c0cf986681747ea41adbac48 | [
"MIT"
] | 11 | 2020-01-28T22:16:38.000Z | 2022-02-09T23:31:41.000Z | gpt/config.py | jimth001/formality_emnlp19 | fa2f48f2ac6efd98c0cf986681747ea41adbac48 | [
"MIT"
] | 5 | 2019-11-12T13:28:36.000Z | 2022-01-13T07:30:39.000Z | from gpt.src import encoder
text_enc = encoder.get_encoder('./models/117M')
config_path='./models/117M'
| 26 | 47 | 0.769231 |
b34b540ac9f9bca5d13deef19fa4a3b49d5c22b5 | 11,555 | py | Python | epann/EStool.py | WorldEditors/ProjectNuwa | 8324b0f18d753649b08477ac210979150bce4f2c | [
"Apache-2.0"
] | null | null | null | epann/EStool.py | WorldEditors/ProjectNuwa | 8324b0f18d753649b08477ac210979150bce4f2c | [
"Apache-2.0"
] | null | null | null | epann/EStool.py | WorldEditors/ProjectNuwa | 8324b0f18d753649b08477ac210979150bce4f2c | [
"Apache-2.0"
] | null | null | null | """
Tookits for Evolution Strategies
"""
import pickle
import sys
import os
import time
from copy import deepcopy
import numpy
import math
import numpy.random as random
FLOAT_MAX = 1.0e+8
def compute_ranks(x):
"""
Returns rank as a vector of len(x) with integers from 0 to len(x)
"""
assert x.ndim == ... | 38.645485 | 144 | 0.614453 |
b34b7e35d2fe6795551ee57d83ecde2ef7416521 | 2,059 | py | Python | zeppos_root/root.py | changrunner/zeppos_root | dc4146d87454a921aba7fc0c01180b4b7dad1358 | [
"Apache-2.0"
] | null | null | null | zeppos_root/root.py | changrunner/zeppos_root | dc4146d87454a921aba7fc0c01180b4b7dad1358 | [
"Apache-2.0"
] | null | null | null | zeppos_root/root.py | changrunner/zeppos_root | dc4146d87454a921aba7fc0c01180b4b7dad1358 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from os import path
from zeppos_logging.app_logger import AppLogger
| 36.767857 | 110 | 0.606119 |
b34ced91974433146e88095dc35d1816f2301813 | 829 | py | Python | weather_board_log.py | petervdb/weather_monitor | 35df2493385892969544579d4b465a5cd31daad4 | [
"MIT"
] | null | null | null | weather_board_log.py | petervdb/weather_monitor | 35df2493385892969544579d4b465a5cd31daad4 | [
"MIT"
] | null | null | null | weather_board_log.py | petervdb/weather_monitor | 35df2493385892969544579d4b465a5cd31daad4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import SI1132
import BME280
import sys
import time
import os
if len(sys.argv) != 2:
print("Usage: weather_board.py <i2c device file>")
sys.exit()
si1132 = SI1132.SI1132(sys.argv[1])
bme280 = BME280.BME280(sys.argv[1], 0x03, 0x02, 0x02, 0x02)
print("======== si1132 ========")
print("UV_index... | 28.586207 | 62 | 0.652593 |
b34e77f588ce69279ed91eb9f75268c46fe83c1d | 444 | py | Python | UTrackGUI/widgets/video_widget.py | uetke/UTrack | efab70bf2e1dddf76e1b7e3a0efbdd611ea856de | [
"MIT"
] | null | null | null | UTrackGUI/widgets/video_widget.py | uetke/UTrack | efab70bf2e1dddf76e1b7e3a0efbdd611ea856de | [
"MIT"
] | null | null | null | UTrackGUI/widgets/video_widget.py | uetke/UTrack | efab70bf2e1dddf76e1b7e3a0efbdd611ea856de | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import QWidget, QHBoxLayout
from pyqtgraph import GraphicsLayoutWidget
import pyqtgraph as pg | 29.6 | 48 | 0.693694 |
b34fbde2e6b2d38c2db36ca1c3b839a7216bdccf | 1,788 | py | Python | tablas.py | yakairi/Tienda.py | afc7c5734833e2974c0a6b9aceab1b7097db9add | [
"MIT"
] | null | null | null | tablas.py | yakairi/Tienda.py | afc7c5734833e2974c0a6b9aceab1b7097db9add | [
"MIT"
] | null | null | null | tablas.py | yakairi/Tienda.py | afc7c5734833e2974c0a6b9aceab1b7097db9add | [
"MIT"
] | null | null | null | # Tienda
CREATE TABLE `cliente` (
`idCliente` int NOT NULL AUTO_INCREMENT,
`nombre` varchar(45) DEFAULT NULL,
`apellido` varchar(45) DEFAULT NULL,
`telefono` varchar(45) DEFAULT NULL,
`email` varchar(45) DEFAULT NULL,
`ciudad` varchar(45) DEFAULT NULL,
`pais` varchar(45) DEFAULT NULL,
PRIMARY KEY (`idCl... | 29.311475 | 47 | 0.730984 |
b3505f341d67a1c5794fe4b0bc6c75cbc2db2874 | 8,184 | py | Python | tpdatasrc/tpgamefiles/scr/tpModifiers/duelist.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 69 | 2015-05-05T14:09:25.000Z | 2022-02-15T06:13:04.000Z | tpdatasrc/tpgamefiles/scr/tpModifiers/duelist.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 457 | 2015-05-01T22:07:45.000Z | 2022-03-31T02:19:10.000Z | tpdatasrc/tpgamefiles/scr/tpModifiers/duelist.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 25 | 2016-02-04T21:19:53.000Z | 2021-11-15T23:14:51.000Z | from templeplus.pymod import PythonModifier
from toee import *
import tpdp
import char_class_utils
import d20_action_utils
###################################################
print "Registering " + GetConditionName()
classEnum = stat_level_duelist
preciseStrikeEnum = 2400
############################################... | 32.347826 | 146 | 0.758187 |
b350a3188e35c8f2c37003d0fe783f3e0525f0d1 | 2,349 | py | Python | bot/__main__.py | ThatFarziGamer/YouNeedSnek | 64c626e81c8652fb54312dad19e6ef0a7ce6c257 | [
"MIT"
] | null | null | null | bot/__main__.py | ThatFarziGamer/YouNeedSnek | 64c626e81c8652fb54312dad19e6ef0a7ce6c257 | [
"MIT"
] | null | null | null | bot/__main__.py | ThatFarziGamer/YouNeedSnek | 64c626e81c8652fb54312dad19e6ef0a7ce6c257 | [
"MIT"
] | null | null | null | import logging
import datetime
import os
import sys
import yaml
from pathlib import Path
import discord
from discord.ext import commands
def setup_logger() -> logging.Logger:
"""Create and return the root Logger object for the bot."""
LOGDIR = Path('logs')
LOGDIR.mkdir(exist_ok=True)
timestamp = date... | 31.32 | 92 | 0.664112 |
b3532df5397a8d5aa65b3ed84d50aae7151c36c0 | 95,382 | py | Python | sdk/python/pulumi_aws_native/emr/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/emr/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/emr/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 37.434066 | 268 | 0.664685 |
b354da045a8c2383221fb2caac0d79e36dd3ab7f | 25,921 | py | Python | riskfolio/RiskFunctions.py | xiaolongguo/Riskfolio-Lib | 4e74c4f27a48ced7dcc0ab4a9e96c922cd54f0b4 | [
"BSD-3-Clause"
] | 2 | 2022-02-07T11:16:46.000Z | 2022-02-23T06:57:41.000Z | riskfolio/RiskFunctions.py | xiaolongguo/Riskfolio-Lib | 4e74c4f27a48ced7dcc0ab4a9e96c922cd54f0b4 | [
"BSD-3-Clause"
] | null | null | null | riskfolio/RiskFunctions.py | xiaolongguo/Riskfolio-Lib | 4e74c4f27a48ced7dcc0ab4a9e96c922cd54f0b4 | [
"BSD-3-Clause"
] | 1 | 2022-02-07T11:38:34.000Z | 2022-02-07T11:38:34.000Z | import numpy as np
from scipy.optimize import minimize
from scipy.optimize import Bounds
__all__ = [
"MAD",
"SemiDeviation",
"VaR_Hist",
"CVaR_Hist",
"WR",
"LPM",
"Entropic_RM",
"EVaR_Hist",
"MaxAbsDD",
"AvgAbsDD",
"ConAbsDD",
"MaxRelDD",
"AvgRelDD",
"ConRelDD",... | 25.998997 | 88 | 0.532078 |
b3597781efddb74aa0e9cc460ed2839b023ce0f7 | 4,598 | py | Python | qSonify/sonify/song.py | jiosue/qSonify | 35f4a16dfa08b4643586feda9ae74a76817c8432 | [
"MIT"
] | null | null | null | qSonify/sonify/song.py | jiosue/qSonify | 35f4a16dfa08b4643586feda9ae74a76817c8432 | [
"MIT"
] | null | null | null | qSonify/sonify/song.py | jiosue/qSonify | 35f4a16dfa08b4643586feda9ae74a76817c8432 | [
"MIT"
] | null | null | null | from midiutil.MidiFile import MIDIFile
import os
def _create_midi_mapping():
""" Create a dictionary that maps note name to midi note integer """
middle_c = 60
notes = "c", "c#", "d", "d#", "e", "f", "f#", "g", "g#", "a", "a#", "b"
equiv = (("c#", "db"), ("d#", "eb"),
("f#", "gb"... | 37.080645 | 80 | 0.536755 |
b35d694bac54a0ae6c31c50cc6cb7382b796541b | 27,333 | py | Python | src/fora/connectors/tunnel_dispatcher.py | oddlama/forge | d09b0f309ce7dcda79dc03765473b48732c71845 | [
"MIT"
] | 14 | 2021-12-17T10:38:27.000Z | 2022-03-02T01:20:01.000Z | src/fora/connectors/tunnel_dispatcher.py | oddlama/forge | d09b0f309ce7dcda79dc03765473b48732c71845 | [
"MIT"
] | 2 | 2022-01-11T13:31:09.000Z | 2022-02-03T15:41:43.000Z | src/fora/connectors/tunnel_dispatcher.py | oddlama/forge | d09b0f309ce7dcda79dc03765473b48732c71845 | [
"MIT"
] | 2 | 2022-02-03T15:20:51.000Z | 2022-02-03T15:45:11.000Z | #!/usr/bin/env python3
# pylint: disable=too-many-lines
"""
Provides a stdin/stdout based protocol to safely dispatch commands and return their
results over any connection that forwards both stdin/stdout, as well as some other
needed remote system related utilities.
"""
import errno as sys_errno
import hashlib
import... | 34.081047 | 138 | 0.612849 |
b35e97178885b8f0b2dbae4044010a368837f069 | 1,726 | py | Python | events/importer/fill_events_language.py | Anthon98/linkedevents | 1171dc6d344fcbe8452ddee88b52719bb6cd5ed6 | [
"MIT"
] | 1 | 2021-08-19T12:44:21.000Z | 2021-08-19T12:44:21.000Z | events/importer/fill_events_language.py | Anthon98/linkedevents | 1171dc6d344fcbe8452ddee88b52719bb6cd5ed6 | [
"MIT"
] | 11 | 2020-08-21T07:22:03.000Z | 2022-03-31T09:10:44.000Z | events/importer/fill_events_language.py | Anthon98/linkedevents | 1171dc6d344fcbe8452ddee88b52719bb6cd5ed6 | [
"MIT"
] | 6 | 2020-02-11T06:58:33.000Z | 2021-11-09T12:48:19.000Z | # -*- coding: utf-8 -*-
import logging
from django import db
from django.conf import settings
from django.core.management import call_command, BaseCommand, CommandError
from django.utils.module_loading import import_string
from django_orghierarchy.models import Organization
from django.db import transaction
from e... | 26.553846 | 105 | 0.570104 |
b35f80332b012e3019899544e95458e4103fb451 | 1,524 | py | Python | megatron/logging.py | coreweave/gpt-neox | 5c9641c8b1dae16e5642d78a29e879ad312e0725 | [
"Apache-2.0"
] | 1 | 2021-04-27T21:28:25.000Z | 2021-04-27T21:28:25.000Z | megatron/logging.py | fplk/gpt-neox | 9992042ab113428022e5e91421c04917577b8e00 | [
"Apache-2.0"
] | null | null | null | megatron/logging.py | fplk/gpt-neox | 9992042ab113428022e5e91421c04917577b8e00 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright (c) 2021, EleutherAI contributors
# This file is based on code by the authors denoted below and has been modified from its original version.
#
# 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 ... | 28.222222 | 106 | 0.612861 |
b360163542b7e4208c87b59b074892580edf0734 | 2,908 | py | Python | Code/set.py | chelseacastelli/CS-1.3-Core-Data-Structures | 0a130d9a51c66c47c17b0b520e01360d48559954 | [
"MIT"
] | null | null | null | Code/set.py | chelseacastelli/CS-1.3-Core-Data-Structures | 0a130d9a51c66c47c17b0b520e01360d48559954 | [
"MIT"
] | 1 | 2020-03-09T23:24:21.000Z | 2020-03-16T23:48:31.000Z | Code/set.py | chelseacastelli/CS-1.3-Core-Data-Structures | 0a130d9a51c66c47c17b0b520e01360d48559954 | [
"MIT"
] | null | null | null | from hashtable import HashTable
| 31.608696 | 88 | 0.6011 |
b3651538877d3892bf8c5ca4d029cf992243ceee | 2,286 | py | Python | openmdao/solvers/test/test_brent_multicomp.py | naylor-b/OpenMDAO1 | 49d82f6601b33db9bdcf7d146d030d55e3b62ef4 | [
"Apache-2.0"
] | 17 | 2018-01-11T20:13:59.000Z | 2022-03-22T03:46:05.000Z | openmdao/solvers/test/test_brent_multicomp.py | naylor-b/OpenMDAO1 | 49d82f6601b33db9bdcf7d146d030d55e3b62ef4 | [
"Apache-2.0"
] | 6 | 2017-10-19T23:14:14.000Z | 2020-11-22T17:30:57.000Z | openmdao/solvers/test/test_brent_multicomp.py | naylor-b/OpenMDAO1 | 49d82f6601b33db9bdcf7d146d030d55e3b62ef4 | [
"Apache-2.0"
] | 10 | 2018-04-12T22:13:33.000Z | 2020-05-07T10:02:59.000Z | """ Unit test for the Brent, one variable nonlinear solver. In this case, the
system has multiple components."""
import unittest
from openmdao.api import Group, Problem, Component, Brent, ScipyGMRES
from openmdao.test.util import assert_rel_error
if __name__ == "__main__":
unittest.main() | 27.878049 | 82 | 0.575678 |
b36568a7f5e7ad85c77f6c9d7ddd21f9cadfde38 | 1,132 | py | Python | src/afterpay/merchant.py | nyneava/afterpay-python | ec9f9230ce321a2d9876ac93f222c24ffe7eee1a | [
"MIT"
] | null | null | null | src/afterpay/merchant.py | nyneava/afterpay-python | ec9f9230ce321a2d9876ac93f222c24ffe7eee1a | [
"MIT"
] | null | null | null | src/afterpay/merchant.py | nyneava/afterpay-python | ec9f9230ce321a2d9876ac93f222c24ffe7eee1a | [
"MIT"
] | null | null | null | from afterpay.attribute_getter import AttributeGetter
from afterpay.exceptions import AfterpayError
| 35.375 | 116 | 0.701413 |
b366133a08c1c7f546f337d1c267e087dc6444d2 | 8,442 | py | Python | src/tou/tou_optimization.py | NREL/EFFORT | b83e425d038c60f13b4c8da5b9c7caaf6b5f64d7 | [
"BSD-3-Clause"
] | null | null | null | src/tou/tou_optimization.py | NREL/EFFORT | b83e425d038c60f13b4c8da5b9c7caaf6b5f64d7 | [
"BSD-3-Clause"
] | null | null | null | src/tou/tou_optimization.py | NREL/EFFORT | b83e425d038c60f13b4c8da5b9c7caaf6b5f64d7 | [
"BSD-3-Clause"
] | null | null | null | # Standard imports
import os
import logging
import json
# Third-party imports
from pyomo.environ import SolverFactory
import pandas as pd
import matplotlib.pyplot as plt
# Internal imports
#from tou_model import model
from tou.tou_model_price import model
from generate_profile.constants import LOG_FORMAT
'''
Obtaine... | 40.392344 | 173 | 0.684672 |
b366f304d22f4d1525ccf2ccb3bef5468f62fabf | 4,036 | py | Python | limonero/util/upload.py | eubr-bigsea/limonero | 54851b73bb1e4f5626b3d38ea7eeb50f3ed2e3c5 | [
"Apache-2.0"
] | 1 | 2018-01-01T20:35:43.000Z | 2018-01-01T20:35:43.000Z | limonero/util/upload.py | eubr-bigsea/limonero | 54851b73bb1e4f5626b3d38ea7eeb50f3ed2e3c5 | [
"Apache-2.0"
] | 37 | 2017-02-24T17:07:25.000Z | 2021-09-02T14:49:19.000Z | limonero/util/upload.py | eubr-bigsea/limonero | 54851b73bb1e4f5626b3d38ea7eeb50f3ed2e3c5 | [
"Apache-2.0"
] | 2 | 2019-11-05T13:45:45.000Z | 2020-11-13T22:02:37.000Z | # -*- coding: utf-8 -*-
import logging
import uuid
from gettext import gettext
from py4j.compat import bytearray2
from urllib.parse import urlparse
from limonero.py4j_init import create_gateway
WRONG_HDFS_CONFIG = gettext(
"Limonero HDFS access not correctly configured (see "
"config 'dfs.client.use.datanode.... | 32.548387 | 79 | 0.6556 |
b366f48606841fe29fdccd25f0931d6c51909f80 | 14,396 | py | Python | DailyProgrammer/DP20160722C.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | 2 | 2020-12-23T18:59:22.000Z | 2021-04-14T13:16:09.000Z | DailyProgrammer/DP20160722C.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | DailyProgrammer/DP20160722C.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | """
[2016-07-22] Challenge #276 [Hard] Loop solver part 2
https://www.reddit.com/r/dailyprogrammer/comments/4u3e96/20160722_challenge_276_hard_loop_solver_part_2/
This is the same challenge as /u/jnazario's excellent [ Loop
solver](https://www.reddit.com/r/dailyprogrammer/comments/4rug59/20160708_challenge_274_hard_... | 88.319018 | 119 | 0.427549 |
b367137798db5a8033c70626264857c8575384f8 | 851 | py | Python | account/urls.py | bopopescu/storyboard | 0258fd6f80b6bbd9d0ca493cbaaae87c3a6d16e2 | [
"MIT"
] | null | null | null | account/urls.py | bopopescu/storyboard | 0258fd6f80b6bbd9d0ca493cbaaae87c3a6d16e2 | [
"MIT"
] | null | null | null | account/urls.py | bopopescu/storyboard | 0258fd6f80b6bbd9d0ca493cbaaae87c3a6d16e2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
urls.py
Created by Darcy Liu on 2012-03-03.
Copyright (c) 2012 Close To U. All rights reserved.
"""
from django.conf.urls import *
from django.contrib.auth import views as auth_views
urlpatterns = patterns('account.views',
(r'^$','index'),
(r'^signup... | 34.04 | 73 | 0.564042 |
b36b45596be0c00b3ce27b76dfcdb7d0c441a008 | 693 | py | Python | webdriver_setup/opera.py | xloem/webdriver-setup | 3cd091559ea6d3017995ac7f252c2c107ff1f44c | [
"Apache-2.0"
] | 1 | 2020-12-06T13:27:45.000Z | 2020-12-06T13:27:45.000Z | webdriver_setup/opera.py | xloem/webdriver-setup | 3cd091559ea6d3017995ac7f252c2c107ff1f44c | [
"Apache-2.0"
] | 1 | 2021-11-28T14:03:23.000Z | 2021-11-28T14:03:23.000Z | webdriver_setup/opera.py | xloem/webdriver-setup | 3cd091559ea6d3017995ac7f252c2c107ff1f44c | [
"Apache-2.0"
] | 2 | 2021-07-21T11:24:56.000Z | 2021-09-20T11:13:24.000Z | from selenium import webdriver
from webdriver_manager.opera import OperaDriverManager
from webdriver_setup.driver import DriverBase
| 25.666667 | 83 | 0.701299 |
b36beaae20e75b8473f902d6834581e7dcae6799 | 61,158 | py | Python | python/vtool/maya_lib/core.py | louisVottero/vtool | 4e2592df5841829e790251dc6923e45c8d013091 | [
"MIT"
] | 3 | 2022-02-22T01:00:59.000Z | 2022-03-07T16:19:27.000Z | python/vtool/maya_lib/core.py | louisVottero/vtool | 4e2592df5841829e790251dc6923e45c8d013091 | [
"MIT"
] | 4 | 2022-03-04T05:25:44.000Z | 2022-03-11T04:51:35.000Z | python/vtool/maya_lib/core.py | louisVottero/vtool | 4e2592df5841829e790251dc6923e45c8d013091 | [
"MIT"
] | 1 | 2022-03-31T23:07:09.000Z | 2022-03-31T23:07:09.000Z | # Copyright (C) 2022 Louis Vottero louis.vot@gmail.com All rights reserved.
from __future__ import absolute_import
import os
import string
import traceback
from functools import wraps
from .. import util, util_file
from . import api
from vtool.util import get_log_tabs
in_maya = util.is_in_maya()... | 27.073041 | 181 | 0.531672 |
b36d5099ac12b98b41d1f637481fe1af850d8737 | 5,586 | py | Python | soap/flopoco/common.py | gitter-badger/soap | 4f5eb7848e4dc516a6ff972db5c8c46ec9037c47 | [
"MIT"
] | 22 | 2016-02-08T16:57:30.000Z | 2021-03-12T20:32:06.000Z | soap/flopoco/common.py | gitter-badger/soap | 4f5eb7848e4dc516a6ff972db5c8c46ec9037c47 | [
"MIT"
] | 1 | 2018-07-11T21:21:27.000Z | 2018-07-17T19:53:19.000Z | soap/flopoco/common.py | gitter-badger/soap | 4f5eb7848e4dc516a6ff972db5c8c46ec9037c47 | [
"MIT"
] | 6 | 2016-02-01T13:30:56.000Z | 2018-11-28T04:35:27.000Z | import math
import os
import tempfile
from contextlib import contextmanager
from soap import logger
from soap.common.cache import cached
from soap.expression import operators, OutputVariableTuple
from soap.semantics.error import IntegerInterval, ErrorSemantics
flopoco_command_map = {
'IntAdder': ('{wi}', ),
... | 29.712766 | 77 | 0.621196 |
b37189a6c01fc79a353e9a5cc40d97e3e7ee592d | 5,651 | py | Python | coralquant/taskmanage.py | dabuc/CoralQuant | 26ba2e0b39a897d8947166796c6a4e9f5ab202fa | [
"MIT"
] | null | null | null | coralquant/taskmanage.py | dabuc/CoralQuant | 26ba2e0b39a897d8947166796c6a4e9f5ab202fa | [
"MIT"
] | null | null | null | coralquant/taskmanage.py | dabuc/CoralQuant | 26ba2e0b39a897d8947166796c6a4e9f5ab202fa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from coralquant.models.odl_model import BS_Stock_Basic, BS_SZ50_Stocks, TS_Stock_Basic, TS_TradeCal
from coralquant.spider.bs_stock_basic import get_stock_basic
from coralquant import logger
from datetime import date, datetime, timedelta
from sqlalchemy import MetaData
from coralquant.database i... | 31.569832 | 117 | 0.595116 |
b3736fa542dd14804246448905f3d93d659686aa | 733 | py | Python | Scripts13/Script104.py | jonfisik/ScriptsPython | 1d15221b3a41a06a189e3e04a5241fa63df9cf3f | [
"MIT"
] | 1 | 2020-09-05T22:25:36.000Z | 2020-09-05T22:25:36.000Z | Scripts13/Script104.py | jonfisik/ScriptsPython | 1d15221b3a41a06a189e3e04a5241fa63df9cf3f | [
"MIT"
] | null | null | null | Scripts13/Script104.py | jonfisik/ScriptsPython | 1d15221b3a41a06a189e3e04a5241fa63df9cf3f | [
"MIT"
] | null | null | null | '''Exerccio Python 104: Crie um programa que tenha a funo leiaInt(), que vai funcionar de forma semelhante 'a funo input() do Python, s que fazendo a validao para aceitar apenas um valor numrico.
Ex: n = leiaInt('Digite um n: ')'''
#programa
print('---'*10)
n = leiaInt('Digite um nmero: ')
print(f'Voc digitou o nmero... | 29.32 | 204 | 0.560709 |
b37394b50acd1c191fcfdfaab1bed649bfdb75c6 | 1,055 | py | Python | pgctl/timestamp.py | struys/pgctl | 7e64765c01d8f9798d659dfbe409a3e5cb05bf7a | [
"MIT"
] | null | null | null | pgctl/timestamp.py | struys/pgctl | 7e64765c01d8f9798d659dfbe409a3e5cb05bf7a | [
"MIT"
] | null | null | null | pgctl/timestamp.py | struys/pgctl | 7e64765c01d8f9798d659dfbe409a3e5cb05bf7a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Format stolen from daemontools' tai64nlocal:
2015-10-19 17:43:37.772152500
We'd usually use the s6 tool, but there's a problem:
http://www.mail-archive.com/skaware@list.skarnet.org/msg00575.html
"""
from __future__ import absolute_import
from __future__ import print_function
from _... | 23.977273 | 70 | 0.636019 |
b37435ce932427a215af1a8179eed317d2590e74 | 1,752 | py | Python | scripts/Figures and Videos/Figure 2D/produce_fig_2D.py | jfaccioni/clovars | 64e24286a2dc185490384aeb08027d88eb9462c4 | [
"MIT"
] | null | null | null | scripts/Figures and Videos/Figure 2D/produce_fig_2D.py | jfaccioni/clovars | 64e24286a2dc185490384aeb08027d88eb9462c4 | [
"MIT"
] | null | null | null | scripts/Figures and Videos/Figure 2D/produce_fig_2D.py | jfaccioni/clovars | 64e24286a2dc185490384aeb08027d88eb9462c4 | [
"MIT"
] | null | null | null | from pathlib import Path
import random
import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from clovars.main import main as clovars_main
sns.set()
RANDOMNESS_SEED = 42
def main():
"""Main function of this script."""
random.seed(RANDOMNESS_SEED)
np.ran... | 23.675676 | 109 | 0.591895 |
b374c23ca0c9952e52528d5ab3d944cd2eb56f6c | 8,156 | py | Python | numba_celltree/geometry_utils.py | Huite/numba_celltree | f6562153fb09468c64c6594b5ed4c48ce827997a | [
"MIT"
] | 2 | 2021-08-30T08:44:45.000Z | 2021-08-30T11:55:25.000Z | numba_celltree/geometry_utils.py | Deltares/numba_celltree | 898c54a18731e56407d03636f7f18e67d84a1f00 | [
"MIT"
] | null | null | null | numba_celltree/geometry_utils.py | Deltares/numba_celltree | 898c54a18731e56407d03636f7f18e67d84a1f00 | [
"MIT"
] | null | null | null | from typing import Sequence, Tuple
import numba as nb
import numpy as np
from .constants import (
FILL_VALUE,
NDIM,
PARALLEL,
TOLERANCE_ON_EDGE,
Box,
FloatArray,
FloatDType,
IntArray,
Point,
Vector,
)
from .utils import allocate_box_polygon, allocate_polygon
| 28.418118 | 86 | 0.581045 |
2fa1d4df373d09a209451df383587b67198a18fa | 438 | py | Python | Study/src/com/company/test/favorite_languages.py | guptasuresh2004/python_handson | 8f47784b09bddabd5ab28d38641cfca671869623 | [
"MIT"
] | null | null | null | Study/src/com/company/test/favorite_languages.py | guptasuresh2004/python_handson | 8f47784b09bddabd5ab28d38641cfca671869623 | [
"MIT"
] | null | null | null | Study/src/com/company/test/favorite_languages.py | guptasuresh2004/python_handson | 8f47784b09bddabd5ab28d38641cfca671869623 | [
"MIT"
] | null | null | null | from collections import OrderedDict
favorite_languages = OrderedDict()
favorite_languages["Suresh"]="python"
favorite_languages["Kumar"]="Java"
favorite_languages["Gupta"]="c"
for key in favorite_languages.keys():
print(key+" like to use :"+favorite_languages[key].title())
lang = {}
lang["Suresh"]="python"
la... | 24.333333 | 63 | 0.694064 |
2fa1d59d738f6050541565b7625bf68ab9c9b3ab | 43 | py | Python | demo_zinnia_wordpress/__init__.py | django-blog-zinnia/wordpress2zinnia | 656df6d431418a660f0e590d2226af5e6dd7a3e6 | [
"BSD-3-Clause"
] | 7 | 2015-08-16T18:50:52.000Z | 2021-05-23T11:28:22.000Z | demo_zinnia_wordpress/__init__.py | django-blog-zinnia/wordpress2zinnia | 656df6d431418a660f0e590d2226af5e6dd7a3e6 | [
"BSD-3-Clause"
] | 5 | 2015-06-20T07:04:01.000Z | 2018-08-02T14:12:41.000Z | demo_zinnia_wordpress/__init__.py | django-blog-zinnia/wordpress2zinnia | 656df6d431418a660f0e590d2226af5e6dd7a3e6 | [
"BSD-3-Clause"
] | 7 | 2015-04-17T14:57:37.000Z | 2020-10-17T04:32:02.000Z | """Demo of Zinnia with wordpress import"""
| 21.5 | 42 | 0.72093 |
2fa20b3896ff72ff33be98125f29809dab379a74 | 260 | py | Python | helper.py | vanashimko/discrete-fourier-transform | 9430ba2b0b7b994c495d6ea2a9beb1099c512e0c | [
"MIT"
] | 1 | 2018-10-06T10:17:42.000Z | 2018-10-06T10:17:42.000Z | helper.py | vanashimko/discrete-fourier-transform | 9430ba2b0b7b994c495d6ea2a9beb1099c512e0c | [
"MIT"
] | null | null | null | helper.py | vanashimko/discrete-fourier-transform | 9430ba2b0b7b994c495d6ea2a9beb1099c512e0c | [
"MIT"
] | null | null | null | from itertools import repeat
from random import randrange
| 26 | 63 | 0.723077 |
2fa21b6782bbe1bd275b38f48a0d897b2c47128c | 3,317 | py | Python | azure/cart_svc_serverless/getCartTotal/__init__.py | ishrivatsa/lambda-samples | 17acaa5014401cd9947445140de7ee638aff0b61 | [
"MIT"
] | null | null | null | azure/cart_svc_serverless/getCartTotal/__init__.py | ishrivatsa/lambda-samples | 17acaa5014401cd9947445140de7ee638aff0b61 | [
"MIT"
] | 1 | 2021-06-02T01:00:22.000Z | 2021-06-02T01:00:22.000Z | azure/cart_svc_serverless/getCartTotal/__init__.py | ishrivatsa/serverless-examples | 17acaa5014401cd9947445140de7ee638aff0b61 | [
"MIT"
] | null | null | null | import logging
import os
from os import environ
import redis
import json
import azure.functions as func
redisHost= ""
redisPort = 6379
redisPassword = ""
## Get data from the redis db
## Request POST /cart/item/add/{userid}
| 30.431193 | 91 | 0.614109 |
2fa406a1d9616f7c6d29469b8cff1b0491bb7fd2 | 122 | py | Python | resources/files/__init__.py | vishu221b/bookme-flask-REST-API-Collection | 9ee923e13d786af9b11421370edac718743855af | [
"MIT"
] | null | null | null | resources/files/__init__.py | vishu221b/bookme-flask-REST-API-Collection | 9ee923e13d786af9b11421370edac718743855af | [
"MIT"
] | null | null | null | resources/files/__init__.py | vishu221b/bookme-flask-REST-API-Collection | 9ee923e13d786af9b11421370edac718743855af | [
"MIT"
] | null | null | null | from .documentFileUpload import DocumentFileUploadResource
from .documentFileDownload import DocumentFileDownloadResource
| 40.666667 | 62 | 0.918033 |
2fa4bb5e606b31eeef997386be13e4aa1bf047f9 | 1,239 | py | Python | src/waldur_core/core/api_groups_mapping.py | ahti87/waldur-mastermind | 772268e62dfd8eadb387b2ec3789785817a6e621 | [
"MIT"
] | null | null | null | src/waldur_core/core/api_groups_mapping.py | ahti87/waldur-mastermind | 772268e62dfd8eadb387b2ec3789785817a6e621 | [
"MIT"
] | null | null | null | src/waldur_core/core/api_groups_mapping.py | ahti87/waldur-mastermind | 772268e62dfd8eadb387b2ec3789785817a6e621 | [
"MIT"
] | null | null | null | API_GROUPS = {
'authentication': ['/api-auth/', '/api/auth-valimo/',],
'user': ['/api/users/', '/api/user-invitations/', '/api/user-counters/',],
'organization': [
'/api/customers/',
'/api/customer-permissions-log/',
'/api/customer-permissions-reviews/',
'/api/customer-permis... | 35.4 | 78 | 0.583535 |
2fa4e15f7417a6448e8ac7c6f3304b5c54934d36 | 1,758 | py | Python | python/345.py | kylekanos/project-euler-1 | af7089356a4cea90f8ef331cfdc65e696def6140 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | python/345.py | kylekanos/project-euler-1 | af7089356a4cea90f8ef331cfdc65e696def6140 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | python/345.py | kylekanos/project-euler-1 | af7089356a4cea90f8ef331cfdc65e696def6140 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-09-17T00:55:58.000Z | 2019-09-17T00:55:58.000Z | #!/usr/bin/env python
s="""
7 53 183 439 863 497 383 563 79 973 287 63 343 169 583
627 343 773 959 943 767 473 103 699 303 957 703 583 639 913
447 283 463 29 23 487 463 993 119 883 327 493 423 159 743
217 623 3 399 853 407 103 983 89 463 290 516 212 462 350
960 376 682 962 300 780 486 502 912 800 250 346 172 812 350
8... | 28.354839 | 65 | 0.632537 |
2fa52a2c878f2d09417143bd09b47087769bc67b | 3,944 | py | Python | utils/logger.py | awesome-archive/deep-q-learning | bd959029adb733754966115fbb0a08f66f6dbad0 | [
"MIT"
] | 1 | 2019-10-12T09:40:30.000Z | 2019-10-12T09:40:30.000Z | utils/logger.py | awesome-archive/deep-q-learning | bd959029adb733754966115fbb0a08f66f6dbad0 | [
"MIT"
] | null | null | null | utils/logger.py | awesome-archive/deep-q-learning | bd959029adb733754966115fbb0a08f66f6dbad0 | [
"MIT"
] | null | null | null | from tensorboardX import SummaryWriter
| 35.214286 | 90 | 0.592546 |
2fa634a1aa1d4eb31ea04f48918ed21eb9719789 | 1,241 | py | Python | docs/html_docs/manual/notebook_to_markdown.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | docs/html_docs/manual/notebook_to_markdown.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | docs/html_docs/manual/notebook_to_markdown.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
import os
import shutil
import pyNastran
from pyNastran.utils import print_bad_path
pkg_path = pyNastran.__path__[0]
| 31.025 | 81 | 0.63336 |
2fa6768e2256b3fe0e7edd9f950ccec3c27501ae | 2,852 | py | Python | src/generator_ui.py | WillMorrison/JouleQuest | 68212e4be8afb85d42e45b83b074cc028588318f | [
"BSD-3-Clause"
] | null | null | null | src/generator_ui.py | WillMorrison/JouleQuest | 68212e4be8afb85d42e45b83b074cc028588318f | [
"BSD-3-Clause"
] | null | null | null | src/generator_ui.py | WillMorrison/JouleQuest | 68212e4be8afb85d42e45b83b074cc028588318f | [
"BSD-3-Clause"
] | null | null | null | import pygame
import pygame_gui
from rules_python.python.runfiles import runfiles
| 42.567164 | 116 | 0.582398 |
2faa39feebe9d6a660e11520ad56bb2a92a90312 | 1,325 | py | Python | compliance_suite/functions/update_server_settings.py | alextsaihi/rnaget-compliance-suite | a3accae431b9e4f7791dfa5ae867e70da2dd6278 | [
"Apache-2.0"
] | 1 | 2019-09-18T14:38:55.000Z | 2019-09-18T14:38:55.000Z | compliance_suite/functions/update_server_settings.py | alextsaihi/rnaget-compliance-suite | a3accae431b9e4f7791dfa5ae867e70da2dd6278 | [
"Apache-2.0"
] | 14 | 2019-05-24T18:55:23.000Z | 2022-02-25T16:56:28.000Z | compliance_suite/functions/update_server_settings.py | alextsaihi/rnaget-compliance-suite | a3accae431b9e4f7791dfa5ae867e70da2dd6278 | [
"Apache-2.0"
] | 8 | 2019-04-08T14:48:35.000Z | 2022-02-04T16:59:59.000Z | # -*- coding: utf-8 -*-
"""Module compliance_suite.functions.update_server_settings.py
Functions to update server config/settings based on the response of a previous
API request. Each function should accept a Runner object and modify its
"retrieved_server_settings" attribute
"""
def update_supported_filters(runner, ... | 37.857143 | 79 | 0.731321 |
2fab631d5340c51e5036835293e80b75871b2ef7 | 1,272 | py | Python | rnacentral_pipeline/rnacentral/ftp_export/fasta.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | 1 | 2018-08-09T14:41:16.000Z | 2018-08-09T14:41:16.000Z | rnacentral_pipeline/rnacentral/ftp_export/fasta.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | 60 | 2015-02-04T16:43:53.000Z | 2022-01-27T10:28:43.000Z | rnacentral_pipeline/rnacentral/ftp_export/fasta.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... | 31.02439 | 72 | 0.751572 |
2fb2669f969726a9b2f0b2041c3aff48c8729aac | 1,746 | py | Python | setup.py | RicoViking9000/profanityfilter | 1c1c1dbc0e895b85ee1e685ab5ef8b4c37c5db00 | [
"BSD-3-Clause"
] | 63 | 2016-09-21T17:33:43.000Z | 2021-12-04T18:36:05.000Z | setup.py | RicoViking9000/profanityfilter | 1c1c1dbc0e895b85ee1e685ab5ef8b4c37c5db00 | [
"BSD-3-Clause"
] | 12 | 2017-07-14T04:47:37.000Z | 2022-02-15T09:50:21.000Z | setup.py | RicoViking9000/profanityfilter | 1c1c1dbc0e895b85ee1e685ab5ef8b4c37c5db00 | [
"BSD-3-Clause"
] | 28 | 2017-07-07T21:52:42.000Z | 2022-02-05T09:49:22.000Z | from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
setup(
name='profanityfilter',
version='2.0.6.',
description='A universal Python library for detecting and/or filtering profane words.',
long_description='For more detai... | 34.92 | 92 | 0.616838 |
2fb4415b648fd4703b55126d3179e70a5cb6c8e0 | 12,657 | py | Python | src/boids_core/boids.py | v-hill/advanced-computational-physics | 0eec966c5e10859e50913536ddf0e555807d38ef | [
"MIT"
] | null | null | null | src/boids_core/boids.py | v-hill/advanced-computational-physics | 0eec966c5e10859e50913536ddf0e555807d38ef | [
"MIT"
] | null | null | null | src/boids_core/boids.py | v-hill/advanced-computational-physics | 0eec966c5e10859e50913536ddf0e555807d38ef | [
"MIT"
] | null | null | null | """
This script contains the code implementing my version of the Boids artificial
life programme.
"""
# ---------------------------------- Imports ----------------------------------
# Allow imports from parent folder
import sys, os
sys.path.insert(0, os.path.abspath('..'))
# Standard library imports
impor... | 37.117302 | 111 | 0.544758 |
2fb45227a52d47d6e4bff6091b0b18ceef4fe544 | 2,904 | py | Python | chateau/session/session.py | softwerks/chateau | 6218dd623b21298a29f255e9c0d88d69651796e0 | [
"Apache-2.0"
] | null | null | null | chateau/session/session.py | softwerks/chateau | 6218dd623b21298a29f255e9c0d88d69651796e0 | [
"Apache-2.0"
] | null | null | null | chateau/session/session.py | softwerks/chateau | 6218dd623b21298a29f255e9c0d88d69651796e0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Softwerks LLC
#
# 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... | 31.225806 | 84 | 0.635331 |
2fb4bdf20e4a003ba2d5d20ee0a6939756b1f837 | 19,736 | py | Python | RDS/Service.py | Sciebo-RDS/py-research-data-services-common | a699d4241055fac226cf60e6146e4cbf96936a5c | [
"MIT"
] | null | null | null | RDS/Service.py | Sciebo-RDS/py-research-data-services-common | a699d4241055fac226cf60e6146e4cbf96936a5c | [
"MIT"
] | null | null | null | RDS/Service.py | Sciebo-RDS/py-research-data-services-common | a699d4241055fac226cf60e6146e4cbf96936a5c | [
"MIT"
] | null | null | null | from .Token import Token, OAuth2Token
from .User import User
from .Informations import LoginMode, FileTransferMode, FileTransferArchive
from urllib.parse import urlparse, urlunparse
import requests
import json
from datetime import datetime, timedelta
from typing import Union
import logging
import mimetypes
import base6... | 30.223583 | 180 | 0.576054 |
2fb59f7dc9cf3f57bdfd77504fb5c1199e6cd587 | 20,166 | py | Python | mBusi/serializers.py | hellohufan/beautyServer | 8a5109881b7065fd742f0a330b142248a7cdcef6 | [
"BSD-2-Clause"
] | null | null | null | mBusi/serializers.py | hellohufan/beautyServer | 8a5109881b7065fd742f0a330b142248a7cdcef6 | [
"BSD-2-Clause"
] | 5 | 2020-06-06T01:11:25.000Z | 2021-09-08T02:02:34.000Z | mBusi/serializers.py | hellohufan/beautyServer | 8a5109881b7065fd742f0a330b142248a7cdcef6 | [
"BSD-2-Clause"
] | null | null | null | from rest_framework import serializers
from ic_shop import models as model
from django.contrib.auth import get_user_model
from mBusi import settings as setting
from django.http import request
User = get_user_model()
# class DeviceSlotSerializer(serializers.ModelSerializer):
# # shopItem = ShopItemSeriali... | 41.071283 | 142 | 0.656451 |
2fb6a56a00127a671a07053f33f3506270e44752 | 2,024 | py | Python | Python/alexandrian_integers.py | chathu1996/hacktoberfest2020 | eaf64ac051709984cde916259e90cb24213b5c2f | [
"MIT"
] | 71 | 2020-10-06T05:53:59.000Z | 2021-11-27T03:14:42.000Z | Python/alexandrian_integers.py | chathu1996/hacktoberfest2020 | eaf64ac051709984cde916259e90cb24213b5c2f | [
"MIT"
] | 92 | 2020-10-05T19:18:14.000Z | 2021-10-09T04:35:16.000Z | Python/alexandrian_integers.py | chathu1996/hacktoberfest2020 | eaf64ac051709984cde916259e90cb24213b5c2f | [
"MIT"
] | 572 | 2020-10-05T20:11:28.000Z | 2021-10-10T16:28:29.000Z | import itertools
import sys
# The numbers are of the form p(p+d)(p+(p^2+1)/d), where d runs over divisors
# of p^2+1 and p runs over all positive integers.
if __name__ == '__main__':
sys.exit(main())
| 28.914286 | 101 | 0.464427 |
2fb7fc495d1ad6e7249191b7a040562727f395c7 | 10,737 | py | Python | src/myastro/orb_deter.py | benitocm/practical-astronomy | 4bfea9d5b2bb49997f35e8c7b1ada2708ee6c978 | [
"Apache-2.0"
] | null | null | null | src/myastro/orb_deter.py | benitocm/practical-astronomy | 4bfea9d5b2bb49997f35e8c7b1ada2708ee6c978 | [
"Apache-2.0"
] | null | null | null | src/myastro/orb_deter.py | benitocm/practical-astronomy | 4bfea9d5b2bb49997f35e8c7b1ada2708ee6c978 | [
"Apache-2.0"
] | null | null | null | """
This module contains functions related to orbit calculations
"""
# Standard library imports
from typing import Any,Dict,List,Tuple,Sequence
#https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html
from functools import partial
from math import isclose
import sys
from io import StringIO
# Third part... | 35.203279 | 177 | 0.566173 |
2fb9281e34c7da3db73175b83cad1e4923b159c2 | 1,950 | py | Python | process.py | SuperMaxine/Gaze_Tracking_Exp | fbecc09bf084faa881d63d2f1bc196104941ffb5 | [
"MIT"
] | null | null | null | process.py | SuperMaxine/Gaze_Tracking_Exp | fbecc09bf084faa881d63d2f1bc196104941ffb5 | [
"MIT"
] | null | null | null | process.py | SuperMaxine/Gaze_Tracking_Exp | fbecc09bf084faa881d63d2f1bc196104941ffb5 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
opencv
1https://github.com/opencv/opencv/tree/master/data/haarcascades
2http://www.cnblogs.com/hanson1/p/7105265.html
"""
import cv2
# #
# imagepath="nba.jpg"
#
# image = cv2.imread(imagepath)
# gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
#
#
# '''
# #
#
# opencv
#
# xml
# https:/... | 22.941176 | 82 | 0.650769 |
2fb9ac82ed503a345c0e22abf61b359a4bddd5eb | 10,806 | py | Python | userbot/modules/warn.py | akborana/Devil | 30ef9c5ac910d6344e206921e343a0932ffd6460 | [
"MIT"
] | 1 | 2021-05-06T18:30:50.000Z | 2021-05-06T18:30:50.000Z | userbot/modules/warn.py | hellboi-atul/javes-3.0 | 8777d482bd1ee877a96332a2cd84d880c151fa43 | [
"MIT"
] | null | null | null | userbot/modules/warn.py | hellboi-atul/javes-3.0 | 8777d482bd1ee877a96332a2cd84d880c151fa43 | [
"MIT"
] | null | null | null | import re
import hashlib
import asyncio
import datetime
import logging
from userbot import CMD_HELP
import os
import math
import html
import os.path
import sys
import time
from typing import Tuple, Union
from userbot import bot
from telethon import errors
from telethon import events
from telethon.tl import types
from ... | 35.781457 | 142 | 0.638627 |
2fbc2bb1fd50ab3ce270b80f068eb92420a9525e | 17,242 | py | Python | eis_pointing/eis_aia_registration.py | gpelouze/eis_pointing | 2ee714a2295bafae3492ab956792535336dd2a81 | [
"MIT"
] | 3 | 2019-04-01T09:35:01.000Z | 2021-12-14T15:39:40.000Z | eis_pointing/eis_aia_registration.py | gpelouze/eis_pointing | 2ee714a2295bafae3492ab956792535336dd2a81 | [
"MIT"
] | null | null | null | eis_pointing/eis_aia_registration.py | gpelouze/eis_pointing | 2ee714a2295bafae3492ab956792535336dd2a81 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import datetime
import os
import warnings
import numpy as np
import scipy.interpolate as si
import matplotlib as mpl
from matplotlib.backends import backend_pdf
import matplotlib.pyplot as plt
from .utils import aia_raster
from .utils import cli
from .utils import eis
from .utils import num
f... | 35.331967 | 88 | 0.563334 |
2fbc8aea51a6ab86c4dd3b376ee10300c6209509 | 1,179 | py | Python | src/olympia/accounts/urls.py | mstriemer/olympia | 2e700c20e0a8ed3f0dd389d1521c3798bf7ed7f7 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/accounts/urls.py | mstriemer/olympia | 2e700c20e0a8ed3f0dd389d1521c3798bf7ed7f7 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/accounts/urls.py | mstriemer/olympia | 2e700c20e0a8ed3f0dd389d1521c3798bf7ed7f7 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import include, url
from rest_framework.routers import SimpleRouter
from rest_framework_nested.routers import NestedSimpleRouter
from olympia.reviews.views import ReviewViewSet
from . import views
accounts = SimpleRouter()
accounts.register(r'account', views.AccountViewSet, base_name='account'... | 35.727273 | 77 | 0.72095 |