repo_name stringlengths 7 111 | __id__ int64 16.6k 19,705B | blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 151 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_url stringlengths 26 130 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 42 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 14.6k 687M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 12
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 10.2M ⌀ | gha_stargazers_count int32 0 178k ⌀ | gha_forks_count int32 0 88.9k ⌀ | gha_open_issues_count int32 0 2.72k ⌀ | gha_language stringlengths 1 16 ⌀ | gha_archived bool 1
class | gha_disabled bool 1
class | content stringlengths 10 2.95M | src_encoding stringclasses 5
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 10 2.95M | extension stringclasses 19
values | num_repo_files int64 1 202k | filename stringlengths 4 112 | num_lang_files int64 1 202k | alphanum_fraction float64 0.26 0.89 | alpha_fraction float64 0.2 0.89 | hex_fraction float64 0 0.09 | num_lines int32 1 93.6k | avg_line_length float64 4.57 103 | max_line_length int64 7 931 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SyuziH/HTI-3-Group-2-Syuzi-Harutyunyan | 18,794,776,907,639 | a39282edd778a2bd2cb2d7576bae217257f9b47f | 8a55474e5a4297ef2e43e887eb1fa601855bd06c | /Homework 3/is_prime.py | 4a2a7bf99860b74b3b56e9c207beb59f35245677 | [] | no_license | https://github.com/SyuziH/HTI-3-Group-2-Syuzi-Harutyunyan | ae91410f61b5c177e6b9f6f1842060cf6e0853b8 | dad4b9dafc77d41e0fba14ed3e87f17b5fc549d4 | refs/heads/master | 2023-04-02T03:17:04.174947 | 2021-04-07T23:36:21 | 2021-04-07T23:36:21 | 328,346,617 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def is_prime(num):
if num > 1:
for i in range(2, num):
if (num % i == 0):
print('No')
break
else:
print('Yes')
else:
print('Is not a prime number')
number = int(input('Enter the number '))
is_prime(number)
| UTF-8 | Python | false | false | 297 | py | 23 | is_prime.py | 21 | 0.444444 | 0.434343 | 0 | 15 | 18.8 | 40 |
masary2989/EC_site_webapp | 19,413,252,203,169 | f9c23434d0ebd66f4d69c1ba289027480d2faa55 | 23541da0aae0f5040cb47b1a55c604c05d4418cd | /eth_ec_server/ec_site/migrations/0001_initial.py | 1b879e3b5920e4d88e52bb669dc94a4d667dffca | [] | no_license | https://github.com/masary2989/EC_site_webapp | 17f30aafcb9d7747af60d324f4c7e61f5e251ba7 | a9f1c7bb36eb6855bcfdec78d484c368d89e9c2a | refs/heads/master | 2021-09-21T12:21:11.755539 | 2019-03-28T05:05:28 | 2019-03-28T05:05:28 | 162,418,975 | 0 | 0 | null | false | 2022-01-13T01:04:52 | 2018-12-19T10:06:11 | 2019-03-28T05:05:31 | 2022-01-13T01:04:49 | 129,569 | 0 | 0 | 30 | Visual Basic | false | false | # Generated by Django 2.1.4 on 2018-12-18 05:27
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Address',
fields=[
... | UTF-8 | Python | false | false | 3,030 | py | 34 | 0001_initial.py | 20 | 0.545215 | 0.532343 | 0 | 74 | 39.945946 | 114 |
Jazminnava/Mundo-de-productos | 4,398,046,532,952 | ec39a993722a60393fbc6c3739eddbb0abfbb643 | c62e1758762440c94098271d77c03482895a25d1 | /migrations/versions/ef581bcb9460_inital_mirtaions.py | 82ca82bb36af2a4da0af20e66f3ec5708694a2fc | [] | no_license | https://github.com/Jazminnava/Mundo-de-productos | 548e61d9a21e67388f9bbe1509c2b0ca94ef9ee4 | 8748587d62a4cbafd01e20f4e7a1a63b95fb2e9e | refs/heads/master | 2022-12-18T19:15:44.141215 | 2020-09-12T19:47:18 | 2020-09-12T19:47:18 | 295,008,059 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """inital mirtaions
Revision ID: ef581bcb9460
Revises:
Create Date: 2020-08-05 01:02:02.400739
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ef581bcb9460'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto g... | UTF-8 | Python | false | false | 7,135 | py | 21 | ef581bcb9460_inital_mirtaions.py | 8 | 0.666059 | 0.641105 | 0 | 160 | 43.58125 | 74 |
amkalsi/cmssw | 2,448,131,381,593 | 5d9bb25a263db52197a1f1b04574bc5af57da158 | 006ff11fd8cfd5406c6f4318f1bafa1542095f2a | /SLHCUpgradeSimulations/Geometry/python/fakeConditions_Phase1_cff.py | 105dcbf9971250dc22709c419f43bebd6ea7d0f6 | [] | permissive | https://github.com/amkalsi/cmssw | 8ac5f481c7d7263741b5015381473811c59ac3b1 | ad0f69098dfbe449ca0570fbcf6fcebd6acc1154 | refs/heads/CMSSW_7_4_X | 2021-01-19T16:18:22.857382 | 2016-08-09T16:40:50 | 2016-08-09T16:40:50 | 262,608,661 | 0 | 0 | Apache-2.0 | true | 2020-05-09T16:10:07 | 2020-05-09T16:10:07 | 2020-05-08T19:57:19 | 2020-05-09T14:58:01 | 1,118,070 | 0 | 0 | 0 | null | false | false | import FWCore.ParameterSet.Config as cms
siPixelFakeGainOfflineESSource = cms.ESSource("SiPixelFakeGainOfflineESSource",
file = cms.FileInPath('SLHCUpgradeSimulations/Geometry/data/PhaseI/EmptyPixelSkimmedGeometry_phase1.txt')
)
es_prefer_fake_gain = cms.ESPrefer("SiPixelFakeGainOfflineESSource","siPix... | UTF-8 | Python | false | false | 4,881 | py | 2,051 | fakeConditions_Phase1_cff.py | 1,842 | 0.774227 | 0.757222 | 0 | 89 | 53.842697 | 113 |
dkeefe3773/pong-rl | 15,582,141,366,338 | e3844b275290147c174b2ea4bc88e34c90d23451 | 541222c60bd307affe8bf54a1427f148f2e8d3a1 | /apps/game_render_test.py | 9e053c6b237b8414099c39ceb80546bde09da625 | [
"MIT"
] | permissive | https://github.com/dkeefe3773/pong-rl | e9b06bc1412b489ecb42d0ed2e3e5d612348f8cd | e0d548267d7e0ca1b8690224cfd827af8ff571ab | refs/heads/master | 2020-12-04T15:53:35.572060 | 2020-07-05T05:26:30 | 2020-07-05T05:26:30 | 231,824,795 | 0 | 0 | MIT | false | 2020-09-06T04:10:28 | 2020-01-04T20:35:37 | 2020-07-05T05:27:21 | 2020-09-06T04:08:31 | 146 | 0 | 0 | 1 | Python | false | false | import time
from gamerender.pongrenders import DefaultPongRenderer
from injections import providers
from proto_gen.gamemaster_pb2 import PlayerIdentifier, PaddleType
def test_game_render():
player_left_identifier = PlayerIdentifier(player_name="LEFT_PLAYER",
paddle_s... | UTF-8 | Python | false | false | 995 | py | 43 | game_render_test.py | 38 | 0.621106 | 0.61809 | 0 | 31 | 31.096774 | 88 |
asmirnov69/pybx | 17,016,660,443,549 | 0f190925d30a1873d02f85c299e96f2797ac76d9 | 732a541fd311256d1468e2ad50d8d11e27fe0a15 | /src/libpybx-py/codegen_cpp.py | 4cd01e20232ee5e6c3cb0e02aff98cfa7c5b502f | [] | no_license | https://github.com/asmirnov69/pybx | 1ff929824f059a95dbd7ca4a2fe3a59fd8eeed39 | e98db07297b26f0d477ef4f28894573f08c967a6 | refs/heads/master | 2023-02-20T17:58:13.844574 | 2021-01-14T03:56:11 | 2021-01-14T03:56:11 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import ipdb
import os.path
def generate_prolog(source_pybx_fn, out_fd):
macro_lock_s = os.path.basename(source_pybx_fn).split(".")[0].upper()
prolog_code = f"""// -*- c++ -*-
// generated code: source - {source_pybx_fn}
#ifndef __{macro_lock_s}_STUBS_HH__
#define __{macro_lock_s}_STUBS_HH__
#define TOKENPASTE... | UTF-8 | Python | false | false | 17,470 | py | 45 | codegen_cpp.py | 32 | 0.607155 | 0.606754 | 0 | 377 | 45.339523 | 164 |
Hansen-chen/python_demo_program | 6,124,623,367,373 | f78ed3d01a66ba28f40e64c5ced3fe2672c54a69 | bf6e9f82f990057de2e8c621d5818584688400e4 | /venv/main.py | f4f6046d81c1420ce3873a7850289a210ba98559 | [] | no_license | https://github.com/Hansen-chen/python_demo_program | 4475843b1019a96ca1703331c61766797766fd34 | d0cf12a2cbaea0fbb3860e8e915d2d0bf273fad1 | refs/heads/master | 2020-07-08T17:55:09.875184 | 2019-08-22T07:31:41 | 2019-08-22T07:31:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import datetime as dt
import matplotlib.pyplot as plt
data_datetime = []
data_candlestick = []
try:
f = open('HKEX.HSI.txt', 'r')
#data = f.read()
#print(data)
separator=" "
for line in f:
... | UTF-8 | Python | false | false | 1,176 | py | 1 | main.py | 1 | 0.57483 | 0.568878 | 0 | 41 | 27.170732 | 106 |
Pranjal290/Web-Cam-Motion-Detector | 712,964,584,445 | 748aa3f1a2207881b36606aac03ce9a423f55fc9 | b1ac6f26f7a235703eed1eaf15ad72b619cff451 | /video_capture.py | 08257898566ad4f792cd6136bf695d3ee9b30c84 | [] | no_license | https://github.com/Pranjal290/Web-Cam-Motion-Detector | 801dde1398e166f8af1b4e8c17004df9dab2aa40 | b22e331b82864c7d17ea614d77189ec2101c5909 | refs/heads/master | 2020-11-27T21:51:24.731563 | 2019-12-22T18:54:11 | 2019-12-22T18:54:11 | 229,615,225 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2,time,pandas
from datetime import datetime
first_frame=None
video=cv2.VideoCapture(0)
status_list=[None,None]
time=[]
df=pandas.DataFrame(columns=['Start','End']) #using panda dataframe to store date and time of motion.
while True:
check,frame=video.read()
status=0
grey=cv2.cvtColor(... | UTF-8 | Python | false | false | 2,076 | py | 3 | video_capture.py | 1 | 0.656069 | 0.627168 | 0 | 55 | 35.781818 | 129 |
abandonsea/msba_reid | 12,103,217,886,279 | 1459e19999eced757abe35aca1118546c8e59556 | 68f76af689d79d3e4a94354a4e644a878d8cfd40 | /engine/deprecated/v2/inference_save_res.py | cd2f824e553a79fdf65d5a684cb77b4b77ab87d6 | [] | no_license | https://github.com/abandonsea/msba_reid | b9d00660141f8e657ac090d1426d00a36d19fed9 | 831158247ed116e82a9ed285e25974abdfbf755b | refs/heads/master | 2023-07-15T20:01:15.274850 | 2020-01-07T02:28:09 | 2020-01-07T02:28:09 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # encoding: utf-8
"""
@author: liaoxingyu
@contact: sherlockliao01@gmail.com
"""
import logging
import torch
import numpy as np
import torch.nn.functional as F
from data.datasets.eval_reid import evaluate
from data.prefetcher import data_prefetcher
from utils.re_ranking import re_ranking
from utils.distance import lo... | UTF-8 | Python | false | false | 7,072 | py | 93 | inference_save_res.py | 89 | 0.585791 | 0.573454 | 0 | 210 | 32.580952 | 123 |
0AdityaD/competitive | 5,231,270,201,215 | a0de5dbc78d4888f9483265ed57136360ba28a7d | 7e2b5fa590b34bb589f97242b1e139219ab6c97b | /kattis/perfect_powers.py | aa2166e84902b4b0b927c4e09ef11a64d2eb43cb | [] | no_license | https://github.com/0AdityaD/competitive | a7195c8096fc443d2aa506910da472b8b0a21226 | 497345e0cdad058d57bb84dc96dfc1856eae5cbe | refs/heads/master | 2020-03-01T21:40:08.350769 | 2020-02-26T08:54:37 | 2020-02-26T08:54:37 | 83,923,869 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from collections import defaultdict
from random import randint
def gcd2(a, b):
a, b = max(a, b), min(a, b)
if b == 0:
return a
return gcd2(b, a % b)
def gcd(ls):
if len(ls) == 0:
return 1
ans = ls[0]
for elt in ls[1:]:
ans = gcd2(elt, ans)
return ans
def is_prim... | UTF-8 | Python | false | false | 1,291 | py | 773 | perfect_powers.py | 757 | 0.497289 | 0.4756 | 0 | 69 | 17.710145 | 37 |
yuyasugano/dynamodb-ohlcv-crypto | 13,357,348,303,150 | 6a7100eaa504f3af78074814e23425941039c281 | f3ac44c5c376a3f7e1b6d384c26916d4e9c43dde | /dynamodb-sam/resizer.py | f41f00cc69fc9ea3c2f369b10fa4d9419ea392a6 | [
"MIT"
] | permissive | https://github.com/yuyasugano/dynamodb-ohlcv-crypto | ddbfef21b220a65a923a3ea766c54ab0a4d07c7f | c7bef03bccb43baaf306c9d1f2a32c6fbccc57fa | refs/heads/master | 2022-12-01T04:17:02.025759 | 2020-08-12T02:27:03 | 2020-08-12T02:27:03 | 286,716,162 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import boto3
import datetime
region = os.environ.get('AWS_DEFAULT_REGION', 'ap-northeast-1')
dynamodb = boto3.client('dynamodb', region_name=region)
class DailyResize(object):
FIRST_DAY_RCU, FIRST_DAY_WCU = 3, 3
OLD_DAY_RCU, OLD_DAY_WCU = 1, 1
def __init__(self, table_prefix):
self.tab... | UTF-8 | Python | false | false | 3,276 | py | 7 | resizer.py | 4 | 0.539377 | 0.536325 | 0 | 94 | 33.840426 | 88 |
piohhmy/euler | 16,870,631,575,771 | 99b98d97fbd91616fb282d1e3d0891bb245f7c95 | 7af1b10e4389a4be5f2f22f3178fff2503280929 | /p022.py | 0861e4c3a41fafc703117affd664275c7bc87c1d | [
"MIT"
] | permissive | https://github.com/piohhmy/euler | 559f15fa9f7f5c644b65b43674646e0f520fd46e | f1b548a28a503fb8a0878fda75c32e1dcfb33243 | refs/heads/master | 2021-01-02T08:39:00.142314 | 2016-01-22T15:32:46 | 2016-01-22T15:32:46 | 11,699,388 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """ Using names.txt (right click and 'Save Link/Target As...'), a 46K text
file containing over five-thousand first names, begin by sorting it into
alphabetical order. Then working out the alphabetical value for each name,
multiply this value by its alphabetical position in the list to obtain a
name score.
For exampl... | UTF-8 | Python | false | false | 996 | py | 49 | p022.py | 48 | 0.680723 | 0.644578 | 0 | 29 | 33.37931 | 77 |
POFK/LensFinder | 876,173,363,298 | d1bfaaf055bf0bacc7960555267588a2eb2764d0 | bcb13b92bf0a1ec85f40c99e9ffa49654bd3a3a5 | /lens/eval.py | 9c9d1732120322d6eee74b0463f21bd45eeec20b | [
"MIT"
] | permissive | https://github.com/POFK/LensFinder | 81fc2c67366396240f6f6d4c2c3ba02fb74a8539 | 56a8cb3f99a68b5922e0a8c76e1cee27ef75a09e | refs/heads/master | 2020-06-10T15:53:42.381966 | 2019-08-23T03:20:16 | 2019-08-23T03:20:16 | 193,665,698 | 0 | 0 | MIT | false | 2019-08-22T04:11:29 | 2019-06-25T08:21:14 | 2019-08-21T10:11:49 | 2019-08-22T04:11:28 | 10,626 | 0 | 0 | 0 | Jupyter Notebook | false | false | #!/usr/bin/env python
# coding=utf-8
import os
import numpy as np
import torch
import h5py
import tqdm
import glob
from torch.utils.data import Dataset, DataLoader, ConcatDataset
from torchvision import transforms
from main import *
random_crop = args.crop_range
#name = 'area1_hdf5_2'
name = 'area2_hdf5'
model_path... | UTF-8 | Python | false | false | 4,088 | py | 26 | eval.py | 14 | 0.566781 | 0.554795 | 0 | 131 | 30.198473 | 77 |
psyvirgin/markpress | 12,807,592,504,550 | 8d46bd036473cae172d283e8f67f5de1d439217c | 141beebb8650263669d03f1cca1ca1e1c3d4bd64 | /lib/wordpress.py | 57e257324aafc06e34fa9afd363cfe2b34dde63b | [
"MIT"
] | permissive | https://github.com/psyvirgin/markpress | c3eddb8370e7e326e7d01d85f05aff84bcabdc07 | e5f12795b1e82e2223f33953cc9694690c96a959 | refs/heads/master | 2020-03-19T01:05:38.859194 | 2016-04-02T13:56:21 | 2016-04-02T13:56:21 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/python
#----------------------------------------------------------------------
#
# wordpress.py - wordpress
#
# NOTE:
# for more information, please see the readme file
#
#----------------------------------------------------------------------
import sys, time, os
import markdown3
import blogpost
#-------... | UTF-8 | Python | false | false | 10,294 | py | 3 | wordpress.py | 2 | 0.586847 | 0.582572 | 0.000583 | 362 | 27.428177 | 71 |
Frixoe/canadian-name-generator | 1,142,461,353,662 | 58e96b09f928ae70ab27c91ab52f0f78cee0c1ee | 6fb34a4996dd10d63abb92ca01a56126ecd73b61 | /main.py | b7b42e5519e30e443ef42966be76793dbc906c95 | [
"MIT"
] | permissive | https://github.com/Frixoe/canadian-name-generator | d2e70206fb2ebce4e359eaae1420fb7feff7ae03 | ee041639d4ea1209275a625b1f6ce6caf96bfa0f | refs/heads/master | 2021-06-05T13:49:26.442434 | 2018-09-11T11:13:34 | 2018-09-11T11:13:34 | 148,300,678 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
import numpy as np
import os
os.environ['KERAS_BACKEND'] = 'theano' # Using 'theano' backend for keras
import tensorflow as tf
import keras
from keras.models import Sequential, load_model
from keras.layers import Dense, LSTM, TimeDistributed, Activation
# Loading the data into a DataFrame
df = pd... | UTF-8 | Python | false | false | 3,148 | py | 4 | main.py | 1 | 0.650572 | 0.635006 | 0 | 121 | 25.016529 | 145 |
MuggleWei/useful_scripts | 7,430,293,468,260 | 53737d148a06aba8152ed65e262075762deb6c7a | dd6ee0d198b200606247a9f98a6036a0556758cf | /essential_sources/essential_sources.py | 9967818ddf96e30e860ce2c30d403684fcd3970d | [] | no_license | https://github.com/MuggleWei/useful_scripts | 03407709900c3a5f40bc87b44430a07cfc6484f8 | 8a9ffa8318254b04ac1e0fc57bf3646f229d094c | refs/heads/master | 2023-07-25T04:44:09.168942 | 2023-07-22T17:39:12 | 2023-07-22T17:39:12 | 80,839,002 | 4 | 1 | null | false | 2023-05-23T02:11:50 | 2017-02-03T15:00:14 | 2022-12-14T22:40:39 | 2023-05-23T02:11:49 | 194 | 4 | 1 | 2 | Vim Script | false | false | """ 下载必备代码库 """
import os
import subprocess
def run_subprocess(args):
"""
运行子进程并实时输出
:param args: 执行的命令
"""
with subprocess.Popen(args, stdout=subprocess.PIPE) as p:
try:
for line in p.stdout:
if not line:
break
print("{}".for... | UTF-8 | Python | false | false | 4,057 | py | 104 | essential_sources.py | 51 | 0.557827 | 0.554981 | 0 | 106 | 35.462264 | 75 |
ybdesire/pylearn | 12,756,052,903,444 | 3799b6d8c702a86451e2db0148370e6b36f7ebb3 | 90a1aa497ec53fa87bc31cd5101ad55adb22cddb | /exception/ex_print_error_line.py | 8dfedad23a2fd5208efc49bf1ee5ca929dd1a387 | [] | no_license | https://github.com/ybdesire/pylearn | 39821e3e5cb61c021afc7af2052e0de7077961e2 | 400e525c0529bea6da74aab9bc86fe5e26549d32 | refs/heads/master | 2023-02-04T02:08:44.352846 | 2023-01-28T09:28:34 | 2023-01-28T09:28:34 | 79,337,563 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
try:
x = 1+1
y = x/0
z = 2+2
except Exception as e:
s = sys.exc_info()
print('exception error msg : {0}'.format(s[1]))
print('exception on line: {0} '.format(s[2].tb_lineno)) | UTF-8 | Python | false | false | 223 | py | 228 | ex_print_error_line.py | 172 | 0.529148 | 0.488789 | 0 | 12 | 16.75 | 59 |
COLAB2/tagsim | 6,949,257,121,157 | 7ae49a43e3d16721de29163afe38e6daa68b5cd9 | 468f88552212e17cec428437d119b824e5660943 | /fieldComparisonMidca.py | 15fcdd3427847381884a2ef77eca5f01e3e5dff3 | [] | no_license | https://github.com/COLAB2/tagsim | c3efb6b4715163b53cfe3328880fd77ffc466722 | 9d4c040a7c842cb14c0075b423345db209e51958 | refs/heads/master | 2022-12-29T02:34:19.339669 | 2020-10-15T14:17:13 | 2020-10-15T14:17:13 | 281,707,413 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import time
import matplotlib.pyplot as plt
from gridworld import Grid
import gridworld
from AcousticTag import AcousticTag
from Agent import Agent
from AcousticReciever import AcousticReciever
import socket
import threading
import traceback
import sys
wp_list = None
allDetectionData... | UTF-8 | Python | false | false | 50,107 | py | 49 | fieldComparisonMidca.py | 23 | 0.475223 | 0.42968 | 0 | 1,334 | 35.555472 | 161 |
wtbarnes/tutorial-notebooks | 3,908,420,285,094 | 045fb49f2bdd37ee06fe9784377955c594e92578 | 6a58661ebe27bf45540c7f1d8d4554cb298e5a47 | /2021_HinodeIRIS/fit-eis-data.py | 6ba5cadb45d4ba65fe24ff5e7cc50b9ab0e4a7e3 | [
"MIT"
] | permissive | https://github.com/wtbarnes/tutorial-notebooks | 44da1cf9e4631fd5a579a670832c7ee2f6e86ad1 | 74e8a5305d7ccfe2cfb99c13efbff0391e910a62 | refs/heads/master | 2022-07-24T00:37:48.406325 | 2022-07-11T23:09:33 | 2022-07-11T23:09:33 | 155,681,308 | 0 | 0 | MIT | true | 2018-11-01T07:58:03 | 2018-11-01T07:58:03 | 2018-10-30T13:34:36 | 2018-10-30T13:34:34 | 949 | 0 | 0 | 0 | null | false | null | """
Download level 1 EIS HDF5 files for 2021-04-24 and then fit the
Fe XII 195.119 profile to produce level 3 FITS files
"""
import eispac
import eispac.net # This registers the EIS NRL client
from sunpy.net import Fido, attrs as a
if __name__ == '__main__':
# Download the level 1 data
q = Fido.search(
... | UTF-8 | Python | false | false | 1,140 | py | 9 | fit-eis-data.py | 2 | 0.628947 | 0.577193 | 0 | 33 | 33.575758 | 104 |
KoyamaLab/composition | 15,977,278,345,565 | d372ba0d003c92d4e4f0243be3eb99afb0a62c8b | 85eeb016eb23707af6efc5bb93c92c2f4f547af4 | /composition.py | a18614bfccc93a4e70c8660bd91e67e4e4f70059 | [] | no_license | https://github.com/KoyamaLab/composition | 1d502ebf217d54a6c3fe5dcd3f35c35ab4b074a5 | c836b453b784c613aa1d89518accb823917ec28a | refs/heads/master | 2020-04-06T06:11:48.536219 | 2016-11-14T12:55:01 | 2016-11-14T12:55:01 | 73,703,645 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Calculate composition of alloy
#
# arguments:
# argv[0] : dictionary, { 'element_name': element_composition, ... }
# argv[1] : float, alloy_weight [g]
import sys
from elements import ELEMENTS
def debug(arg):
print(arg)
mass = arg[1]
t = int(arg[2])
elms... | UTF-8 | Python | false | false | 953 | py | 2 | composition.py | 1 | 0.547492 | 0.533618 | 0 | 41 | 21.609756 | 68 |
sguttikon/openai-rosbot-env | 2,293,512,584,441 | c252fac22c38a2f1b3c69f9b58327ef06010c0fc | 2a6f9db66bea745ec6ad33ee59e1d557b07e27bf | /gazebo_models/indoor_layouts/src/layout_to_occpmap.py | 1865c4c7b85eaf0622320dc39db3b4a76d432478 | [
"Apache-2.0"
] | permissive | https://github.com/sguttikon/openai-rosbot-env | bd958b6614e5a4ffa3f69caba18b2b4d97d3b662 | e34a5843c8218ae733ee4e0d3ccecdf13ccafd87 | refs/heads/master | 2022-12-30T21:09:00.861597 | 2020-10-23T19:35:41 | 2020-10-23T19:35:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
import argparse
import numpy as np
import cv2 as cv
def get_occupany_map(img: np.ndarray, output_path: str, output_size: tuple):
"""
Convert the HouseExpo indoor layout to occupancy map
Parameters
----------
img: numpy.ndarray
input image
output_path: str
... | UTF-8 | Python | false | false | 2,317 | py | 18 | layout_to_occpmap.py | 12 | 0.657315 | 0.634873 | 0 | 56 | 40.375 | 106 |
bdnaeem3/pyBlog | 14,087,492,763,613 | 67564593f5c8a173243e41096114273d8aa3cdb5 | c7b7667f3ac846de17a27ce85cd99bc085bec74b | /blog/serializer.py | ea6eec9edbe13d81a7f7f29ba9ebe8c008253d49 | [] | no_license | https://github.com/bdnaeem3/pyBlog | d603de30ea6a828ff4a8ba137b44bd6e63e06715 | a15fb3b04d45faebaa3b040966851e34ff1a513b | refs/heads/master | 2022-12-01T18:27:34.270006 | 2019-11-26T06:58:24 | 2019-11-26T06:58:24 | 149,322,044 | 0 | 0 | null | false | 2022-11-22T00:23:00 | 2018-09-18T16:51:15 | 2019-11-26T06:58:33 | 2022-11-22T00:22:57 | 1,196 | 0 | 0 | 3 | Python | false | false | from rest_framework import serializers
from . import models
class PostSerializer(serializers.ModelSerializer):
class Meta:
model = models.Post
fields = ('id', 'title', 'content', 'date_created', 'author')
extra_kwargs = {
'author': {
'read_only': True
... | UTF-8 | Python | false | false | 336 | py | 9 | serializer.py | 4 | 0.550595 | 0.550595 | 0 | 16 | 20.0625 | 69 |
patrickxrivera/python-flask-rest-api | 7,103,875,952,486 | 757a63de5c831b7b9c26d740c68c1d14ea05ff8b | 9951b6539b96a9505f47294f46d17be2b74cf313 | /section3/src/app.py | d99adcd0472342f3e909f773006e4158611b8303 | [] | no_license | https://github.com/patrickxrivera/python-flask-rest-api | 7421c354ab3a49443de62254cc4261ac7ba3bdf0 | 0d9fef6fe402502f699f0a3b834e7b0f758067c9 | refs/heads/master | 2021-09-20T20:02:17.511575 | 2018-08-15T04:48:33 | 2018-08-15T04:48:33 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Flask, jsonify, request
app = Flask(__name__)
stores = [
{
'name': 'Complete Life Optimization',
'items': [
{
'name': 'Bulletproof Coffe',
'price': 20.99
}
]
}
]
@app.route('/store', methods=['POST'])
def create... | UTF-8 | Python | false | false | 1,672 | py | 5 | app.py | 2 | 0.56878 | 0.563995 | 0 | 61 | 26.409836 | 119 |
Dawitworku/Python-stack | 10,024,453,679,351 | 5df4894875d219eb9593c280bf246e627fc8f99f | f0520714c2a49bd89c131446d947677fe5a5df5f | /_python/OOP/MathDojo/Math_Dojo.py | cb0d82595b3e6c60f02aa0ae34df048d034c3ab4 | [] | no_license | https://github.com/Dawitworku/Python-stack | 38c12f70279c3c913f5eefd47b9954939de2690b | 198645fa4eef948895be238828b2ce998a37ed03 | refs/heads/master | 2023-01-08T13:59:54.712454 | 2020-11-06T02:24:39 | 2020-11-06T02:24:39 | 292,392,381 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class MathDojo:
def __init__(self):
self.result = 0
def add(self, num, *nums):
splat = 0
for i in nums:
splat += i
self.result += num + splat
return self
def subtract(self, num, *nums):
splatvar = 0
for i in nums:
splatv... | UTF-8 | Python | false | false | 696 | py | 104 | Math_Dojo.py | 60 | 0.525862 | 0.471264 | 0 | 40 | 16.325 | 54 |
jaw566/RosConnect | 7,834,020,349,065 | b1bbab597b30ad31fbd8e1fa64e4cfda7e37aabc | 6d9a30a1eb771057aa95b882fffe40a6aadf0264 | /App/init_desktop_file.py | 6f48dedde331857a9cbaee86fea8a379afe81b6b | [] | no_license | https://github.com/jaw566/RosConnect | 28c1fa76c6aa97ca585bbd2e0da3d0bdb747a332 | 50a5a803c4c3db2435b5a7926066dfb25228a9ff | refs/heads/master | 2022-06-19T06:55:47.175624 | 2020-05-07T05:14:43 | 2020-05-07T05:14:43 | 210,413,435 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
import os
def main():
HOME = os.environ['HOME']
with open(HOME+'/Desktop/RosConnect.desktop','r') as file:
data = file.readlines()
data[4] = "Icon="+HOME+"/logo.png\n"
with open(HOME+'/Desktop/RosConnect.desktop','w') as file:
file.writelines(data)
if __... | UTF-8 | Python | false | false | 359 | py | 35 | init_desktop_file.py | 27 | 0.568245 | 0.562674 | 0 | 19 | 17.631579 | 62 |
DarkLii/Hogwarts-16 | 10,136,122,855,984 | 59a31af389448e0849fd529dc3d0a3f4a2e60408 | b9f6d0c29da869e844ae88132aecd9d10072241b | /pytest_allure/data_base/redis/redis_op.py | 81c96b9dfaf081710b2300621787f8b6dadc73e7 | [] | no_license | https://github.com/DarkLii/Hogwarts-16 | 63b10ff3ace397b7b95731d2882bfb97f6e537c9 | d0de06281afad023b1bc94221c8117bf111c9479 | refs/heads/master | 2023-04-03T07:52:00.551910 | 2021-04-10T14:01:36 | 2021-04-10T14:01:36 | 319,946,774 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding:utf-8 -*-
# @Author: DarkLi
# @Time : 2020/8/28
# @Desc : redis 操作封装
import json
from redis import StrictRedis, ConnectionPool
from pytest_allure.utiles.decorator import log_wrapper
class RedisOp:
def __init__(self, obj, data_base_config):
# if hasattr(obj, "Log") and obj.Log.get("outp... | UTF-8 | Python | false | false | 5,406 | py | 47 | redis_op.py | 42 | 0.524333 | 0.516287 | 0 | 217 | 22.483871 | 102 |
wyu0hop/check_APPPacker | 9,199,819,983,928 | 2e697d3db308ab8049ea2f4157a6a94acae88db5 | 1d917be085435f66658b86cf9b9b285ecb0a1e56 | /check_APPPacker.py | 2b27a5ab4991963a9e9c404f71a98a86ab0648e9 | [] | no_license | https://github.com/wyu0hop/check_APPPacker | 0c37dfcf02ad36f6a394de351f9b35e00b8096bd | 16d25c0d49d600f16d4e7ddb32a4d02095d51c92 | refs/heads/master | 2022-03-27T14:08:34.663686 | 2019-12-03T06:04:54 | 2019-12-03T06:04:54 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import zipfile
import sys
#@Time :2019.12.3
#@Author :zengxin
packer_dict={
"libchaosvmp.so":"使用了娜迦进行加固",
"libddog.so":"使用了娜迦进行加固",
"libfdog.so":"使用了娜迦进行加固",
"libedog.so":"使用了娜迦企业版进行加固",
"libexec.so":"使用了爱加密加固(可能性大)或腾讯进行加固",
"libexecmain.so":"使用了爱加密进行加固",
"ijiami.dat":"使用了爱加密进行加固",
"ijiami.ajm":"使用了爱加密企业版... | UTF-8 | Python | false | false | 5,453 | py | 2 | check_APPPacker.py | 1 | 0.710786 | 0.697832 | 0 | 119 | 28.840336 | 59 |
retresco/pcrf | 9,603,546,900,695 | ef1f88edce6806df32090cc4dae6ea35b065eb27 | 185380ede44d0227563d2a5d8aff26228ec0b5ff | /python-wrapper/pcrf-apply-demo.py | 30920937a0f592de90ca6ec5bce53f8c4da8bfa6 | [
"MIT"
] | permissive | https://github.com/retresco/pcrf | b4086b66aba88c704530e82e9a49a202514875a5 | 329982ade6a5a785d5fc7b76933557aed81d2206 | refs/heads/master | 2021-01-10T05:09:29.491082 | 2016-02-16T16:48:21 | 2016-02-16T16:48:21 | 36,813,622 | 3 | 3 | null | false | 2015-07-30T09:18:26 | 2015-06-03T15:43:18 | 2015-06-13T12:10:43 | 2015-07-30T07:43:35 | 348 | 2 | 3 | 0 | C++ | null | null | import pcrf_python
import json
# Load config file
config = pcrf_python.CRFConfiguration("../demo/chunk.cfg")
config.set_running_text_input(True)
# Load model
model = pcrf_python.SimpleLinearCRFFirstOrderModel("../demo/chunker.model")
# Construct applier on the basis of the CRF model and the configuration
crf_applie... | UTF-8 | Python | false | false | 852 | py | 45 | pcrf-apply-demo.py | 33 | 0.765258 | 0.761737 | 0 | 27 | 30.481481 | 99 |
temirxan011/balton | 14,585,708,976,271 | 45b6415a443fd2292b54d1a05579d951725ec25d | 6222dc42f191f2417eb89dbe4fb3470928aba875 | /Iearn_dict.py | 3ac1d90fa5c3ee04d02c875cbdfda68c551569ac | [] | no_license | https://github.com/temirxan011/balton | 1a9c3133af1ec0f069d49d825fa2dc813539b0b3 | 97a5e18f11f9c2e8555b6e15e34752252abdf44a | refs/heads/main | 2023-08-11T12:54:47.975893 | 2021-10-11T05:49:43 | 2021-10-11T05:49:43 | 415,652,568 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
def learn_dict():
os.system('CLS')
statistics_right = statistics_wrong = 0 # переменные для введения статистики
# вывод всех словарей
dict_list = os.listdir(path='./dict')
print('\nСПИСОК ДОСТУПНЫХ СЛОВАРЕЙ')
for i in dict_list:
print('| ' + i, end=' ')
# запись данных ... | UTF-8 | Python | false | false | 1,357 | py | 4 | Iearn_dict.py | 3 | 0.509317 | 0.501331 | 0 | 29 | 37.896552 | 127 |
frolkin28/alg_lab2 | 4,999,341,938,638 | ebb601483af7334391597cea372f39559d431e6e | 502edb2d07a4c8ab43623819518a47e0b8c9d352 | /alg2.py | d4a10a22ab6fc08e40f267d3597f2b691ecaf7a0 | [] | no_license | https://github.com/frolkin28/alg_lab2 | cc9d470d22c3449063499937eaa67bc41110333a | 1f9faa210826045f04090acf3dd520641002a9ab | refs/heads/master | 2021-01-05T21:48:12.877709 | 2020-02-18T19:15:45 | 2020-02-18T19:15:45 | 241,146,368 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | def selection_sort(array):
i, size = 0, len(array)
comps, swaps = 0, 0
while i < size:
min_i, j = i, i + 1
while j < size:
comps += 1
if array[j] < array[min_i]:
min_i = j
j += 1
swaps += 1
array[i], array[min_i] = array[mi... | UTF-8 | Python | false | false | 1,702 | py | 4 | alg2.py | 2 | 0.500588 | 0.482374 | 0 | 66 | 24.787879 | 68 |
uservipin/python | 11,012,296,159,913 | b35ddf463357dbae37de88ee00b8184fe6bf71de | 8370a2408372fd7b828a58cac149e690bd409308 | /Classe_modules_practise/Create_Time_class.py | 2c89816f311b900506aa04343789a5b3d0d7c8e1 | [] | no_license | https://github.com/uservipin/python | a0f7176817cfabbc75d7f4999efd6d4667455c19 | 6f7e99038e262558c395ccbdbbb26175bf55e8b7 | refs/heads/main | 2023-01-06T21:12:49.604069 | 2022-12-28T18:02:42 | 2022-12-28T18:02:42 | 93,314,161 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Create a Time class and initialize it with hours and minutes.
# 1. Make a method addTime which should take two time object and add them.
# E.g.- # (2 hour and 50 min)+(1 hr and 20 min) is (4 hr and 10 min)
# 2. Make a method displayTime which should print the time.
# 3. Make a method DisplayMinute which should displa... | UTF-8 | Python | false | false | 1,467 | py | 90 | Create_Time_class.py | 34 | 0.596455 | 0.558964 | 0 | 37 | 38.540541 | 92 |
ywcmaike/pcdnet | 6,597,069,794,803 | 747f50b319131a8463585fd26de4efac48e97337 | 7c9b4c05573c197b2b28748ecdde76d27cf62c03 | /model/point_model.py | d726a1ad9eff515ac85262ad58aeb6b314855abe | [] | no_license | https://github.com/ywcmaike/pcdnet | c196f45bbd0a79385c6743bf06411743d2d9a9d7 | 04330bec176cf2ea594542bb6005559bc8f77a7d | refs/heads/master | 2022-03-23T01:16:20.385042 | 2020-01-05T13:34:37 | 2020-01-05T13:34:37 | 231,919,582 | 9 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from .layer.project import GraphProject, GraphProjectU
def maxpool(x, dim=-1, keepdim=False):
out, _ = x.max(dim=dim, keepdim=keepdim)
return out
class ResnetBlockFC(nn.Module):
def __init__(self, size_in, size_out=None, size_h=None):
... | UTF-8 | Python | false | false | 3,132 | py | 22 | point_model.py | 18 | 0.57567 | 0.563218 | 0 | 102 | 29.715686 | 71 |
sohaibullah4d/Practice-Problems | 4,028,679,325,922 | 56609fe16f6286f077669192ef501f1bdc96c4ed | 68601a11f81f414bada398cc38fac197326babc6 | /3.2(a).py | 5b29f42805c266180beb94e13cbd0b19e0753e4a | [] | no_license | https://github.com/sohaibullah4d/Practice-Problems | cffec945e08d4baa93a454a0aab90aee13144f72 | 7ba4dd30b1381bbbd2969efe3205bd48bfc55d56 | refs/heads/master | 2020-04-07T15:55:56.243411 | 2018-11-21T07:37:28 | 2018-11-21T07:37:28 | 158,507,677 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | print("MUHAMMAD SOHAIB - 18B-054-CS - section A")
print("\t\t\t PRACTICE PROBLEM 3.2(a)")
age = int(input("Enter ypur age:"))
if age > 62:
print("You can get your pension benefits")
else:
print("Sorry")
| UTF-8 | Python | false | false | 222 | py | 15 | 3.2(a).py | 15 | 0.621622 | 0.581081 | 0 | 9 | 22.666667 | 49 |
acarter881/exercismExercises | 2,078,764,194,163 | 528cc46052df112413b0774f8a7a721d45d72d11 | df2c7670a30d24cb53a0e3e4177f3cdfd381a5a0 | /acronym/acronym.py | 19bae512e68a6d518f4a0d925be055d315920aaa | [] | no_license | https://github.com/acarter881/exercismExercises | d25a40de570db47edb95334c4c324f0707bedf50 | 3fe82d93ed89316630fe1819f60b075fc77f327e | refs/heads/main | 2023-07-26T02:21:22.701555 | 2021-09-05T21:32:22 | 2021-09-05T21:32:22 | 376,628,449 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import re
acroRegEx = re.compile("([A-Za-z])[A-Za-z']*")
def abbreviate(words):
return ''.join(re.findall(acroRegEx, words)).upper()
print(abbreviate('Complementary metal-oxide semiconductor')) | UTF-8 | Python | false | false | 200 | py | 59 | acronym.py | 55 | 0.705 | 0.705 | 0 | 8 | 24.125 | 60 |
zhangpeng0v0/Python_learning_notes | 1,924,145,385,275 | 1ea9de413d6b05732fd981de8c56f58003aa8c2b | 05ad79e3698bb484a7c0272a15610d3da955a5f3 | /Python_learning_notes/code/函数/函数和过程.py | c8dea7185ae0f5391559a20b193c2610106e33b3 | [] | no_license | https://github.com/zhangpeng0v0/Python_learning_notes | 5bcd3292f5d770c8cc2e895433698a7aa372ef42 | 8f2dc18bb13a07ec92c489d28afd66da1186bea9 | refs/heads/master | 2022-01-22T18:29:44.391295 | 2019-06-13T05:59:59 | 2019-06-13T05:59:59 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # def fun():
# return None
#
# fun()
#
# def fun():
# print('hello world')
#
#
# print('hello world') | UTF-8 | Python | false | false | 109 | py | 73 | 函数和过程.py | 42 | 0.504587 | 0.504587 | 0 | 10 | 10 | 26 |
guru-aot/ccpractice | 326,417,557,314 | 2e29d40ab39f0f4dec0980ef5d7e45b33c03c3f7 | 371a10da1ed0c978cb285fbe303ae493d79da1a7 | /backend/tests/test_api.py | 9880f34d9036890de11405c4af73008a41b4a503 | [] | no_license | https://github.com/guru-aot/ccpractice | 634940a8abf2455fe18fb4a0d151bcf614210046 | cdcc98ce6550d80767f392dfbe83f946e1effa4d | refs/heads/main | 2023-03-30T16:53:21.428265 | 2021-03-26T03:59:52 | 2021-03-26T03:59:52 | 351,512,799 | 0 | 0 | null | true | 2021-03-25T16:59:36 | 2021-03-25T16:59:35 | 2021-03-24T22:05:49 | 2021-03-24T22:30:19 | 2,193 | 0 | 0 | 0 | null | false | false | import uuid
TEST_JWT_HEADER = {
"alg": "RS256",
"typ": "JWT",
"kid": "foiclientapp"
}
TEST_JWT_CLAIMS = {
"iss": "https://iam.aot-technologies.com/auth/realms/foirealm",
"sub": "3559e79c-7115-41c1-bb26-1a3dc54bbf5e",
"aud": ["foiclientapp"],
"firstname": "Test",
"lastname": "User",
... | UTF-8 | Python | false | false | 3,074 | py | 77 | test_api.py | 49 | 0.660052 | 0.643461 | 0 | 93 | 32.053763 | 106 |
sbtries/class_pandaaaa | 17,351,667,878,018 | f5c3fd97d7f95c0e0d0d87fcee6ea08044227568 | aef69557d8960205a780e61b7c2dfbb1d7733449 | /Code/Theo/django/todo/todo_app/migrations/0002_alter_todoitem_completed_date.py | bf109484aae1281150831d0a101170f157275702 | [] | no_license | https://github.com/sbtries/class_pandaaaa | 579d6be89a511bdc36b0ce8c95545b9b704a734a | bbf9c419a00879118a55c2c19e5b46b08af806bc | refs/heads/master | 2023-07-18T14:18:25.881333 | 2021-09-02T22:48:29 | 2021-09-02T22:48:29 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.2.5 on 2021-07-29 21:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('todo_app', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='todoitem',
name='completed_date',
... | UTF-8 | Python | false | false | 386 | py | 562 | 0002_alter_todoitem_completed_date.py | 347 | 0.588083 | 0.53886 | 0 | 18 | 20.444444 | 50 |
tori46/DeDiv | 15,693,810,545,881 | 676fe7f9ffb4f8e85e9d381e6817e26f45c9c8f9 | e75324ac6a13d5176feb62dcb6310035bae16f4b | /filter_top_scores.py | f1c0823386d01aa15cb578a8257fadf1d3990d86 | [] | no_license | https://github.com/tori46/DeDiv | f393d6fea1aca446b51d9a2ff34d9c484953c164 | 27c9cc4c06e512594ab9ac6c1b6853762a137729 | refs/heads/master | 2023-03-22T14:15:25.388100 | 2021-03-15T17:06:34 | 2021-03-15T17:06:34 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Filter the candidate outputs to the ones with highest likelihood score."""
import glob
import json
import csv
import editdistance
import nltk
from bert_serving.client import BertClient
from mosestokenizer import MosesDetokenizer
from sklearn.cluster import KMeans
import collections
import configargparse
import num... | UTF-8 | Python | false | false | 2,746 | py | 106 | filter_top_scores.py | 11 | 0.65732 | 0.655499 | 0 | 85 | 31.305882 | 93 |
vgmoose/Splite | 8,031,588,890,991 | e8cfd4b8b9c262c688e42350b69ccc20a5cada21 | 3c2fc3e906b1836a4c28458cf97aca2882b5f40e | /splite.py | 29573e4c53bb78ec9c8dc3716285b09e63cae5e9 | [] | no_license | https://github.com/vgmoose/Splite | 0c1eaa225674c519efa731261faf722637009038 | 78596bd3def2081fe934b3bb7f6a17bb57226c6b | refs/heads/master | 2021-01-10T02:00:16.504011 | 2016-01-19T07:04:31 | 2016-01-19T07:04:31 | 49,922,385 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
import sys
import os
print ".--=============--=============--."
print "| Welcome to Splite! |"
print ".--=============--=============--."
yeswords = ["yes", "y", "ya", "ok", "okay"]
try:
from PIL import Image
except:
ans = raw_input("The Python Image Library is required to continue. I... | UTF-8 | Python | false | false | 4,015 | py | 1 | splite.py | 1 | 0.539726 | 0.532254 | 0 | 153 | 25.24183 | 239 |
Vivenkko/Python | 11,605,001,648,730 | f70d26240212a2abf8b5c12f543496c6aa280ce9 | f613067c07773785551f1daecb1ae4727cda83a3 | /Ejercicios/Ticket de Compra/ticket.py | b12c2210716a5ca282b1daa579e605f7746a51ec | [] | no_license | https://github.com/Vivenkko/Python | e37510ea66d07fcfbfdd9ced63dc351aad40e535 | 0a908ab389875480b23b30e68ff353fbe6a377c7 | refs/heads/master | 2021-05-07T18:37:17.014265 | 2018-02-20T12:42:18 | 2018-02-20T12:42:18 | 108,816,674 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import producto
import alimentacion
import electronica
import ropa
listaProductos = [
alimentacion('ES-SE-22314','cebolla',0.14,'11/11/2017'),
alimentacion('ES-JA-23623','botella de vino',11.55,'01/01/2038'),
alimentacion('ES-CO-12352','chuleta de cerdo',0.90,'10/11/2017'),
alim... | UTF-8 | Python | false | false | 1,072 | py | 20 | ticket.py | 20 | 0.655108 | 0.477976 | 0 | 25 | 41.68 | 74 |
KaioAntonio/CPTBot | 6,768,868,498,737 | f1c5be6fe2d29fc0932da2f0c2bb368834a1968d | 65296a1e4dbcb71011268ea6d0a926046073cf4e | /main.py | cf8c24accd77865dd65a9e1a62738174e4aaa42c | [] | no_license | https://github.com/KaioAntonio/CPTBot | d37c0b74e926ed0d92246dd46baa928395d4b53d | 76515429ea4d52184e2408d2af94b80dd83d4b86 | refs/heads/master | 2023-08-24T19:47:19.944413 | 2021-10-17T03:02:54 | 2021-10-17T03:02:54 | 417,991,973 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import discord
client = discord.Client()
@client.event
async def on_ready():
print("O BOT ESTÁ ONLINE")
@client.event
async def on_message(message):
content = message.content.lower()
channel = message.channel
author = message.author.name
mention = message.author.mention
if(author == "CPTbot"... | UTF-8 | Python | false | false | 938 | py | 2 | main.py | 1 | 0.645857 | 0.631101 | 0 | 31 | 27.322581 | 73 |
duraes-antonio/ResolveAE | 6,124,623,406,390 | 396983d799dae77c90cb863d191d9cb9c7396a31 | 81ac288bce5543a1760069644f89669334de1456 | /Persistencia/Scripts/micro_dao/estado.py | 812b61fd23a94364e70063fabe857cf2c497157b | [] | no_license | https://github.com/duraes-antonio/ResolveAE | 52bdcc77785ca9789614488eae0e6ae2dbd04d55 | a256346dedfcdcd972a3177c4a07896fbe4eb802 | refs/heads/master | 2020-03-26T20:44:02.577208 | 2018-12-05T23:32:41 | 2018-12-05T23:32:41 | 145,342,257 | 0 | 0 | null | false | 2018-12-02T19:42:30 | 2018-08-19T22:34:42 | 2018-12-02T13:17:52 | 2018-12-02T19:42:29 | 78,929 | 0 | 0 | 0 | Java | false | null | from micro_dao.objeto_modelo import ObjetoModelo
class Estado(ObjetoModelo):
_id: int
_nome: str
_sigla: str
def __init__(self, nome_estado: str, sigla: str):
self._id = 1
self.set_nome(nome_estado)
self.set_sigla(sigla)
def get_id(self) -> int:
return self._id
... | UTF-8 | Python | false | false | 691 | py | 178 | estado.py | 153 | 0.564399 | 0.562952 | 0 | 33 | 19.969697 | 53 |
pracedru/PracedruDesign | 481,036,357,434 | d256727c26decbeef8a5b3564100a11f544ffbf5 | f3e2ac6d8b1a119233a453d3e96207cdb1b12cd6 | /GUI/Models/MarginsModel.py | 383b3488204a1c66beb20a743c92c41eb80d18dd | [
"BSD-3-Clause"
] | permissive | https://github.com/pracedru/PracedruDesign | 017071f75ee3aabe5832828f3f4d095ee7488841 | e6e313ee3efb377a8e393e5276eb9daa172e1c58 | refs/heads/master | 2021-01-20T00:10:36.038890 | 2019-03-11T09:21:55 | 2019-03-11T09:21:55 | 89,090,104 | 4 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from PyQt5.QtCore import *
from Business import *
__author__ = 'mamj'
col_header = ["Margin Name"]
class MarginsModel(QAbstractTableModel):
def __init__(self, doc):
QAbstractItemModel.__init__(self)
self._margins = doc.get_margins()
self._doc = doc
self._margins.add_change_handler(self.on_margins_changed)
... | UTF-8 | Python | false | false | 1,990 | py | 118 | MarginsModel.py | 106 | 0.68995 | 0.687437 | 0 | 76 | 25.184211 | 77 |
aman589/2018-ctfs-chall-and-sol | 9,500,467,666,023 | bb9cd0a3fd44d6552bfd7c6609fab13abe726483 | 00691c1f887c2dc2f85d90440368e596e32b307a | /csaw18/shellcode/sol.py | f386e9cba7b0e3ca38b61e75ce95eff536f5c89d | [] | no_license | https://github.com/aman589/2018-ctfs-chall-and-sol | d11cad09447dc55062747d667b5f1393faa65bcf | 888d79243155085523899267c594028fb4208b34 | refs/heads/master | 2020-08-09T22:30:21.067835 | 2019-10-10T13:52:55 | 2019-10-10T13:52:55 | 214,190,696 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from pwn import *
import codecs
#p = process('./shellpointcode')
elf = ELF('./shellpointcode')
offset = 11
# shellcode2 = "\x48\x31\xd2\x48\xbb\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1"
# shellcode1 = "\xeb\x08\x53\x48\x89\xe7\x50\x57\x48\x89\xe6\xb0\x3b\x0f\x05"
shellcode1 = "\x48\xf7\xdb\x53\x54\x5f\x99\x52\x57\x54... | UTF-8 | Python | false | false | 723 | py | 260 | sol.py | 176 | 0.695712 | 0.550484 | 0.081604 | 28 | 24.785714 | 77 |
fmpr/edward | 17,265,768,565,315 | 5aea2d1bc8f8bc4de2268d053a0a05d6fb2ba880 | c292eda0a47d00d5a6a63b401fe52fe48adc3778 | /examples/bayesian_linear_regression.py | 124ed9546ce739c8c2e4b50314e8b56a7d09db31 | [
"Apache-2.0"
] | permissive | https://github.com/fmpr/edward | 6a30636ffb1e903a975b2a60065bf863a565a3cd | dc8869fa96a3294ae0bc6223ff6b613218e105ef | refs/heads/master | 2021-01-17T20:12:58.270383 | 2016-08-05T20:04:09 | 2016-08-05T20:05:59 | 65,051,346 | 1 | 0 | null | true | 2016-08-05T21:52:31 | 2016-08-05T21:52:31 | 2016-08-05T05:50:19 | 2016-08-05T20:08:10 | 18,971 | 0 | 0 | 0 | null | null | null | #!/usr/bin/env python
"""
Bayesian linear regression using mean-field variational inference.
Probability model:
Bayesian linear model
Prior: Normal
Likelihood: Normal
Variational model
Likelihood: Mean-field Normal
"""
from __future__ import absolute_import
from __future__ import division
from __future... | UTF-8 | Python | false | false | 2,407 | py | 60 | bayesian_linear_regression.py | 53 | 0.619028 | 0.599501 | 0 | 79 | 29.468354 | 80 |
HanchengZhao/Leetcode-exercise | 18,056,042,523,560 | eb3e22ddcb708db656a75dd0dd61aac3f5cac897 | 4c20c78cf383cd40db8e3d3eee88e5f96884a1af | /486. Predict the Winner/486.predict-the-winner.py | c2ba4d9bf9f3b17a5dbe8322c3a5b8536bec658f | [] | no_license | https://github.com/HanchengZhao/Leetcode-exercise | de6c17a2c965fe0c3afc0a4c39fc0a5f8bbe8d47 | 6c780a97c956856ac94a5d0bb4c9b631e7a0677a | refs/heads/master | 2021-05-04T10:09:29.308858 | 2019-10-17T05:31:20 | 2019-10-17T05:31:20 | 50,731,817 | 7 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #
# @lc app=leetcode id=486 lang=python3
#
# [486] Predict the Winner
#
class Solution:
def PredictTheWinner(self, nums) -> bool:
n = len(nums)
memo = [[0 for _ in range(n)] for _ in range(n)]
prefix = [0 for _ in range(n+1)]
for i in range(n):
prefix[i+1] = nums[i] + p... | UTF-8 | Python | false | false | 1,259 | py | 611 | 486.predict-the-winner.py | 608 | 0.461477 | 0.440826 | 0 | 42 | 28.97619 | 86 |
LuaDist/xlsxwriter | 2,224,793,062,732 | 00ceca90e0eb4b32fbcd3d847d50cb163a1475be | a2966ab1f86668ecf3378bbe934af8fa553e83fc | /test/comparison/test_hyperlinks.py | 25253e30f956d2b65cae12f7459b96c14097ee8e | [
"MIT"
] | permissive | https://github.com/LuaDist/xlsxwriter | b332f745cf4258d77c2efcad62a2949c4f00cb9d | 21542b5d672f97ae69e0d36164bd7f67b1c532cd | refs/heads/master | 2023-06-04T14:32:08.206327 | 2014-11-01T11:16:38 | 2014-11-01T11:16:38 | 18,325,666 | 2 | 1 | null | true | 2014-11-01T11:16:39 | 2014-04-01T10:25:48 | 2014-10-08T12:12:12 | 2014-11-01T11:16:38 | 7,447 | 1 | 0 | 0 | Lua | null | null | ###############################################################################
#
# Test cases for xlsxwriter.lua.
#
# Copyright (c), 2014, John McNamara, jmcnamara@cpan.org
#
import base_test_class
class TestCompareXLSXFiles(base_test_class.XLSXBaseTest):
"""
Test file created with xlsxwriter.lua against a f... | UTF-8 | Python | false | false | 2,069 | py | 152 | test_hyperlinks.py | 16 | 0.630256 | 0.589657 | 0 | 77 | 25.87013 | 101 |
seijiotsu/pavsca | 10,591,389,397,186 | f534818dd6979596c94baba3e249d4c828c03cc3 | f3a428006f21af3eb19d30620e9aaa3df241be10 | /pavsca/phonology/word.py | 28607d2425f704358c67aaaf690c2135918f8e14 | [
"MIT"
] | permissive | https://github.com/seijiotsu/pavsca | 7faf4ad7ad9dc37d332f76821825cd8238bd385a | f29cf99c4e360fb38037a66cb46b8959df4b06d4 | refs/heads/main | 2023-08-14T18:22:37.262118 | 2021-10-12T18:05:30 | 2021-10-12T18:05:30 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from typing import List
from enum import Enum
class Stress(Enum):
Stressed = 0
Unstressed = 1
Any = 2
class Word:
def __init__(self, word: str):
"""
Takes a string such as "ak.mak" as input, and parses it
into a Word.
Currently handles the following phonemes:
-... | UTF-8 | Python | false | false | 2,160 | py | 7 | word.py | 4 | 0.526438 | 0.5218 | 0 | 65 | 32.184615 | 92 |
minhle92/rage | 13,726,715,495,452 | 3e474251c4deae33f223f8b0156ac152db1681d0 | 6669ef2c1d54095799d69d3c4417d4ad79cd6c2c | /pathhelp.py | bdcc3f28d0200bb9a305382b066d6811111a230c | [] | no_license | https://github.com/minhle92/rage | 8fdd076986ddb4883be831fd5b58dbc1743a177a | ffbe8d62ac67c43646004f80d9e223d6405d2ed8 | refs/heads/master | 2020-06-04T21:59:49.374263 | 2014-05-20T01:06:40 | 2014-05-20T01:06:40 | 19,923,836 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import subprocess
import sys
def pathhelp():
path = []
s = raw_input('Please input full path for where you put our folder:')
if s[-1] !="/":
s = s+"/"
path0 = "export PATH=$PATH:/"
path1 = ["tools/cutadapt-1.4.2/bin","tools/glimmer3.02/bin","tools/cufflinks-2.2.0.Linux_x86_64 2","tools/cem/... | UTF-8 | Python | false | false | 734 | py | 8 | pathhelp.py | 7 | 0.576294 | 0.538147 | 0 | 22 | 32.363636 | 164 |
linuxmint/mint-common | 12,816,182,442,261 | da0120f68ad79d0ccdf16058a605fb0ebbd329a1 | b40c7cf7ca3b1d8327a19bfa47b3a19c0632bc87 | /usr/lib/python3/dist-packages/mintcommon/additionalfiles.py | 8ab213a7db2b78f837f82e06501fd7d575471ec5 | [] | no_license | https://github.com/linuxmint/mint-common | 3cc0251f706d75eb58a5be48f25486ac1162ec5a | c1620d4b57a201abe0679b4a8cbc36e59c3d8728 | refs/heads/master | 2020-04-16T00:20:29.060184 | 2020-04-14T20:49:15 | 2020-04-14T20:49:15 | 329,947 | 3 | 15 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
import os
import gettext
def strip_split_and_recombine(comma_separated):
word_list = comma_separated.split(",")
out = ""
for item in word_list:
out += item.strip()
out+=";"
return out
def generate(domain, path, filename, prefix, name, comment, suffix, genericName=N... | UTF-8 | Python | false | false | 4,155 | py | 18 | additionalfiles.py | 16 | 0.557882 | 0.556679 | 0 | 106 | 38.207547 | 115 |
rogersilveiraa/Python | 858,993,490,805 | 874ca1d689b286a78adcbea2af848e5ddc838402 | fcfc0f847a898125a32ebeeaf8e4bad891b4b67f | /Semana 7/Decomposição em primos.py | e7d303f4ada5fa48be63a8a6406746eb4c40c828 | [] | no_license | https://github.com/rogersilveiraa/Python | 61db5950ec15611b5d321a8b6c04b25a0f6b96ca | 80e2d6482c401f256a9ccc37a14ca913b8965d20 | refs/heads/master | 2021-08-18T08:35:28.750946 | 2021-04-27T14:04:01 | 2021-04-27T14:04:01 | 250,093,498 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | entrada_usuario = 1
fator = 2
while entrada_usuario < 2:
entrada_usuario = int(input("Digite um número natural maior que 1 para saber sua fatoração: \n"))
while entrada_usuario != 1 :
expoente = 0
while (entrada_usuario % fator) == 0:
entrada_usuario /= fator
expoente += 1
if expo... | UTF-8 | Python | false | false | 511 | py | 30 | Decomposição em primos.py | 30 | 0.566929 | 0.543307 | 0 | 19 | 24.947368 | 101 |
petemulholland/learning | 6,124,623,391,290 | 112f405af7a6e4465ea54408f534eac8940593e4 | 82ffe7f53d2275e7baf858a0eebf69c42e4b1f8a | /Python/ThinkPython/Chapter11/homophones.py | 3a1715451ff00c597070976a76328c55186e3c8e | [] | no_license | https://github.com/petemulholland/learning | 325bf39cf2499880e471a99389e1fa0dada27bbf | f51185262b5ffbda4437324c6be52569d443d5b4 | refs/heads/master | 2020-04-10T22:48:33.418638 | 2017-08-26T13:45:31 | 2017-08-26T13:45:31 | 10,203,967 | 0 | 0 | null | false | 2017-02-28T10:41:59 | 2013-05-21T19:45:14 | 2016-02-23T16:09:11 | 2017-02-28T10:41:59 | 9,700 | 0 | 0 | 0 | C# | null | null | import pronounce
def read_words():
"""Read the words in words.txt and return a dictionary
that contains the words as keys"""
words = []
fin = open('..\words.txt')
for line in fin:
word = line.strip().lower()
words.append(word)
return words
def check_homophones(wor... | UTF-8 | Python | false | false | 894 | py | 259 | homophones.py | 173 | 0.540268 | 0.522371 | 0 | 44 | 18.363636 | 58 |
chfoued/django | 2,748,779,106,578 | e8e500dd136b0d5c2c26fadad3e38df30cfae8da | 978b097f216fc1af3e6f5afc399102e393fde167 | /polls/forms.py | a1fd365cad21d7190fa653ac3ac7f103472214ec | [] | no_license | https://github.com/chfoued/django | afeb2ac96e583999b9a491304310080a217cba74 | 0935341ce3d9bddc8de7aadd77a9898a0d4d0021 | refs/heads/master | 2021-09-01T10:37:30.378477 | 2017-12-12T15:47:46 | 2017-12-12T15:47:46 | 112,955,333 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django import forms
from .models import Produit
class ProduitForm(forms.Form):
name = forms.CharField(max_length=200)
Poids = forms.FloatField()
nbr_carton = forms.IntegerField()
class OperationForm(forms.Form):
produit = forms.ModelChoiceField(queryset=Produit.objects.all())
poids = forms.FloatField()
nb... | UTF-8 | Python | false | false | 428 | py | 7 | forms.py | 4 | 0.75 | 0.735981 | 0 | 15 | 27 | 65 |
rottaca/VPlotter2.0 | 17,119,739,641,949 | ee07b8b4dc54e5e9d9d649a81699813811a0a45c | 2d18f6457e9a166035e6420869540bf679ecdd55 | /plotter/utils/calibration.py | ef51ae251650494d52726750e1d09121f81c493a | [] | no_license | https://github.com/rottaca/VPlotter2.0 | bb452aa870f1c8ef2f1586193d96e56a0063a92b | 57918dad191f8f0a23b9b561d252edf20eecf057 | refs/heads/master | 2020-03-19T16:22:26.165890 | 2019-06-22T17:51:37 | 2019-06-22T17:51:37 | 136,713,012 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
class Calibration:
"""
Calibration class for plotter.
All (x,y) coordinates have to be relative to the origin.
Absolute zero is at the upper left corner (left motor).
"""
def __init__(self, base, origin, stepsPerMM, resolution):
self.base = base
self.origin ... | UTF-8 | Python | false | false | 573 | py | 21 | calibration.py | 17 | 0.570681 | 0.570681 | 0 | 21 | 26.285714 | 75 |
jodhiambo/beelinev1 | 2,508,260,906,374 | 15fc62aeb17a6a0ee45f6ab36be7333e7842fe70 | 0a8bb114534eabdcf8d9a1d43462e374183cf6e7 | /userprofiles/migrations/0003_auto_20200806_2051.py | dc3768aa2c675e0eead9aa7b3adaa1de610afc23 | [] | no_license | https://github.com/jodhiambo/beelinev1 | 70a465ddf6e1f89493af07122496fd503d4d5d86 | d8af31cf1090c58fe52d6bec0f82ac49e69260df | refs/heads/main | 2023-06-23T09:05:47.386524 | 2021-07-21T12:51:00 | 2021-07-21T12:51:00 | 388,112,973 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.0.8 on 2020-08-06 17:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('userprofiles', '0002_auto_20200806_2041'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='age_g... | UTF-8 | Python | false | false | 536 | py | 69 | 0003_auto_20200806_2051.py | 27 | 0.595149 | 0.503731 | 0 | 18 | 28.777778 | 191 |
NickAlger/helper_functions | 7,456,063,228,282 | b0386ded0f41eca9880cf0e4ba62947b471ef70a | 79c3df91736d433118557f69626ea1d313be06dc | /nalger_helper_functions/box_mesh_nd.py | 31d3a55fe940dcbec727ea0d2e44181d029399fb | [] | no_license | https://github.com/NickAlger/helper_functions | 221245324f01d7ef3e5b8b9dc134036d829fa2ae | ef51c1aecb010b169caeb9cd0efa20d9160c80fa | refs/heads/master | 2021-06-24T08:49:30.858690 | 2021-06-10T09:46:13 | 2021-06-10T09:46:13 | 212,186,032 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import dolfin as dl
def box_mesh_nd(box_min, box_max, grid_shape):
# Usage:
# https://github.com/NickAlger/nalger_helper_functions/blob/master/jupyter_notebooks/box_mesh_nd.ipynb
d = len(box_min)
if d == 1:
mesh = dl.IntervalMesh(grid_shape[0] - 1, box_min[0], box_max[0])
... | UTF-8 | Python | false | false | 670 | py | 114 | box_mesh_nd.py | 53 | 0.620896 | 0.591045 | 0 | 17 | 38.470588 | 120 |
home-assistant/core | 2,027,224,589,347 | 3ab286c2c36087656bd73278d9a91e5a49841f99 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/demo/siren.py | 0720114861cfe373a438891105b0d52779901bf6 | [
"Apache-2.0"
] | permissive | https://github.com/home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | false | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | 2023-09-14T21:50:03 | 2023-09-14T21:50:15 | 470,852 | 62,888 | 24,675 | 2,641 | Python | false | false | """Demo platform that offers a fake siren device."""
from __future__ import annotations
from typing import Any
from homeassistant.components.siren import SirenEntity, SirenEntityFeature
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_... | UTF-8 | Python | false | false | 2,504 | py | 11,073 | siren.py | 9,921 | 0.640974 | 0.640974 | 0 | 76 | 31.947368 | 74 |
victorfbrito/pythonbasics | 3,779,571,250,017 | f6f6cc37173102c47bce9daee5646c24347279b7 | d60ea46b094b5758a9050697916d3b90891619e9 | /Calculadora.py | 0d35da0075b9d1051bf355645dc0077ad8966c1f | [] | no_license | https://github.com/victorfbrito/pythonbasics | 17943dce426bfe8afdca7bf9ede6e7c13602f7da | 42ea2dcba83ab93a0aeed6dca3b53155584a2f7e | refs/heads/master | 2022-12-12T03:54:14.488214 | 2020-08-26T14:10:31 | 2020-08-26T14:10:31 | 290,514,281 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Criando uma classe/ Subtipo de OBJECT: HERDA TODAS AS CARACTERÍSTICAS DE OBJECT
class Calculadora(object):
def __init__(self,a,b):
self.a = a
self.b = b
def definevalores(self,a,b):
self.a = a
self.b = b
def soma(self):
return self.a + self.b;
| UTF-8 | Python | false | false | 305 | py | 11 | Calculadora.py | 10 | 0.572368 | 0.572368 | 0 | 15 | 19.2 | 81 |
JovanDel/August | 128,849,053,028 | 2a278683f487635558c462709ee3f869bd5e0722 | 96543443202bb30332f97007d8d0a027356b813d | /myfile.py | 6c1056aa9219e651a23df08d89464831838e3848 | [] | no_license | https://github.com/JovanDel/August | 4451a7bbb7d67f365eb26bce06d39c57d81a1ffd | 0f65f21c23e8e7e597b5406074652b9117264630 | refs/heads/master | 2022-12-10T02:40:06.973909 | 2020-09-02T07:47:23 | 2020-09-02T07:47:23 | 292,213,881 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | text_file = open("family.txt", "w")
n = text_file.write('Welcome to pythonexamples.org')
text_file.close()
myFile.write("Mark
| UTF-8 | Python | false | false | 130 | py | 43 | myfile.py | 23 | 0.692308 | 0.692308 | 0 | 4 | 30.5 | 52 |
AchillesJJ/RL_spin1 | 3,204,045,634,185 | 6602b73dabc3446ffb8619cb405dc9ef07544223 | 053ff1d3f7c92162536602a3d5a260800c7b0404 | /DDPG_python3/spin1_ED.py | 08c5c0b04fa8768e34fb8a68eb445993bdce7410 | [] | no_license | https://github.com/AchillesJJ/RL_spin1 | 56ce9874810029fc648b3f41bf6d5377d50326b7 | 548c892a0b8d4471e97a4e5fefff29672ccd3b3c | refs/heads/master | 2021-09-19T07:28:33.892172 | 2018-07-25T03:20:58 | 2018-07-25T03:20:58 | 111,948,400 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # encoding: utf-8
import time
import os
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
from scipy import linalg
from scipy.integrate import odeint
from scipy.integrate import ode
import math
import cPickle
import cmath
# Hamiltonian of spin-1 system
def Hamiltonian(q, c2, Nt):
"""
This f... | UTF-8 | Python | false | false | 1,624 | py | 22 | spin1_ED.py | 10 | 0.614532 | 0.577586 | 0 | 58 | 26.482759 | 74 |
EthanJamesLew/PSU_STAT671 | 13,030,930,778,016 | 34b1553a8b0e5edd67fc50293f7d073e81714b9d | 636359cf640b72d8086a08454ef2343cdf9e5b0b | /hw/01/simple_classifier/iris.py | 4563640da1b4b906ff0598beb847c982bb70ff0c | [] | no_license | https://github.com/EthanJamesLew/PSU_STAT671 | 679e05a0b98dd7eecab14d2791b0d678f722f7c5 | b378ed71be3db5d7d24f6f583ec9e4633048f718 | refs/heads/master | 2020-08-04T18:33:00.241658 | 2019-12-12T01:26:16 | 2019-12-12T01:26:16 | 212,237,716 | 0 | 0 | null | false | 2019-12-12T01:26:17 | 2019-10-02T02:10:37 | 2019-12-05T07:13:22 | 2019-12-12T01:26:17 | 3,707 | 0 | 0 | 0 | Jupyter Notebook | false | false | '''Iris
@author: Ethan Lew
'''
from sklearn.datasets import load_iris
import pandas as pd
import numpy as np
from classifier import PartitionData, SimpleClassifier, risk
def load_iris_data(s0, s1, ratio):
# Get Iris Data
iris_sk = load_iris()
species_lp = {'I. setosa': 0, 'I. versicolor': 1, 'I. virgini... | UTF-8 | Python | false | false | 4,044 | py | 38 | iris.py | 17 | 0.600396 | 0.575915 | 0 | 111 | 35.441441 | 106 |
HeDefine/LeetCodePractice | 10,617,159,192,799 | 2318d9060b710e6c1c532549d12ecc8569a4446e | 5855918d1e253b8cdbabbf80137d06d2750963b0 | /Q1252.奇数值单元格的数目.py | 42db16acd6097c0b4572569d1627f3a9537fa10e | [] | no_license | https://github.com/HeDefine/LeetCodePractice | f6b163984e83370e44febae93b0a9cf34813a331 | 331c562d6618b5a95a17c4ae108f0e0442bd0dd6 | refs/heads/master | 2022-09-22T14:57:21.499849 | 2022-09-20T06:46:22 | 2022-09-20T06:46:22 | 195,788,878 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # 给你一个 m x n 的矩阵,最开始的时候,每个单元格中的值都是 0。
# 另有一个二维索引数组 indices,indices[i] = [ri, ci] 指向矩阵中的某个位置,其中 ri 和 ci 分别表示指定的行和列(从 0 开始编号)。
# 对 indices[i] 所指向的每个位置,应同时执行下述增量操作:
# ri 行上的所有单元格,加 1 。
# ci 列上的所有单元格,加 1 。
# 给你 m、n 和 indices 。请你在执行完所有 indices 指定的增量操作后,返回矩阵中 奇数值单元格 的数目。
#
# 示例 1:
# 输入:m = 2, n = 3, indices = [[0,1],[1,1]]... | UTF-8 | Python | false | false | 1,602 | py | 581 | Q1252.奇数值单元格的数目.py | 579 | 0.48738 | 0.421236 | 0 | 42 | 26.380952 | 86 |
LCOGT/banzai-nres | 12,180,527,279,666 | edee1001f1e1893333dded7351b499f7c033641a | 68b53b55647fa64d4a74230a2bcf8025f1839a6f | /banzai_nres/tests/test_gc_distance.py | 624430d98b5f5003e2b5d90cfb767f5adc88ecfd | [] | no_license | https://github.com/LCOGT/banzai-nres | 04e75ae1c3c2bb86d0173a5ffe47462ef444ede6 | 5533ad0f60b96111aceec7b1661d260692f6f43d | refs/heads/main | 2023-08-30T22:36:07.639127 | 2023-07-25T20:31:02 | 2023-07-25T20:31:02 | 140,865,515 | 2 | 2 | null | false | 2023-08-23T16:12:48 | 2018-07-13T15:44:06 | 2022-12-08T01:05:32 | 2023-08-23T16:12:48 | 21,576 | 3 | 1 | 9 | Python | false | false | from banzai_nres.dbs import cos_great_circle_distance
from astropy.coordinates import SkyCoord
from astropy import units
import numpy as np
def test_gc_distance():
ra1, dec1 = 150.0, 25.0
ra2, dec2 = 100.0, 10.0
coord1 = SkyCoord(ra1, dec1, unit=(units.deg, units.deg))
coord2 = SkyCoord(ra2, dec2, uni... | UTF-8 | Python | false | false | 821 | py | 77 | test_gc_distance.py | 50 | 0.605359 | 0.552984 | 0 | 18 | 44.611111 | 90 |
veronM/svgis | 6,004,364,330,207 | fe32b5a36e82db405653bd123dcfbbf03dd67370 | 656345432c7f242da3e259f9e47b7810317a99bd | /src/svgis/bounding.py | ff56082500abd8c031bb599593ff6a548ac7c5ed | [] | no_license | https://github.com/veronM/svgis | 3faa49ab188642bdb18b5413db9d6176e0ff706c | 1b3fb8617a0c124c393de5df9a6e1f3f060ccc91 | refs/heads/master | 2022-12-25T08:54:44.192586 | 2020-10-04T18:41:23 | 2020-10-04T18:41:23 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Utilities for working with bounding boxes'''
# This file is part of svgis.
# https://github.com/fitnr/svgis
# Licensed under the GNU General Public License v3 (GPLv3) license:
# http://opensource.org/licenses/GPL-3.0
# Copyright (c) 2015-16, 2020, Neil Freeman <contact... | UTF-8 | Python | false | false | 3,921 | py | 36 | bounding.py | 29 | 0.606478 | 0.589645 | 0 | 136 | 27.830882 | 97 |
zwerg44/python-engineio | 12,610,023,988,742 | 99aaf9098e8ff089bbc0bc273ded3cfd10d95fd8 | 54d2b57e4946f8854814994db2eea2add72bc1f4 | /engineio/__init__.py | a28690acaac1ef19c0e19ef702be3efb2ec20649 | [
"MIT"
] | permissive | https://github.com/zwerg44/python-engineio | 8f495e0d312b528f81e198b69c154413f794b762 | 849a5578998f8e04750bd4796f605f460fe95059 | refs/heads/master | 2020-04-08T16:22:08.976059 | 2018-12-02T22:48:28 | 2018-12-02T22:48:28 | 159,515,374 | 0 | 0 | null | true | 2018-11-28T14:33:46 | 2018-11-28T14:33:45 | 2018-11-25T11:37:07 | 2018-11-25T15:24:39 | 532 | 0 | 0 | 0 | null | false | null | import sys
from .middleware import WSGIApp, Middleware
from .server import Server
if sys.version_info >= (3, 5): # pragma: no cover
from .asyncio_server import AsyncServer
from .async_tornado import get_tornado_handler
from .async_asgi import ASGIApp
else: # pragma: no cover
AsyncServer = None
__ver... | UTF-8 | Python | false | false | 512 | py | 4 | __init__.py | 3 | 0.675781 | 0.666016 | 0 | 16 | 31 | 64 |
nehuenpereyra/Sistema-Gestion-Centros-de-Ayuda-y-Turnos | 8,907,762,215,369 | d797efd545aca41b9fee5bd1ee9d15c887afbba0 | cf4e542356c0739c49b16c31260228622f433359 | /config/routes/help_center.py | a38b28ed4fef8823022698e7bd98fe75a339ec79 | [] | no_license | https://github.com/nehuenpereyra/Sistema-Gestion-Centros-de-Ayuda-y-Turnos | cb3d2b27c10840726fbd39aedcc77ab10018bf32 | 1295d498498743afe45e814955d478e3b54c47dc | refs/heads/main | 2023-08-05T18:40:57.916437 | 2021-09-17T11:45:32 | 2021-09-17T11:45:32 | 407,519,229 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
from app.resources import help_center
import app.resources.api.help_center as api_help_center
def set_routes(app):
app.add_url_rule("/centros", "help_center_index", help_center.index)
app.add_url_rule("/centro/ver/<int:id>",
"help_center_show", help_center.show)
app.add_url_rule("/c... | UTF-8 | Python | false | false | 1,603 | py | 103 | help_center.py | 68 | 0.59451 | 0.59451 | 0 | 31 | 50.677419 | 96 |
mohan277/project_management_portal | 1,176,821,044,852 | 7bfb324966728ff8395e9282093b11b580279dcd | 0a9c7079723ef6776324fa5a37fe0ce2868fd54f | /project_management_portal_auth/tests/storages/test_validate_admin_storage_implementation.py | 0512217edd5aef26f1e7a385b9502ad240a53e04 | [] | no_license | https://github.com/mohan277/project_management_portal | 9e6b4ab4cce09bb61a742de212332f69663781eb | ce91c912731c7bba7674c1a00385862bad7a437b | refs/heads/master | 2023-06-20T15:06:56.251028 | 2021-07-22T17:03:00 | 2021-07-22T17:03:00 | 269,610,965 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pytest
from project_management_portal_auth.dtos.user_dto import IsAdminDTO
from project_management_portal_auth.models.user import User
from project_management_portal_auth.storages.storage_implementation import \
StorageImplementation
class TestStorageImplementation:
@pytest.mark.django_db
def test... | UTF-8 | Python | false | false | 1,040 | py | 138 | test_validate_admin_storage_implementation.py | 136 | 0.648077 | 0.645192 | 0 | 37 | 27.108108 | 76 |
Aasthaengg/IBMdataset | 6,949,257,121,209 | 83368e6900fafac3e96caf248d0c4467419dcd36 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02399/s930109842.py | d2033ff35be53912e7581771eb41afb34effb7a7 | [] | no_license | https://github.com/Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding=utf-8
a, b = map(int, raw_input().split())
print "{0:d} {1:d} {2:f}".format(a / b, a % b, 1.0 * a / b) | UTF-8 | Python | false | false | 112 | py | 202,060 | s930109842.py | 202,055 | 0.5 | 0.446429 | 0 | 4 | 27.25 | 59 |
Kaetherina/werwolf | 6,579,889,919,878 | 676b1980983d842c5d21c663eb087d4b7ea77d63 | ce6db73b1e301bf14946886b1c08623ab660211c | /registrationLogic.py | 1a205b814ef13b3f67022acdadcf3715a05f11bc | [] | no_license | https://github.com/Kaetherina/werwolf | 608861949de682af89261952a583d4a45bd2843f | d61a1b66574dd3a311f2b4ef89e0cb96d77a7d12 | refs/heads/master | 2020-06-13T01:01:07.746706 | 2016-12-07T16:01:17 | 2016-12-07T16:01:17 | 75,471,257 | 1 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import time
import random
import logging
master = "not set"
allowedRoles = ["Amor", "Seherin", "Hexe", "Jaeger"]
players = []
roles = []
playersRoles = []
specialRoles = []
numPlayers = 0
pw = "werwolf"
def setMaster(name):
global players
global master
master = name
pl... | UTF-8 | Python | false | false | 2,821 | py | 5 | registrationLogic.py | 4 | 0.672102 | 0.665721 | 0 | 119 | 21.705882 | 121 |
headboost/manim | 12,687,333,425,901 | cea5a12f7ea6992c90ced7a9e27c464678533adc | fb2786fb05995df29e2b36dd00ffeffee6ad69ce | /derivative/objects.py | b2667e78a54fd049c039c614c25f0ab7081311f3 | [] | no_license | https://github.com/headboost/manim | 2a1cbeb7526ed9c40add309c5b78336398560469 | c07fc81ec9d36e94b4d80cb00f7f6c3505de2210 | refs/heads/main | 2023-03-29T11:26:57.518165 | 2021-04-01T00:21:03 | 2021-04-01T00:21:03 | 349,242,711 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from manim import *
import numpy as np
import math
class DerivativeSquaresArea(VGroup):
CONFIG={
"original_square_kwargs":{
"width":2.5,
"height":2.5,
"color":BLUE_E,
"fill_color":BLUE_E,
"fill_opacity":1,
},
"dx_square_right_kwargs":{
"width":0.2,
... | UTF-8 | Python | false | false | 11,665 | py | 6 | objects.py | 4 | 0.571944 | 0.562151 | 0 | 304 | 37.296053 | 161 |
cncota/python-projects-6-to-10 | 506,806,149,457 | e8f4012b14288d3757fc62ca64431065d4ea878d | aa91395c989e3c387143f815ef9c9aaa9bce46af | /program5/model.py | 2afed283cbb6e8c9da3bf3cf09b10144efdad369 | [] | no_license | https://github.com/cncota/python-projects-6-to-10 | be0e016192fbaf283de48778c00e414d19966a93 | c50b98d33d6e859697630876c06535192d838d18 | refs/heads/master | 2020-05-29T19:26:07.963255 | 2019-05-30T02:38:22 | 2019-05-30T02:38:22 | 189,330,155 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import controller, sys
import model #strange, but we need a reference to this module to pass this module to update
from ball import Ball
from floater import Floater
from blackhole import Black_Hole
from pulsator import Pulsator
from hunter import Hunter
import math,random
running = Fa... | UTF-8 | Python | false | false | 3,617 | py | 16 | model.py | 16 | 0.556262 | 0.553497 | 0 | 148 | 22.439189 | 93 |
chong601/rpm-package-explorer | 2,499,670,986,423 | c977b469ba88651afa3da4f90bbdc03bba1c32a9 | b1e30c4fde506d67dbe8a6ea02d5bee200118474 | /rpm_package_explorer/db_model/sqlalchemy_models.py | 108bade55e3a27dc1f8083568f8fc35bc18a9297 | [
"MIT"
] | permissive | https://github.com/chong601/rpm-package-explorer | a60486b26e7d2ccb7dda2187907ae8b7959e757c | 5a14f15f90612528b323d0bb4cdeb2005925b02b | refs/heads/main | 2023-06-24T16:39:26.125234 | 2021-07-26T13:12:48 | 2021-07-26T13:12:48 | 384,791,697 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import uuid
from dataclasses import dataclass
from sqlalchemy import Text, Integer, Boolean, Column, TIMESTAMP
@dataclass
class DBInfo(object):
__tablename__ = 'db_info'
dbinfo_uuid: str = Column(Text, primary_key=True, default=uuid.uuid4)
repo_category: str = Column(Text, comment='Repository category th... | UTF-8 | Python | false | false | 9,958 | py | 12 | sqlalchemy_models.py | 9 | 0.670918 | 0.669612 | 0 | 259 | 37.447876 | 107 |
mgutierrezz/Practice_Problems | 11,347,303,629,543 | b24c2757dbaaff63fe53ee403b53d20ed2a7174a | 6a85de9ee4e251e3c7cd920892e57ca500bc80af | /Number_Complement.py | d62835527d9f8fb683d790bb46b99468e9850586 | [] | no_license | https://github.com/mgutierrezz/Practice_Problems | dd3dbde182636cafbd984e09f75dcfcee76398b9 | e71e0e2e28d444564f4221b209c4cf68d72f6ea3 | refs/heads/master | 2021-08-31T14:31:34.293462 | 2017-12-21T17:50:29 | 2017-12-21T17:50:29 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Number Compliment from @LeetCode.com
------------------------------------
Given a positive integer, output its unsigned complement number.
The complement strategy is to flip the bits of its binary representation.
** The given integer fits within a 32-bit signed integer range.
** No leading 0's
"""
class Solutio... | UTF-8 | Python | false | false | 1,015 | py | 4 | Number_Complement.py | 3 | 0.557635 | 0.525123 | 0 | 33 | 29.757576 | 119 |
SaltieRL/Saltie | 335,007,479,728 | 8703681331d6d3c8bd2b6567f9cb99a628d34230 | a165b266e96c44bb27c6886ce88d88ba381aa20e | /examples/replays/pass_length.py | cb9d6df7e9c48ea9e7909908d42014d69ff1eedc | [
"MIT"
] | permissive | https://github.com/SaltieRL/Saltie | ab616f261f480ebb8d10c32c0a37e046e8188d6f | a491ecfa5c77583ec370a0a378d27865dbd8da63 | refs/heads/master | 2021-06-25T06:35:02.232354 | 2019-01-26T16:50:43 | 2019-01-26T16:50:43 | 111,743,860 | 148 | 32 | MIT | false | 2019-01-26T16:50:44 | 2017-11-22T23:58:21 | 2019-01-26T02:25:01 | 2019-01-26T16:50:43 | 83,377 | 75 | 23 | 22 | Python | false | null | from examples.autoencoder.autoencoder_model import AutoencoderModel
from examples.autoencoder.autoencoder_model_holder import AutoencoderModelHolder
from examples.autoencoder.autoencoder_output_formatter import AutoencoderOutputFormatter
from examples.legacy.legacy_input_formatter import LegacyInputFormatter
from examp... | UTF-8 | Python | false | false | 1,826 | py | 60 | pass_length.py | 55 | 0.700986 | 0.680175 | 0 | 42 | 42.47619 | 92 |
Sheriff-AA/7COM1034-AI | 6,983,616,872,766 | 62ef0f0ec6c2d8443ad763e0b307a3e80e560de4 | fd4de865ac652b6b1760a471b690fe7103a3572e | /six_coins.py | 3f53f329e9fe8e0541acb6a058896b9499c38822 | [] | no_license | https://github.com/Sheriff-AA/7COM1034-AI | 17d9e93b96d7ec3ecf4ab9ac69bb2a3424a80832 | c47e5264fd2e340f7cb90417f4a8dc7ec55647bf | refs/heads/master | 2023-04-05T00:53:35.980077 | 2021-04-09T09:18:38 | 2021-04-09T09:18:38 | 355,812,821 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | start_node = ["LC", "LC", "LC", "E", "RC", "RC", "RC"]
goal_node = ["RC", "RC", "RC", "E", "LC", "LC", "LC"]
def cleanup(nodes):
# in-place!!
# remove dummy entries from begin and end of list
# clean from the front
while not nodes[0]:
nodes.pop(0)
while not nodes[-1]:
nodes.pop()
... | UTF-8 | Python | false | false | 1,715 | py | 13 | six_coins.py | 13 | 0.516618 | 0.495044 | 0 | 61 | 27.114754 | 69 |
jcallem94/feynrules | 6,562,710,056,276 | cf4db54c709ce2b6fb4e8aa40408d78f39902136 | 99b11ee9f6c707361fe9b5d6bd59d3ac4ff52ceb | /Models/EffLRSMnlo_FilesWithUFO/EffLRSM_NLO/lorentz.py | 8435254c77f66cbd416faff258653fde1752bd15 | [] | no_license | https://github.com/jcallem94/feynrules | 6d53a48570eb3de5ab67c12804ba6e21cbe2d76c | 3e7bd7721b5e202ab87dc9cb9f34711a7e2c0bde | refs/heads/master | 2021-01-21T12:00:28.173918 | 2017-08-31T19:27:04 | 2017-08-31T19:27:04 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # This file was automatically created by FeynRules 2.3.29
# Mathematica version: 10.0 for Linux x86 (64-bit) (September 9, 2014)
# Date: Fri 25 Aug 2017 23:44:54
from object_library import all_lorentz, Lorentz
from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot
try:
import form_factor... | UTF-8 | Python | false | false | 441 | py | 9 | lorentz.py | 7 | 0.675737 | 0.605442 | 0 | 17 | 24.882353 | 80 |
syurskyi/Python_Topics | 4,879,082,885,662 | 0cadc9640709c0c2dd78d9014603c391ed1cf5fa | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /045_functions/009_functools_module/examples/13-chain.py | d7e02c6a1ee13cce91b500f4c51f840784da80d8 | [] | no_license | https://github.com/syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | false | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | 2022-11-03T01:22:28 | 2023-02-16T03:08:09 | 198,671 | 2 | 2 | 33 | Python | false | false | """Пример использования функции chain модуля itertools"""
from itertools import chain
for i in chain(range(2), range(3)):
print(i)
| UTF-8 | Python | false | false | 172 | py | 15,362 | 13-chain.py | 14,734 | 0.717391 | 0.702899 | 0 | 6 | 22 | 58 |
dryabokon/tools | 240,518,200,943 | b137b7db25668d07f9aabbbf6016f63eb960d044 | ab7ca74289b3e3cfa57480e996a297b9c08ae5db | /tools_time_convertor.py | 6d6477fa5c29e60c6935b398ee3961d306a3c2bb | [] | no_license | https://github.com/dryabokon/tools | b4706d9a7dc74376a60a5927ac9e481b20f454a5 | a9964fd24f7e05377cb44696cf1043c34d5e4147 | refs/heads/master | 2023-08-09T07:15:31.721628 | 2023-08-07T11:23:50 | 2023-08-07T11:23:50 | 168,508,474 | 1 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
# ----------------------------------------------------------------------------------------------------------------------
def now_str(format='%Y-%m-%d'):
dt = datetime_to_str(pd.Timestamp.now(),format)
return dt
# -------------------------------------------------------------------------------... | UTF-8 | Python | false | false | 2,765 | py | 112 | tools_time_convertor.py | 111 | 0.419168 | 0.400723 | 0 | 65 | 41.538462 | 130 |
slukas111/custom_user | 10,325,101,413,038 | a5a6609077c1210bcdbe829d2641e8c409a4afab | b34cef759d791dce0331b85c9582703b2e099e73 | /sashauser/forms.py | a48e4626d40380fa1b1a870fd464e9fcdd945045 | [] | no_license | https://github.com/slukas111/custom_user | 9a552c4df416799b2acaa7fd6583d6208baff578 | 30d4a6e01f93ba12600631ed99b1df1296aa5d75 | refs/heads/master | 2023-07-31T12:36:56.389065 | 2020-07-03T22:17:12 | 2020-07-03T22:17:12 | 268,570,838 | 0 | 0 | null | false | 2021-09-22T19:08:25 | 2020-06-01T16:13:21 | 2020-07-03T22:17:24 | 2021-09-22T19:08:23 | 11 | 0 | 0 | 1 | Python | false | false | from django import forms
from .models import CustomUser
class LoginForm(forms.Form):
username = forms.CharField(max_length=50)
password = forms.CharField(max_length=32, widget=forms.PasswordInput)
class SignUpForm(forms.Form):
username = forms.CharField(max_length=50)
display_name = forms.CharField(m... | UTF-8 | Python | false | false | 407 | py | 4 | forms.py | 3 | 0.761671 | 0.737101 | 0 | 12 | 33 | 73 |
leolinf/flask-demo | 6,554,120,094,269 | 559a625e5bc545070efb1f7e1839880307ff65ca | b1e909985a022e925347200c7e62c56e85ec3325 | /risk/app/review/managers.py | b58cacdfa962d8c380f9e9ed64bbcaad00f946f0 | [] | no_license | https://github.com/leolinf/flask-demo | 221d4b1a4b834b148ebc8d8ef698e38b7dd86b06 | c882d5bf2f7a337c08a9d60b5062324e512c0a3c | refs/heads/master | 2022-12-09T18:51:16.477097 | 2019-03-25T10:27:00 | 2019-03-25T10:27:00 | 118,107,203 | 1 | 0 | null | false | 2022-12-08T00:46:14 | 2018-01-19T09:46:31 | 2019-03-25T10:27:13 | 2022-12-08T00:46:13 | 618 | 1 | 0 | 26 | Python | false | false | # -*- coding: utf-8 -*-
import datetime
from ..models import InputApply
from ..constants import ApproveStatus, Code, ViewStatus, ViewLogTemp, InputApplyStatus, Status, LocalState
from ..config import Config
from ..databases import session_scope
import json
from ..models.sqlas import ReviewLog
from app.credit.utils im... | UTF-8 | Python | false | false | 9,369 | py | 212 | managers.py | 183 | 0.564981 | 0.560305 | 0 | 277 | 32.194946 | 152 |
TeoTse/Python-Scripts | 446,676,627,133 | a5c25be1d5e56e837ca70478635891a1529aae52 | a34489d2bd41e19ecd6ef158d283c9d8720de3ed | /Game/MatchingGame.py | 19b54fad3efa5aee6b0162f00725e27146573492 | [] | no_license | https://github.com/TeoTse/Python-Scripts | b7fd64d69b181da14647784b62267928b0f02566 | c18de8f57dee1db6100877d28e17ff12ba72c329 | refs/heads/main | 2023-04-08T05:33:34.440286 | 2021-04-04T20:56:03 | 2021-04-04T20:56:03 | 354,644,371 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
#Function that creates all the cards of the game depending on the level the user enters
def CardSet(n,AllCards):
symbols = ["♥","♦","♠","♣"]
if(n == 16): #Easy level contains 16 cards
values = ['10', 'J', 'Q', 'K']
for symbol in symbols:
for value in values:
... | UTF-8 | Python | false | false | 21,206 | py | 8 | MatchingGame.py | 6 | 0.470902 | 0.446605 | 0 | 519 | 37.32948 | 183 |
Aamir-M-Khan/CTPelvic1K | 6,012,954,238,965 | 4090809d6ab9cbb33f22cbdc724685ee9e843bf5 | 1b8c5fcf088b13fae304d3c07682732bc4d781c6 | /nnunet/utilities/file_endings.py | d7f34510bfc3dca3ea108196dadbf30d50d16e86 | [] | no_license | https://github.com/Aamir-M-Khan/CTPelvic1K | 7e1d46dc0483bad9ee621964f4538d3619d79d54 | 79c9b125633803c242b4bf23e3fbf4ec652fdd3d | refs/heads/main | 2023-09-05T17:24:56.544524 | 2021-11-19T14:53:49 | 2021-11-19T14:53:49 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
from batchgenerators.utilities.file_and_folder_operations import *
def remove_trailing_slash(filename:str):
return os.path.normpath(filename)
def get_last_folder(foldername: str):
return os.path.basename(remove_trailing_slash(folder))
def maybe_add_0000_to_all_niigz(folder):
nii_gz = subfi... | UTF-8 | Python | false | false | 526 | py | 21 | file_endings.py | 20 | 0.623574 | 0.598859 | 0 | 15 | 32.266667 | 66 |
pta2002/okshop | 10,333,691,353,220 | 3dff261655841ef367f261e40c6a4e3acef16507 | d7090a8bcd87d368b935df1bcf2ea764e2165cad | /shop/admin.py | 548fc5b0d2fba3b5e802af685f48537103a76090 | [
"MIT"
] | permissive | https://github.com/pta2002/okshop | e792549330bf69aaaea4518ba5ed13a41d863983 | 59dd6867e9282a41b66326b389ca160fd27a6218 | refs/heads/master | 2021-01-13T04:42:10.615454 | 2018-11-21T17:34:15 | 2018-11-21T17:34:15 | 79,274,126 | 2 | 1 | MIT | false | 2018-11-21T17:34:17 | 2017-01-17T21:33:34 | 2017-01-17T22:42:18 | 2018-11-21T17:34:16 | 286 | 1 | 1 | 0 | JavaScript | false | null | from django.contrib import admin
from .models import *
# Register your models here.
class ShippingCountryInline(admin.TabularInline):
model = ShippingCountry
classes = ['collapse']
class ProductImageInline(admin.StackedInline):
model = ProductImage
classes = ['collapse']
class DigitalFileInline(admi... | UTF-8 | Python | false | false | 3,692 | py | 56 | admin.py | 15 | 0.613489 | 0.613218 | 0 | 117 | 30.555556 | 91 |
hagen93/dumpmail | 8,246,337,247,428 | 24239badad1b8f89d43af0d6c7fccb9805d61c4e | 8855ec1d968c0f8415a80d269517604aace02708 | /mail/views.py | 656cd932c53d0f992fd03838de47e8b456b4dd6f | [
"MIT"
] | permissive | https://github.com/hagen93/dumpmail | 67d6c6c96192ecebfb0b800d971788152bdf5be1 | dcd80d290bcb2408b9205c2b31767b4a2c70c327 | refs/heads/master | 2020-05-23T12:39:54.543734 | 2017-03-13T01:01:46 | 2017-03-13T01:01:46 | 84,769,352 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf import settings
from django.shortcuts import render
from mailbox import mbox
from mail.utils import parse_message, message_or_404
def mail(request, item_id):
mbox_file = getattr(settings, "MBOX_FILE", None)
if mbox_file:
mailbox = mbox(mbox_file)
context = {
'all... | UTF-8 | Python | false | false | 675 | py | 7 | views.py | 5 | 0.617778 | 0.608889 | 0 | 23 | 28.304348 | 106 |
home-assistant/core | 7,997,229,132,320 | 052f68fdd983374f0b55dea2499435660b97214a | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/onewire/config_flow.py | 4764e3b2a550a273e9492c21d8b68e7f3c4fd440 | [
"Apache-2.0"
] | permissive | https://github.com/home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | false | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | 2023-09-14T21:50:03 | 2023-09-14T21:50:15 | 470,852 | 62,888 | 24,675 | 2,641 | Python | false | false | """Config flow for 1-Wire component."""
from __future__ import annotations
from typing import Any
import voluptuous as vol
from homeassistant.config_entries import (
ConfigEntry,
ConfigFlow,
OptionsFlowWithConfigEntry,
)
from homeassistant.const import CONF_HOST, CONF_PORT
from homeassistant.core import ... | UTF-8 | Python | false | false | 8,667 | py | 11,073 | config_flow.py | 9,921 | 0.584401 | 0.58267 | 0 | 253 | 33.256917 | 87 |
roberthluo/Instagram-Account-Analytics | 14,542,759,309,408 | a605e59d7e961fd579190f3a3adfa1a925f9478f | e8741de9f90bbf888dd3909c3556c7dd6a20248d | /parser.py | 2d180107f82f94e070bfb23a7ac3071e90cc7b17 | [] | no_license | https://github.com/roberthluo/Instagram-Account-Analytics | 6b577c157408ec36106b4a903c279c8875063ff6 | 49a8b3bdfdf8e1de40af628151c717f45e2fdaf9 | refs/heads/master | 2021-03-24T10:00:57.354209 | 2018-04-09T01:08:49 | 2018-04-09T01:08:49 | 117,874,255 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
import boto3
from collections import OrderedDict
file_name = 'output.json'
# Begin connection to DynamoDB
dynamodb = boto3.resource('dynamodb')
client = boto3.client('dynamodb')
# Get array of table names associated with current AWS account
table_names = client.list_tables()
# Read json dat... | UTF-8 | Python | false | false | 2,952 | py | 9 | parser.py | 6 | 0.611111 | 0.604675 | 0 | 105 | 26.095238 | 91 |
munnellg/elltm | 9,251,359,598,463 | d1888ab5f091a3ed8d739d84db035fa00d8cf2e6 | 9f90abd6db3125c6ce0946e5a7d76fcc97cd49d3 | /to_line_corpus.py | 7aebb9a96b74885cf9e501bfe5720d8cd8520c6a | [
"MIT"
] | permissive | https://github.com/munnellg/elltm | 68c7c3d155bca49ffab46fc05273478160b5f945 | ccb80d1f16145f35df5042a304a5a09faf4021e0 | refs/heads/master | 2021-01-10T06:54:06.047349 | 2015-12-09T13:53:42 | 2015-12-09T13:53:42 | 47,148,792 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import bz2
from optparse import OptionParser
from docs import config
from lib.tokenizer import text_to_sentences
def build_opt_parser():
usage = "usage: %prog [options] <filename> [, <filename>, ...]"
parser = OptionParser(usage=usage)
parser.add_option("-o", "--out-file", dest="out_file",
... | UTF-8 | Python | false | false | 1,158 | py | 16 | to_line_corpus.py | 14 | 0.595855 | 0.591537 | 0 | 42 | 26.571429 | 73 |
dguptaruby/travellers_route | 3,161,095,932,503 | a83e2b81f377a5ac43c9a1e651d381fe031ba670 | 9f7719573155b80e7875c4b9bb80ddbe6430405d | /traveller/utils.py | 59ce1151fc3b35f51d80c428708266a5769c9650 | [] | no_license | https://github.com/dguptaruby/travellers_route | ff07189346c712f280bc08166d6d5fc873b6b81c | 6d9c2274e88faece5be18199ae6b08d93db85bc5 | refs/heads/main | 2023-08-01T22:52:11.896118 | 2021-09-15T10:14:36 | 2021-09-15T10:14:36 | 406,672,805 | 0 | 0 | null | false | 2021-09-15T10:06:15 | 2021-09-15T08:21:36 | 2021-09-15T09:57:20 | 2021-09-15T10:06:14 | 8 | 0 | 0 | 0 | Python | false | false | """Simple travelling salesman problem between cities."""
import math
from math import cos
from math import sin
from math import asin
from math import sqrt
from math import radians
from collections import namedtuple
from ortools.constraint_solver import routing_enums_pb2
from ortools.constraint_solver import pywrapcp
i... | UTF-8 | Python | false | false | 4,530 | py | 5 | utils.py | 3 | 0.61479 | 0.602428 | 0 | 127 | 34.669291 | 85 |
xyloguy/cs1410-2018-20-50-examples | 2,087,354,121,651 | 180ae33c1381c29c3bece617e429ebb6a7fe461b | 5e95f55385b84c233b6151c6d3974fa931617ee5 | /2018-03-07_inheritance/marker/sharpiemarker.py | c40fff40df9b2795b9bed5620343adad605bb69f | [] | no_license | https://github.com/xyloguy/cs1410-2018-20-50-examples | 3e95988a22389b9ad83599c3a975135fb022b572 | 1d0e145bc8102e5e3e5dd0d4b92e1b455b47aa36 | refs/heads/master | 2021-05-05T14:19:21.559204 | 2018-04-26T01:22:25 | 2018-04-26T01:22:25 | 118,478,575 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from marker import Marker
class SharpieMarker(Marker):
def __init__(self, color):
Marker.__init__(self, color, 3, 0.005, False)
if __name__ == '__main__':
red_sharpie = SharpieMarker((255, 0, 0))
red_sharpie.set_owner('Bob')
print(red_sharpie.write(), red_sharpie.color, red_sharpie.tip, red_... | UTF-8 | Python | false | false | 335 | py | 64 | sharpiemarker.py | 61 | 0.635821 | 0.60597 | 0 | 12 | 26.916667 | 85 |
TamakiRinko/HuaQiBei | 14,611,478,746,992 | de4f9d0a4ac22ea18eeb37fc25dfc81369e47f32 | 05a136b3552ff14ae88a6ff72e01b42d35a750d7 | /推荐及更新/Temp.py | 92f00c11e1c35089eea4f6a9bf2ebc67ea176a2a | [] | no_license | https://github.com/TamakiRinko/HuaQiBei | 2fe44d6fe38b588910ce1aa12a3f1785cf6ff296 | b6c206d39d3f0d16d374da25bc2a10710279c7d2 | refs/heads/master | 2020-07-08T15:15:05.355791 | 2019-10-10T03:56:07 | 2019-10-10T03:56:07 | 203,709,595 | 2 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | import surprise as sp
list = [1, 3]
print(list)
| UTF-8 | Python | false | false | 49 | py | 46 | Temp.py | 22 | 0.673469 | 0.632653 | 0 | 4 | 11.25 | 21 |
WiproOpenSourcePractice/galaxia | 8,057,358,655,775 | 2c80ca8b295f220f16a56dcdede2a4e74dc7648c | 585c80facd190a9cb4f292bf692c8b70b726b9ef | /galaxia/gcmd/exporter.py | 2f668aca2d05b8b383de1f7046ceb0d69c8f4ab2 | [
"Apache-2.0"
] | permissive | https://github.com/WiproOpenSourcePractice/galaxia | 45da9b2fbab004f7177965b56787cbc54fa53364 | baa6ea0a2192625dce2df7daddb1d983520bb7ab | refs/heads/master | 2021-01-24T14:32:50.747049 | 2019-11-12T16:17:38 | 2019-11-12T16:17:38 | 54,614,980 | 25 | 20 | null | false | 2016-06-08T03:46:56 | 2016-03-24T04:40:15 | 2016-05-20T10:31:25 | 2016-06-08T03:46:56 | 213 | 3 | 9 | 28 | Python | null | null | # Copyright 2016 - Wipro Limited
#
# 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 writin... | UTF-8 | Python | false | false | 2,416 | py | 80 | exporter.py | 45 | 0.653974 | 0.649007 | 0 | 72 | 32.555556 | 79 |
williamfzc/GitUserSwitch | 15,333,033,260,091 | dd948760ff72c770d484d6527c25ce40848d4ae7 | 16a5180db70f2ffeea6808ff28049020b147cf45 | /git_conf.py | 08153a320befbb789e214ae4a4562c0e32521e38 | [
"MIT"
] | permissive | https://github.com/williamfzc/GitUserSwitch | cbce7fd7bbfbbe7353afb04b3ec743c73fbec52a | 60482ff58dc8eae1fb4de358b25e044dc4c1f4f9 | refs/heads/master | 2021-09-01T13:37:32.442459 | 2017-12-27T08:30:57 | 2017-12-27T08:30:57 | 115,414,955 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # CONF OF GIT USER
GIT_DICT = {
'TP_LINK': {
'username': 'Feng Zhangchi',
'email': '123456789@qq.com'
},
'GITHUB': {
'username': 'williamfzc',
'email': '246@qq.com'
},
'SOMETHING_ELSE': {
'username': 'abc',
'email': '135@qq.com'
}
}
# URL IN GIT... | UTF-8 | Python | false | false | 383 | py | 3 | git_conf.py | 2 | 0.501305 | 0.462141 | 0 | 20 | 18.1 | 57 |
Xue-zhen-zhen/Protein-subcellular-location | 7,361,573,987,872 | 3eb0bcbd3c2d662e052e571b5e98e98eff877540 | 744deb9925bc75427dbf65c9defa9120c849ca6e | /code/part3/GapNet-PL/tensorflow_models/TeLL/layers.py | f957be95628022b0fcbdb7d2482c51a83ece2e8b | [
"BSD-2-Clause"
] | permissive | https://github.com/Xue-zhen-zhen/Protein-subcellular-location | f4dfc94edebc2e3bf3c215d02bfe9e4708a00798 | 401eb93d311cea9a115253cc2aefbb4b9ffe30e9 | refs/heads/master | 2021-08-18T16:08:54.838031 | 2021-05-28T13:49:47 | 2021-05-28T13:49:47 | 253,808,243 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
© Michael Widrich, Markus Hofmarcher, 2017
Different classes and utility functions for stack-able network layers
See architectures/sample_architectures.py for some usage examples
"""
import numbers
import numpy as np
import tensorflow as tf
from tensorflow.python.framework import ops
fro... | UTF-8 | Python | false | false | 34,148 | py | 127 | layers.py | 12 | 0.564706 | 0.556213 | 0 | 829 | 40.190591 | 135 |
zachoj10/kingdomgenerator | 7,670,811,621,204 | 3c998be86687e3213793479ff6e9e567055cf644 | 95a6304c63db86e7184f4fc976c63df6e2df7dd4 | /kingdomgenerator.py | 5082373181c4808ec3ef4dd74411837a24314618 | [] | no_license | https://github.com/zachoj10/kingdomgenerator | bc472c8b39c58163c49555686c982af82fadd9e2 | bbc46c9cdda52fbbcb11df819c6346a20627a735 | refs/heads/master | 2021-03-12T22:56:19.894438 | 2014-01-04T06:40:25 | 2014-01-04T06:40:25 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# coding=utf-8
import csv, random, math
cards = []
selectedCards = []
expansions = ['Dominion', 'Intrigue', 'Seaside', 'Alchemy', 'Prosperity', 'Cornucopia', 'Hinterlands', "Dark Ages", 'Guilds']
possibleCards = []
cardDispersion = []
#Import Card List From CSV File
with open('card_list.c... | UTF-8 | Python | false | false | 6,435 | py | 2 | kingdomgenerator.py | 1 | 0.581428 | 0.561363 | 0 | 199 | 31.251256 | 168 |
django-ftl/fluent-compiler | 15,135,464,774,970 | c93d17453236284d485d1298c454ad4a897a4cb3 | d755aaaf905b48baf31aa90332f03c45f4c8dad3 | /tests/format/test_select_expression.py | 2fcb4a4fd1b32291b57d125b204a148ddbb417f7 | [
"Apache-2.0"
] | permissive | https://github.com/django-ftl/fluent-compiler | 36ffe0c76678e82f4f15bbccef057c8e4cd0e6bc | d8f19b47161788fbdea9822b130ef136fb839540 | refs/heads/master | 2023-08-08T04:16:52.368218 | 2023-07-21T10:37:17 | 2023-07-21T10:37:17 | 248,319,322 | 20 | 1 | NOASSERTION | false | 2023-04-18T16:14:05 | 2020-03-18T19:04:42 | 2023-03-04T02:49:47 | 2023-04-18T16:14:01 | 850 | 14 | 2 | 3 | Python | false | false | import unittest
from fluent_compiler.bundle import FluentBundle
from fluent_compiler.errors import FluentReferenceError
from ..utils import dedent_ftl
class TestSelectExpressionWithStrings(unittest.TestCase):
def test_with_a_matching_selector(self):
bundle = FluentBundle.from_string(
"en-US"... | UTF-8 | Python | false | false | 10,567 | py | 52 | test_select_expression.py | 27 | 0.484243 | 0.476389 | 0 | 356 | 28.682584 | 96 |
liu1355/dl_fin | 12,635,793,796,241 | bc31876bec4a1f84a877f225375264a83ad938b1 | b3ab292901144ba5b3256116e314fb9d6b776252 | /DDQN/FRED/a23.py | dcfb46b76cd5d6b794da660389a0fe56da2e13f0 | [
"MIT"
] | permissive | https://github.com/liu1355/dl_fin | 10e6b6fb8624e97894f37928b25ebebb144780cf | 9a4be858127be0daa96cc8bb5cfed9d14f7912b8 | refs/heads/master | 2021-05-06T06:00:03.196560 | 2017-12-31T08:53:58 | 2017-12-31T08:53:58 | 115,273,497 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import csv
import requests
import pandas as pd
FRED_NROUST = 'https://www.quandl.com/api/v3/datasets/FRED/NROUST/data.csv?api_key=6CbgFEPrywyyFy1yNywC'
with requests.Session() as s:
download = s.get(FRED_NROUST)
decoded_content = download.content.decode('utf-8')
cr = csv.reader(decoded_content.splitline... | UTF-8 | Python | false | false | 507 | py | 32 | a23.py | 31 | 0.700197 | 0.686391 | 0 | 18 | 27.166667 | 104 |
rambokiller/PythonProgramming | 5,669,356,880,980 | 780beae5d7958c86af8ecae002031b4e71a3a011 | b61849c7d7ff5505c0c895fe92b4740d6dd63add | /futval.py | 00cf65c67a2e96e9254b2e7d10e0ec022191ab2d | [] | no_license | https://github.com/rambokiller/PythonProgramming | c3ca2ec209f404527f509e8113c6904c58e2e23e | 26fd562aba10769a43ba09a9cf0b28b8200a6e1a | refs/heads/master | 2021-01-10T05:38:34.410666 | 2016-02-20T04:43:23 | 2016-02-20T04:43:23 | 52,028,135 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# A program to compute the value of an investment carried
# 10 years into the future
def main():
print("This program calculates the future value", end=" ")
print("of a 20-year investment.")
principal =eval(input("Enter the initial principal: "))
apr = eval(input("Enter the annual interest ... | UTF-8 | Python | false | false | 451 | py | 8 | futval.py | 8 | 0.689579 | 0.660754 | 0 | 17 | 25.529412 | 59 |
zdf0221/wireless | 19,396,072,330,161 | 50a24a990a996f2ff63b44bd771f24be24b3fa13 | 73f965c69c001044e8d1ad9d40b12b1a4c87409c | /managesys/migrations/0008_account.py | da5651d6b034ca3c3af2f0cb4d24918d716ae7da | [] | no_license | https://github.com/zdf0221/wireless | 6175104dac356b784fec3bef582b17e29c961b17 | d1c801854b1c3bd033e67f5e6461f77816e57fef | refs/heads/master | 2021-01-10T23:45:35.088530 | 2016-10-09T15:38:08 | 2016-10-09T15:38:08 | 70,407,267 | 3 | 0 | null | false | 2016-10-09T15:38:10 | 2016-10-09T14:10:11 | 2016-10-09T14:14:31 | 2016-10-09T15:38:09 | 2,407 | 0 | 0 | 0 | Python | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-27 09:38
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('managesys', '0007_delete_account'),
]
operations = [
migrations.CreateModel(
... | UTF-8 | Python | false | false | 879 | py | 37 | 0008_account.py | 29 | 0.564278 | 0.525597 | 0 | 27 | 31.555556 | 102 |
rajunrosco/PythonExperiments | 15,144,054,707,093 | f6c5c8492012bf4f5e60ffee0fdd266dbb6d338c | 90b03c0a5ce3088ea704ced246112530a2a5cfb0 | /OneDriveTEST/OneDrive.py | 2631a89e693146e6a34657a78dba1aa25e12a1fc | [] | no_license | https://github.com/rajunrosco/PythonExperiments | f567aceb287489dd5ba98a5d633d75a19b7d6726 | 702f1b0515708021d9170eff7cb199b43df53dd6 | refs/heads/master | 2023-01-12T09:48:04.140653 | 2022-02-05T06:47:02 | 2022-02-05T06:47:02 | 141,531,586 | 0 | 0 | null | false | 2022-12-27T15:34:53 | 2018-07-19T06:04:45 | 2022-02-05T06:47:07 | 2022-12-27T15:34:51 | 7,378 | 0 | 0 | 7 | Python | false | false | import base64
def create_onedrive_directdownload (onedrive_link):
data_bytes64 = base64.b64encode(bytes(onedrive_link, 'utf-8'))
data_bytes64_String = data_bytes64.decode('utf-8').replace('/','_').replace('+','-').rstrip("=")
resultUrl = f"https://api.onedrive.com/v1.0/shares/u!{data_bytes64_String}/root/co... | UTF-8 | Python | false | false | 709 | py | 57 | OneDrive.py | 35 | 0.722144 | 0.686883 | 0 | 16 | 43.375 | 100 |
bartoszp32/arttest | 3,745,211,489,657 | 81d4452d6afac1f706fe81afac23091b3ad7bede | 65226f6ed8c2fb16188d7523e37b6b5d4027ddb8 | /arttest/logic/calendars.py | bf400ce266376ce82031ba74b62e51431258eb50 | [] | no_license | https://github.com/bartoszp32/arttest | a1eda9972bc82cda9ca500c64375ee3bb0b10444 | c029263bb4e6c691d0752df482cfeef104ab4940 | refs/heads/master | 2019-07-08T12:20:25.441470 | 2017-06-19T05:48:44 | 2017-06-19T05:48:44 | 88,907,729 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #-*- coding: utf-8 -*-
""" Module used for operations on calendar """
import logging
import calendar
import random
FIRST_DAY = calendar.MONDAY
LOG = logging.getLogger(__name__)
class CalendarService(object):
"""docstring for CalendarService"""
def __init__(self, request):
super(CalendarService, self)... | UTF-8 | Python | false | false | 2,920 | py | 108 | calendars.py | 52 | 0.585274 | 0.577397 | 0 | 75 | 37.933333 | 86 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.