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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
m1sterzer0/JuliaAtcoder | 13,855,564,547,575 | 31555f18cc83ead0682268dc41505eb83f73d2d0 | 820fd50ab301eedb6058b5dd2d626e1f4c845467 | /python/lib.py | 2f69d5b6bc55719d0336ed1786b010560cb80fe1 | [] | no_license | https://github.com/m1sterzer0/JuliaAtcoder | 28ca1be2fb96c12db13f8abe6a45de2d73b44f44 | d8b4f5fd7698d0eff8ebfa17e026658b473d62fd | refs/heads/main | 2023-06-14T08:31:16.260185 | 2021-07-10T17:02:53 | 2021-07-10T17:02:53 | 365,635,629 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
import collections
## Recall heapq has heappush,heappop,heapify for simple minheaps -- faster than this implementation
class maxHeap :
v = []
def __init__(self) : self.v = [0]
def len(self) : return len(self.v)-1
def isempty(self) : return len(self.v) == 1
def top(self) : return self.v... | UTF-8 | Python | false | false | 18,172 | py | 138 | lib.py | 80 | 0.473531 | 0.457737 | 0 | 538 | 32.734201 | 110 |
BaotingKing/MyHouse | 13,520,557,062,098 | 6d622c77d6f00b7d9ac172469314e659dbf33df4 | 0bac49827e24ab081fb64ff931ee685d7e078f61 | /nnProject/DIY_script/web/flask.py | c686c78186631901231c45a7a56609821bfacc60 | [] | no_license | https://github.com/BaotingKing/MyHouse | 16f61f060892c1155369527253d79d1e2fd3662b | 91d2a98e8d0d9e6442083a43b5681fffe8735736 | refs/heads/master | 2022-05-04T17:07:53.256560 | 2019-11-04T10:06:09 | 2019-11-04T10:06:09 | 127,607,576 | 3 | 0 | null | false | 2022-03-29T21:56:29 | 2018-04-01T07:32:04 | 2020-04-05T15:29:29 | 2022-03-29T21:56:28 | 131,925 | 3 | 0 | 2 | Python | false | false | #!/usr/bin/python
# -*- coding: utf-8 -*-
# @author: ZK
# Time: 2019/01/01
import sys
from flask import request, jsonify, Flask
from flask_apscheduler import APScheduler
class config(object):
JOBS = [
{
'id': 'job1',
'func': '__main__: get_one',
'trigger':... | UTF-8 | Python | false | false | 850 | py | 93 | flask.py | 78 | 0.532941 | 0.518824 | 0 | 39 | 19.641026 | 70 |
ofgulban/meso-MRI | 6,339,371,751,584 | 69e67ee4dd452a2a70c0555dfa94e9bfd06753df | 7b36801dd87a1df93b2836db74f68b5e00682638 | /scripts/01_MEGRE/11_fix_nondecay.py | 97249694d03c4fdb63095b591c0cae9a2ce59c36 | [
"BSD-3-Clause"
] | permissive | https://github.com/ofgulban/meso-MRI | c873bf227ae1048a84ffa7999c7ece72f3a8c3f8 | 2afd70a3bb7576f401dd98eeb07df38368f42baf | refs/heads/main | 2023-04-11T19:49:50.837267 | 2022-10-24T13:31:49 | 2022-10-24T13:31:49 | 327,944,487 | 3 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Detect voxels that does not decay over time."""
import os
import nibabel as nb
import numpy as np
# Parameters
NII_NAME = "/home/faruk/data/DATA_MRI_NIFTI/derived/sub-23/T2s/10_composite/sub-23_ses-T2s_part-mag_MEGRE_crop_ups2X_prepped_avg_composite.nii.gz"
OUTDIR = "/home/faruk/data/DATA_MRI_NIFTI/derived/sub-23... | UTF-8 | Python | false | false | 1,457 | py | 68 | 11_fix_nondecay.py | 64 | 0.593686 | 0.567605 | 0 | 49 | 28.734694 | 146 |
MyRobotLab/myrobotlab | 7,791,070,688,707 | 3b09dc4acadf8c7c8c5f7d8a9fb9f4a4a315cb96 | 09a7fa80d420634848b5e6af7b59353afd8c726b | /src/main/resources/resource/HttpClient/HttpClient.py | f9072207b0f503018f3ef4627cd3bed3140aac48 | [
"Apache-2.0",
"CC-BY-2.5"
] | permissive | https://github.com/MyRobotLab/myrobotlab | cf789956d9f97a98eead44faf7a8b61f70348dc3 | 0ecdc681b4928ab65649404779c095d352dd96b1 | refs/heads/develop | 2023-09-04T10:57:19.041683 | 2023-08-30T14:04:44 | 2023-08-30T14:04:44 | 18,051,302 | 213 | 114 | Apache-2.0 | false | 2023-09-07T14:14:58 | 2014-03-24T03:59:27 | 2023-08-30T19:00:09 | 2023-09-07T14:14:58 | 140,585 | 209 | 94 | 119 | Java | false | false | ################################################
# HttpClient service is a service wrapper of the Apache HttpClient
# So, you can download webpages, images, and a all sorts of
# goodies from the internet
http = runtime.start("http","HttpClient")
# blocking methods
# GETs
print(http.get("https://www.google.com"))
prin... | UTF-8 | Python | false | false | 1,442 | py | 1,622 | HttpClient.py | 1,376 | 0.728155 | 0.728155 | 0 | 47 | 29.680851 | 71 |
fullonic/bookmarks | 11,132,555,275,152 | e44d02449ba909ae989d72b3d1fde2cdc66c27cd | bc00e301e2fd28014b186d5018205f9d6b849560 | /markers/signals.py | 374fd9bc923ecf4c328ac47000c042b7d66e6709 | [] | no_license | https://github.com/fullonic/bookmarks | d2a341249a86e37925b4f88b195d185e1851a7e0 | b398c15dfd8244bde78ac5efe203862ef6b5caf0 | refs/heads/master | 2023-03-21T05:37:29.016228 | 2021-03-14T21:42:30 | 2021-03-14T21:42:30 | 347,378,035 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from .core import generate_tags
from django.db.utils import IntegrityError
# TODO: Remove Signals: Move this for a normal function to be call when saving a new bookmark
def add_tags_to_bookmark(sender, instance, **kwargs):
from .models import Tag
tag_list = Tag.objects.values_list("name", flat=True)
tags... | UTF-8 | Python | false | false | 465 | py | 28 | signals.py | 20 | 0.709677 | 0.709677 | 0 | 13 | 34.769231 | 93 |
SidAhmed01/E-commerce-Django-Project-Aroma-thems | 16,604,343,577,328 | 5897dc7ac01a52bd2288033cbc9ae2617595e5c9 | dab28e03c52e03966b8dd536cfd266167e1b2521 | /pages/views.py | 5e7604dc80ca31a1722b5d6d58aa251ff9f64b98 | [] | no_license | https://github.com/SidAhmed01/E-commerce-Django-Project-Aroma-thems | 666d7e29232876df71ae062a490048393b7a76d0 | 459f0ecb32729d5af889f94cf51a6797c52b8657 | refs/heads/main | 2023-06-27T21:07:52.475198 | 2021-07-31T11:09:46 | 2021-07-31T11:09:46 | 391,318,440 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render, get_object_or_404
from .models import *
from django.core.paginator import Paginator
# Create your views here.
#global_variable
def index(request):
context = {
'product_list': Product.objects.all()
}
return render(request, 'pages/index.html', context) ... | UTF-8 | Python | false | false | 1,242 | py | 24 | views.py | 14 | 0.669082 | 0.664251 | 0 | 62 | 18.983871 | 71 |
Majiker/BalancedMetaSoftmax-InstanceSeg | 1,005,022,361,104 | 1dff6af7757d6051d3eca0a41ee41aa4e51ab551 | f2637c2fc89ecbfa7b1f50e84293e732a4aa2656 | /projects/BALMS/balms/build.py | 75b8ea8d298b3e36dd4524bdcdf6014630c27953 | [] | permissive | https://github.com/Majiker/BalancedMetaSoftmax-InstanceSeg | d1b44e95233c2320ed41ef802d26f1a7c280308d | 64fd32e56fdef3ac382364dccd3f647b0517d771 | refs/heads/main | 2023-02-20T23:41:19.896391 | 2021-01-19T09:04:02 | 2021-01-19T09:04:02 | 307,335,464 | 14 | 3 | Apache-2.0 | false | 2021-01-15T07:28:58 | 2020-10-26T10:26:07 | 2021-01-15T05:55:08 | 2020-11-22T04:15:57 | 865 | 6 | 3 | 1 | null | false | false | from detectron2.data.build import *
import logging
from detectron2.data.common import DatasetFromList, MapDataset
from detectron2.data.dataset_mapper import DatasetMapper
from .distributed_sampler import ClassBalancedTrainingSampler
def build_detection_meta_loader(cfg, mapper=None):
"""
build the meta set fr... | UTF-8 | Python | false | false | 1,404 | py | 26 | build.py | 22 | 0.728632 | 0.725783 | 0 | 37 | 36.972973 | 109 |
SubashGupta/COVID-19-Face-Mask-Detector-with-OpenCV-and-Deep-Learning | 6,760,278,553,172 | e4fea10ba461bdd93cea9a099512f1fecde3b27a | f0c3f5e38242c31fe9e9cb2aaee8da669e2b8553 | /Mask_Image.py | 55781cedf8b2546b2b70c84a1c8a0a423adc3bea | [] | no_license | https://github.com/SubashGupta/COVID-19-Face-Mask-Detector-with-OpenCV-and-Deep-Learning | 7429bd833c9b861bd3b6ded8b139121579be5264 | 4f041b46fee07f012237f37e8c314786583db384 | refs/heads/main | 2023-05-31T09:15:45.871985 | 2021-06-13T13:29:14 | 2021-06-13T13:29:14 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
from tensorflow.keras.models import load_model
from keras.preprocessing.image import load_img , img_to_array
import numpy as np
import os
import matplotlib.pyplot as plt
prototxt = r'C:\Users\saiko\Desktop\deploy.prototxt'
weights_path = r'C:\Users\saiko\Desktop\SSD.caffemodel'
net = cv2.dnn.re... | UTF-8 | Python | false | false | 1,901 | py | 3 | Mask_Image.py | 1 | 0.623356 | 0.582851 | 0 | 71 | 24.774648 | 95 |
luliu31415926/google_code_jam | 523,986,011,776 | f6daa7e288460444b797ef2e95dac2e2382f1136 | 972f6c9810a541587e8f6d1f256a22903b77bcf7 | /2018_round1B/B.py | 3a22c16a721449139d25763df292300b4b1a0e48 | [] | no_license | https://github.com/luliu31415926/google_code_jam | 8439e1159a082cc2daeee5d2c6137539d091f09c | 7b797b41bbf24bdf1b70d47681b9b6c95822ef98 | refs/heads/master | 2021-04-12T11:05:42.505750 | 2018-04-29T20:04:22 | 2018-04-29T20:04:22 | 126,403,239 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
from math import *
from collections import *
from bisect import *
def can_add(r,truth,pairs):
# check if signs[r] flows one of the truth, if only one truth, add another truth
m,n=signs[r]
if len(truth)==1:
m_,n_=truth[0]
if m!=m_ and n!=n_:
truth=[(m,n_),(m_,n)]
return... | UTF-8 | Python | false | false | 1,243 | py | 58 | B.py | 55 | 0.482703 | 0.470636 | 0 | 58 | 20.431034 | 85 |
maxlampe/ODSL-Data-Science-Course | 16,149,077,050,798 | 69ff11fbe91d9a656fa55a15f5942cf41b4f6a9a | 39f542c30553f9cd459682b80992db154b0ef98d | /day6_e1.py | d09030b67771f23958c0197c9aff2eb52a98a458 | [] | no_license | https://github.com/maxlampe/ODSL-Data-Science-Course | 9a4e973697c58c81bca011b06b1199f1065fdb8b | 3af88b6bc6bbf4de6a48e581778acabbc3f52262 | refs/heads/master | 2023-03-30T20:11:40.573739 | 2021-03-31T21:10:56 | 2021-03-31T21:10:56 | 345,808,617 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Daily assignment 6_1"""
import numpy as np
import matplotlib.pyplot as plt
from mathfunctions import gaussian
def metropolis(func, params, n_trials: int = 1000, prop_rng=None, x0: float = 0.0):
"""Metropolis Algorithm"""
if prop_rng is None:
prop_rng = [-1.0, 1.0]
x_curr = x0
accept = []... | UTF-8 | Python | false | false | 2,095 | py | 21 | day6_e1.py | 21 | 0.550835 | 0.494511 | 0 | 77 | 26.207792 | 83 |
crazyYoda/logging | 16,252,156,251,042 | 594d2e1fe9cbdbda6d8e17ed832e1ef962ab58f9 | 816b5b1c01bf1ecf1268d0482d39beab436dc45c | /prj/news/models.py | 6df854fc029c1b3ece2572e858411186f276f87f | [] | no_license | https://github.com/crazyYoda/logging | 22f83cec5dd7c9df391513333d31524c84c7b4e6 | 82553bc05b2057b377145e14c69f6c8cae6479f6 | refs/heads/master | 2023-08-04T04:38:22.594459 | 2021-09-13T13:56:06 | 2021-09-13T13:56:06 | 401,168,190 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
from django.shortcuts import reverse
class New(models.Model):
title = models.CharField(max_length=64)
text = models.TextField()
date_pub = models.DateTimeField(auto_now_add=True)
slug = models.SlugField(max_length=128, unique=True)
def get_absolute_url(self)... | UTF-8 | Python | false | false | 455 | py | 4 | models.py | 4 | 0.648352 | 0.637363 | 0 | 15 | 28.066667 | 60 |
fopina/tgbot-buttiebot | 8,100,308,335,204 | de975c432e161970ab00f4b3d61c02313c32731f | 54cebd6687a52f70a62e836233895c81127b1223 | /instascrape.py | dcba778d2611f8ff8a21139cd848dfdab487850e | [] | no_license | https://github.com/fopina/tgbot-buttiebot | 87d61dd8034091f5c34a236a8e1517bc9ed294f8 | 3c4a83500fcfb9efdbd438ec17758549112eb392 | refs/heads/master | 2022-12-11T16:13:02.191261 | 2020-01-06T23:58:15 | 2020-01-06T23:58:15 | 49,206,924 | 0 | 1 | null | false | 2022-11-30T15:12:38 | 2016-01-07T13:43:27 | 2020-01-06T23:58:33 | 2022-06-03T22:43:19 | 115 | 0 | 1 | 2 | Python | false | false | #!/usr/bin/env python
from __future__ import print_function
import requests
import re
import json
PICLOAD = 50
HASH = '42323d64886122307be10013ad2dcc44'
def url_and_caption(media):
try:
c = media['edge_media_to_caption']['edges'][0]['node']['text']
except KeyError:
c = ''
media['caption'... | UTF-8 | Python | false | false | 1,499 | py | 8 | instascrape.py | 5 | 0.525684 | 0.506338 | 0 | 61 | 23.57377 | 112 |
xiyueyiwan/DP-AGD | 15,857,019,264,222 | 17b1c901f8caf14e38dd03d6cc2ad4cbe91f577d | 5568a0da6284fad46d0a61b6569e8f6c943a8147 | /algo/sgd.py | d0f4fe27309cb514a67e76823920a8ab15ae74e7 | [] | no_license | https://github.com/xiyueyiwan/DP-AGD | cb9ce03eeb77c8075f618706a518717057c38aa0 | 347bcbe751d189d5f3164c5fcf78f5a51642eab7 | refs/heads/master | 2020-04-08T18:49:53.697074 | 2018-11-29T07:48:05 | 2018-11-29T07:48:05 | 159,626,994 | 0 | 1 | null | true | 2018-11-29T07:40:39 | 2018-11-29T07:40:38 | 2018-11-14T08:13:30 | 2018-03-01T21:25:01 | 2,052 | 0 | 0 | 0 | null | false | null | import argparse
import numpy as np
from agd.common.svm import svm_grad
from agd.common.svm import svm_loss
from agd.common.svm import svm_test
from agd.common.gaussian_moments import compute_log_moment
from agd.common.gaussian_moments import get_privacy_spent
from agd.common.param import compute_advcomp_budget
from agd... | UTF-8 | Python | false | false | 3,405 | py | 13 | sgd.py | 12 | 0.571806 | 0.543612 | 0 | 119 | 27.613445 | 77 |
gitWK86/jeb_script | 8,392,366,136,465 | 526e532a712f7e5b8236c6235c8a6e6b09e21beb | 585441aeec68c235ae3f4ad9531fc1db98aac3bd | /samples/16 IDexUnit-CFG.py | d463b2e5d7249754857501d36f7b8344c863cc7d | [
"BSD-2-Clause"
] | permissive | https://github.com/gitWK86/jeb_script | 58c6b3f90b31a6cea13d7c33987436401202072b | 5d918a2abb7e50fbbb4c571122741d52b20959fd | refs/heads/main | 2023-01-06T12:32:44.750502 | 2020-10-28T11:26:44 | 2020-10-28T11:26:44 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from com.pnfsoftware.jeb.client.api import IClientContext
from com.pnfsoftware.jeb.core import IRuntimeProject
from com.pnfsoftware.jeb.core.units import IUnit
from com.pnfsoftware.jeb.core.units.code.android import IDexUnit
from com.pnfsoftware.jeb.core.units.code.android.dex import IDexMethodD... | UTF-8 | Python | false | false | 3,691 | py | 21 | 16 IDexUnit-CFG.py | 20 | 0.533801 | 0.447125 | 0 | 75 | 46.546667 | 124 |
Cassie-1/HtestApi_git | 19,439,022,016,023 | a607fdb308f31a4f13d796b1e0277f4560af0e87 | e74aa54cd742c55d62020b799672470d14d6ae20 | /util/getUserInfoUtil.py | 98176b2ffaf47314a4e21d2993e23ae3d548286a | [] | no_license | https://github.com/Cassie-1/HtestApi_git | cd3356f8afccd95c2e93bf46e86b407e02a59d6a | 8ac74fe0e85fea225e3c91486addbc44901312c1 | refs/heads/master | 2021-10-25T20:42:05.394728 | 2019-04-07T08:52:23 | 2019-04-07T08:52:23 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests,json
proxies = {'http':'http://localhost:8888'} #代理
headers={}
headers['Content-Type']='application/json;charset=UTF-8'
http=requests.session() #得到session运行在整个过程中
resp=http.post(url="http://192.168.1.203:8083/sys/login",
proxies=proxies,
headers=headers,
... | UTF-8 | Python | false | false | 946 | py | 22 | getUserInfoUtil.py | 13 | 0.623608 | 0.561247 | 0 | 29 | 30 | 73 |
Reno-Greenleaf/tomb | 16,801,912,091,073 | 7e2025d95e663222f3ddd59cca83b35c99ba8cce | 6436a5077563b73ecd8cd4671ff7319f6fc1832d | /pool.py | 3b29c188db2f818925355ab781e7bf18b7f0fea1 | [
"MIT"
] | permissive | https://github.com/Reno-Greenleaf/tomb | 901c0e9206aac5177c43dee00b97420fb44ebe79 | 6a76f640e523903f32c5fa178295435a24289559 | refs/heads/master | 2020-05-24T17:55:02.112065 | 2019-07-20T19:20:42 | 2019-07-20T19:20:42 | 43,693,544 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from actor import Actor, Location, Passage, Switch, Ghost
from json import load
class Pool(dict):
""" Contains ingame objects. """
def fill(self):
with open('data/actors.json', 'r') as data:
actors = load(data)
for name, properties in actors.items():
self._build(properties, name)
with ope... | UTF-8 | Python | false | false | 933 | py | 6 | pool.py | 6 | 0.636656 | 0.636656 | 0 | 38 | 23.578947 | 72 |
JakobTheDev/vs-code-remote-dev-demo | 11,209,864,659,692 | 387693198ff53dce19becd4509b9043dc3746e69 | 183d023d782889cb355ffbf52e833769f383ce6e | /setup.py | 603de1b8e8ecc7c656ca89580eadff6075380f31 | [
"MIT"
] | permissive | https://github.com/JakobTheDev/vs-code-remote-dev-demo | 2623d2144c3de81bf47da96305dacbd7387ff07b | cdf2810cb0425ad82d0ed8c4349378289d1f8537 | refs/heads/master | 2022-11-19T05:06:13.031980 | 2020-07-22T00:09:11 | 2020-07-22T00:09:11 | 281,300,863 | 8 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #####################
# IMPORTS
#####################
from setuptools import setup, find_packages
#####################
# SETUP
#####################
def dependencies(imported_file):
with open(imported_file) as file:
return file.read().splitlines()
with open("README.md") as file:
# PROVISION
setup... | UTF-8 | Python | false | false | 677 | py | 4 | setup.py | 2 | 0.549483 | 0.545052 | 0 | 24 | 27.208333 | 78 |
DaHuO/Supergraph | 14,370,960,575,092 | 8edb304245736aa8cb42ebd038b188e61413601d | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_2_neat/16_0_2_blankverse_B.py | 7c3b5f95beef489cae2c3cc7daa768af64bfce21 | [] | no_license | https://github.com/DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | false | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | 2019-02-21T15:42:08 | 2021-03-19T21:55:45 | 38,414 | 0 | 0 | 2 | Python | false | false | def solve(s):
c = 0
N = len(s)
for i in xrange(1,N):
if s[i] != s[i - 1]:
c += 1
if s[N - 1] == '-':
c += 1
return c
T = int(input())
for i in xrange(T):
s = raw_input()
print "Case #%d: %d" %(i + 1, solve(s))
| UTF-8 | Python | false | false | 239 | py | 30,073 | 16_0_2_blankverse_B.py | 16,513 | 0.430962 | 0.401674 | 0 | 14 | 16.071429 | 41 |
disarticulate/osm2pgsqlauto | 9,990,093,941,503 | fd7cfcbf1dae0585f0f811cfa7d746aa42fbb511 | dd5701ab404c7ba15b6fe0125377ef9312417e64 | /bin/postgres_wait.sh | 7f43f70c2a51edded67b8aa60011cfab2f494750 | [] | no_license | https://github.com/disarticulate/osm2pgsqlauto | 7f8b7ed7344e60838b1ce630537d1b3f8558004d | b83888a35ae1bb96a50a532a76a76fb6c32a4fcf | refs/heads/master | 2021-09-01T05:26:13.746003 | 2017-12-25T03:35:09 | 2017-12-25T03:35:09 | 112,108,589 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/local/bin/python3
import os
import time
import psycopg2
connection = "host='{POSTGRES_DB_HOST}' dbname='{POSTGRES_DB}' user='{POSTGRES_USER}' password='{POSTGRES_PASSWORD}'"
connection = connection.format(**os.environ)
while True:
try:
conn = psycopg2.connect(connection)
conn.close()
break
exc... | UTF-8 | Python | false | false | 445 | sh | 42 | postgres_wait.sh | 18 | 0.710112 | 0.698876 | 0 | 16 | 26.875 | 117 |
cash2one/xai | 18,056,042,531,190 | 65025c38e722ee905138eb566b8ba8338b327485 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_staunch.py | 1a18cbf3d91647585167e57d4771edd4576e6235 | [
"MIT"
] | permissive | https://github.com/cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
#calss header
class _STAUNCH():
def __init__(self,):
self.name = "STAUNCH"
self.definitions = [u'to stop something happening, or to stop liquid, especially blood, from flowing out: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'verbs'
def run(self, o... | UTF-8 | Python | false | false | 365 | py | 37,275 | _staunch.py | 37,266 | 0.632877 | 0.627397 | 0 | 16 | 21.6875 | 110 |
mingo-x/colorfromlanguage | 5,368,709,127,506 | 758df7a065cfef13d3a242d764c96d365832afb3 | 455e213231d39eeeaaa049d2bc0d33a46a3dbd2d | /autocolorize_resnet.py | 5cecf5aa0a0e0400c14ab16f469a3bd217b35719 | [] | no_license | https://github.com/mingo-x/colorfromlanguage | 0e0adf60353e898e24f3b4d1c27e27b152fddc1c | f61d478679922be24c55e3afe7260b41afc6b915 | refs/heads/master | 2018-12-21T10:47:47.536749 | 2018-12-15T16:01:12 | 2018-12-15T16:01:12 | 149,338,913 | 0 | 0 | null | true | 2018-09-21T12:45:13 | 2018-09-18T19:06:59 | 2018-09-18T19:07:01 | 2018-09-21T12:45:13 | 109 | 0 | 0 | 0 | OpenEdge ABL | false | null | import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
import torchvision
import torchvision.transforms as transforms
from collections import defaultdict, Counter
import cPickle as pickle
import h5py as h5... | UTF-8 | Python | false | false | 23,475 | py | 9 | autocolorize_resnet.py | 2 | 0.574015 | 0.554079 | 0 | 523 | 43.885277 | 145 |
alerin345/Instagram | 4,784,593,592,612 | d9313e52d0624bdd4d640a0083e0b03682f7ab1d | ea2cdb09ca80f06c874741f07926954547c10b5c | /users/models.py | 0d19652cfec3f8c893f93f2fc373a25165dd5588 | [
"MIT"
] | permissive | https://github.com/alerin345/Instagram | 7d34af6f047ee3d9f6ae7afb04dc38c9343a0960 | 082e4a64042ae94f3eacfc10144f925e3dfc2492 | refs/heads/master | 2023-02-19T15:12:44.883976 | 2021-01-06T23:20:23 | 2021-01-06T23:20:23 | 323,971,176 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
# Create your models here.
class Profile(models.Model):
user = models.OneToOneField(User, null=True, on_delete=models.CASCADE)
picture = models.ImageField(default="default.png",null=True, blank=True)
... | UTF-8 | Python | false | false | 1,684 | py | 31 | models.py | 21 | 0.720309 | 0.719121 | 0 | 39 | 42.179487 | 112 |
ElviraUz/arena | 14,998,025,824,065 | 71da50a3b8aa4f8ca48695116fc5f7b136886c16 | 13bbfb9a36911675a8c12f2b20a05480f6088411 | /load_data.py | 02b18aeff52b2380b43e4b043992ad6b7acf630e | [] | no_license | https://github.com/ElviraUz/arena | a0f689462fc034ddb1fd3a95bbf72f9e85147901 | 31814014f8be6b9d2509942193029978a69b1dd4 | refs/heads/master | 2022-11-17T08:15:11.151077 | 2020-07-12T08:24:26 | 2020-07-12T08:24:26 | 271,096,899 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from webapp import create_app
from webapp.model import db, Arenas
from webapp import db, Arenas
import json
app = create_app()
db.init_app(app)
with open("data_file.json", "rb") as read_file:
data = json.load(read_file)
properties = data['features']
def import_data(name, adress, website, phones, hours24, d... | UTF-8 | Python | false | false | 2,697 | py | 13 | load_data.py | 6 | 0.559374 | 0.547919 | 0 | 79 | 32.151899 | 110 |
rubenCumbreno/startmeapp-hackaton | 7,164,005,471,955 | 4a52a0cf9486bb1ac510cef95e26c0a44ac2e910 | dae30b231bf194c9760979ed17afc5933eb7bae8 | /sentiment_analist/sentiment_analysis.py | f4c8796ae2e7c57762ff24bb5188a6baf6b5d22c | [] | no_license | https://github.com/rubenCumbreno/startmeapp-hackaton | 07ed109ee744c7064428672b7691a43b5cad23c6 | 47d8735154ccc0934229370fa2f90f3a551f5d42 | refs/heads/master | 2020-04-11T19:04:20.633816 | 2018-12-16T16:47:37 | 2018-12-16T16:47:37 | 162,021,083 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
#Se importa TextBlob
from textblob import TextBlob
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
import logging #libreria para el logging
import os
import sys
import time
class SentimenAnalysis(object):
def __init__(self):
self.logger = logging.getLo... | UTF-8 | Python | false | false | 1,803 | py | 4 | sentiment_analysis.py | 3 | 0.660566 | 0.655574 | 0 | 72 | 23.069444 | 101 |
MalSemik/nauka-5.0 | 4,793,183,514,089 | a54fe577f01c26e24c3b141f260281ba98a1658b | d764722e49a0394a4ca5688988f98a31fa3d98a7 | /regular_expressions.py | 04fae656bf72406bc375cad4fae3a1e4f2df2ff0 | [] | no_license | https://github.com/MalSemik/nauka-5.0 | 5744e8853beb517dfac4d19f415b757197d1d0e5 | 13b825ef2994b8c3155da7d9513eadcf0f5e66d6 | refs/heads/master | 2020-05-04T23:36:49.985653 | 2019-10-23T16:44:23 | 2019-10-23T16:44:23 | 179,549,485 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import re
date_pattern = r"[0123]?\d[-./]\d{1,2}[-./]\d{1,4}"
example_date_str = "01.22.1995"
bad_date_str = "01.33/dupa"
if re.match(date_pattern, example_date_str):
print("Matches")
if re.match(date_pattern,bad_date_str):
print(f"{bad_date_str} matches pattern {date_pattern}")
else:
print(f"{bad_date_s... | UTF-8 | Python | false | false | 511 | py | 48 | regular_expressions.py | 41 | 0.630137 | 0.58317 | 0 | 19 | 25.947368 | 65 |
dl0312/PS | 13,804,024,896,648 | 0e0229a7c260eb05f8f9ea5d0798418bb53deceb | 026e2c312171158100445102ddb0c4d16e68f294 | /programmers/heap/rameaum.py | f8d77597e5a83c68ec090c9a71d38a6c0270ea73 | [] | no_license | https://github.com/dl0312/PS | 46e561099582957de8fca5d55d98f34f02bb1a9e | 05e6fd30c932b5013cd0274119ec4002f68d3e70 | refs/heads/master | 2020-05-09T13:11:14.682009 | 2019-09-06T17:19:57 | 2019-09-06T17:19:57 | 181,141,370 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # use heapq for heap
import heapq
def solution(stock, dates, supplies, k):
answer = 0 # answer
last_idx = 0 # save last index of dates & supplies
pq = [] # priority queue list
while stock < k:
for idx in range(last_idx, len(dates)):
if dates[idx] <= stock:
heapq.... | UTF-8 | Python | false | false | 939 | py | 63 | rameaum.py | 58 | 0.574015 | 0.530351 | 0 | 33 | 27.454545 | 82 |
addisonLee626/LeeCode | 1,537,598,302,191 | 2f0cfb3759805670f3f4c74ae3341e80386c64c8 | 19075687e63c36122bdce550b746820c804ac2f3 | /test9.py | cdef5f75673d9f1175ed818e4bd16faea3a105a4 | [] | no_license | https://github.com/addisonLee626/LeeCode | 9c8356e09a1cba647f48957356521aa8d4d89816 | ce4b0022e0d247ca77eca1d6c07f59963f249d2f | refs/heads/master | 2023-02-22T17:09:55.791505 | 2021-01-22T10:39:43 | 2021-01-22T10:39:43 | 331,909,444 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def jumpFloorplus(number):
return 2**(number-1)
n = 8
print(jumpFloorplus(n)) | UTF-8 | Python | false | false | 82 | py | 16 | test9.py | 16 | 0.695122 | 0.658537 | 0 | 5 | 15.6 | 26 |
YueYueWoof/KFP-Engineer | 12,343,736,025,289 | d7565388ac6beb619b7b4933b52e59e3b77ba376 | 429268da1a408e44a69efc0c2032623921294f77 | /python/bots/common/PoliceResponseUtil.py | b4b721c95d7b05b2794f3e71cd5df143be987cb4 | [] | no_license | https://github.com/YueYueWoof/KFP-Engineer | e4da65207a9fd2b067c9e714cc51aa7782c8da07 | ebc3d5a4f082d98832a04b149f8bc471c5eda39c | refs/heads/main | 2023-08-26T00:31:24.717540 | 2021-10-20T05:33:36 | 2021-10-20T05:33:36 | 389,035,638 | 0 | 0 | null | true | 2021-07-24T07:50:28 | 2021-07-24T07:50:28 | 2021-07-23T02:48:06 | 2021-07-23T02:48:07 | 43,080 | 0 | 0 | 0 | null | false | false | import random
class PoliceResponseUtil():
GENERAL = [
"{name}還不去{action}?...我要生氣了....!",
".....{name}我只是叫你去{action},才不是關心你呢!",
"吶{name}.....去..去{action}啦!",
"{name}.....不來一起{action}嗎?",
"{name}我只是想讓你去{action}而已....很過分嗎?",
"{name}!還不去{action}的話我再也不理你了!",
"{nam... | UTF-8 | Python | false | false | 8,267 | py | 139 | PoliceResponseUtil.py | 122 | 0.488596 | 0.486927 | 0 | 135 | 38.903704 | 97 |
emalp/uacOfferChecker | 19,086,834,707,203 | b5e5338a39a3449bd993e0ee63c7aa4ecaf4e5f2 | e0442eaffa51ef6b11b5e12929eee256394e5c60 | /setup.py | 1b5997b409d8e0710ba95ffbd7149358eb7b48dc | [] | no_license | https://github.com/emalp/uacOfferChecker | 975f0bb871e75a28a3b749129d3cd3f7ae589d86 | 9b7e491bed673629c3e5cd51c6c19ffbfef43aad | refs/heads/master | 2021-08-17T07:21:25.860737 | 2017-11-20T22:19:44 | 2017-11-20T22:19:44 | 111,398,097 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from setuptools import setup
setup(
name = "uacChecker",
version = '1.0',
desciption = 'Checks for your UAC undergraduate offers',
author = 'emalp',
install_requires = ['mechanize', 'bs4', 'lxml'],
zip_safe = False
)
| UTF-8 | Python | false | false | 226 | py | 5 | setup.py | 2 | 0.672566 | 0.659292 | 0 | 10 | 21.5 | 57 |
shwetha1607/Recognise-7-seg | 6,975,026,902,953 | 5ace87b898c3d3b9609d388b3196ee28be04134a | 7673aad59183b64012c654a3e901c0b1c9096760 | /webcam.py | bffb914dcdc8bf4efc05e7059c490e7a04ece777 | [] | no_license | https://github.com/shwetha1607/Recognise-7-seg | 856632cd340f9c949c3eea5fc657d6eb37c69bbf | aa48db5650b6112d0698f3995b39a71dd51e04ef | refs/heads/master | 2020-04-22T10:17:39.781861 | 2019-03-26T18:20:21 | 2019-03-26T18:20:21 | 170,300,144 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
from imutils.perspective import four_point_transform
import imutils
import numpy as np
from imutils import contours
def loc_four_point_transform(image, pts):
rect = pts
(tl, tr, br, bl) = rect
widthA = np.sqrt(((br[0] - bl[0]) ** 2) + ((br[1] - bl[1]) ** 2))
widthB = np.sqrt(((... | UTF-8 | Python | false | false | 2,621 | py | 5 | webcam.py | 5 | 0.601679 | 0.556276 | 0 | 91 | 26.736264 | 84 |
KoyanagiHitoshi/AtCoder | 8,976,481,684,295 | 401ad01be4eaf10f69124393e39fb97226037ea4 | ce32b422491e547bf220e511ee4d77213e37760e | /code/keyence2020_a_02.py | e89681de7a50b86684b16baa77ed233046e7cf50 | [
"MIT"
] | permissive | https://github.com/KoyanagiHitoshi/AtCoder | 0a006d0a751f9709dbc01b8ac00e765229605bef | e37b19bf86225577d14f83fbc6be4429c8612e3a | refs/heads/master | 2022-05-06T09:06:22.121784 | 2022-04-03T14:21:16 | 2022-04-03T14:21:16 | 172,677,103 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | H,W,N=[int(input()) for i in range(3)]
print(min((N+H-1)//H,(N+W-1)//W)) | UTF-8 | Python | false | false | 72 | py | 1,580 | keyence2020_a_02.py | 1,578 | 0.541667 | 0.5 | 0 | 2 | 35.5 | 38 |
miguelgimenezgimenez/ranking-project | 2,671,469,674,765 | d27d0d7c28d1f096152ca3d2c96a2e0bae12439a | 392c3f7cf2587c51801dda2a6228fea377d18237 | /src/services/api.py | 0c46ac1a469e53560ed4d14195c6bf1bef1fca2a | [] | no_license | https://github.com/miguelgimenezgimenez/ranking-project | d63ca2ab8636a698b514d294211b80208d8c4b2d | dd01c2ef4112ce33cdca2e300c473017df09ea52 | refs/heads/master | 2022-12-18T09:40:41.721536 | 2020-09-25T13:44:59 | 2020-09-25T13:44:59 | 297,298,563 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests
from dotenv import load_dotenv
import os
load_dotenv()
GITHUB_APIKEY = os.getenv("GITHUB_APIKEY")
def get_github(endpoint, apiKey=GITHUB_APIKEY, query_params={}, return_links=False):
"""
Get data from github using query parameters and passing a custom apikey header
"""
# Compose the e... | UTF-8 | Python | false | false | 891 | py | 11 | api.py | 9 | 0.666667 | 0.6633 | 0 | 31 | 27.741935 | 84 |
princejaiswal03/DjangoProject | 11,639,361,373,663 | e1fc197227407c8c2dcf271b234ab9421f9a9960 | f6f046dfeaacfcc2098b3bf313d1854937b92486 | /justForFun/ResumeParsing/admin.py | a6f36408b8f130dfe553fb45bd619eb48d4816e9 | [] | no_license | https://github.com/princejaiswal03/DjangoProject | 2482f93640651617262e76c84095d99c8ff57031 | d761ade6c2c4081d4468c4f001bee2e37b067121 | refs/heads/master | 2020-04-13T12:32:12.879449 | 2018-12-26T18:01:15 | 2018-12-26T18:01:15 | 163,205,274 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import admin
from .models import ResumeParsing
# Register your models here.
admin.site.register(ResumeParsing)
| UTF-8 | Python | false | false | 132 | py | 8 | admin.py | 4 | 0.825758 | 0.825758 | 0 | 5 | 25.4 | 34 |
cgMuro/State-of-Art | 171,798,698,470 | 165a7dd2eff530583d9c86d5b9e3b3241901f31c | 526cfe8a01e0f7ee0dbdecd835cb85094d58f985 | /DALL•E/transformer/sparse_attention.py | 1d65e8ac02b195779b59d9b9d160dbc64fd3027c | [] | no_license | https://github.com/cgMuro/State-of-Art | f0434088d1d687231649add6f1c1b6aa43c78497 | fcd798262df704dea0438e88cb631376147579ea | refs/heads/master | 2023-06-12T21:06:12.955302 | 2021-07-03T09:33:12 | 2021-07-03T09:33:12 | 345,404,445 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import torch
import torch.nn as nn
import numpy as np
import einops
class Attention(nn.Module):
''' A faster implementation of normal attention (the upper triangle is not computed, and many operations are fused) '''
def __init__(
self,
n_embeddings: int, # Embedding dimension of ... | UTF-8 | Python | false | false | 4,543 | py | 51 | sparse_attention.py | 43 | 0.564825 | 0.544794 | 0 | 114 | 38.850877 | 172 |
SCismycat/MagicPython | 10,084,583,238,444 | 2ee39d23bf38dda11c39aadfc4e0938764bbc019 | f4a7cdd5fc6e3e6c032ac98fc01f6201958e358b | /parallel_python/threading_sync/called_Process.py | 1219777f52eef0088cf3dc7e49a89ec3d251b9fc | [] | no_license | https://github.com/SCismycat/MagicPython | 7ef3d23f25cdcd01049eaa4da6af3e338abdbd2c | 2bef5824aff30f56c6f4e5c7b4c326f062bb36ff | refs/heads/master | 2020-12-06T10:48:07.788462 | 2020-07-27T16:41:28 | 2020-07-27T16:41:28 | 232,444,152 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2020/6/15 22:25
# @Author : Leslee
print("Hi Python")
input = input("Please Enter:")
print("关闭线程")
| UTF-8 | Python | false | false | 165 | py | 27 | called_Process.py | 25 | 0.592357 | 0.509554 | 0 | 8 | 18.625 | 30 |
jayleicn/TVRetrieval | 5,738,076,322,830 | 8a012f8bf85371d25c003aca63111640441c92a9 | 098e9d4eed49a0e4573d67022d78e85fd6d2944a | /baselines/crossmodal_moment_localization/model_xml.py | a0c4b9dd670f6a8d299fc17da2a744418cf759ec | [
"MIT"
] | permissive | https://github.com/jayleicn/TVRetrieval | 36db2714b7a0c16c5fdfc2a69dd213bdc41e0670 | d99a9ea7e724249047d6357f2a607c7ae256f8c6 | refs/heads/master | 2022-09-16T05:26:28.845738 | 2022-08-20T22:13:18 | 2022-08-20T22:13:18 | 236,402,810 | 141 | 28 | MIT | false | 2021-06-22T23:18:00 | 2020-01-27T01:41:06 | 2021-06-22T03:33:35 | 2021-06-22T23:18:00 | 55,466 | 78 | 15 | 1 | Python | false | false | import math
import copy
import torch
import torch.nn as nn
import torch.nn.functional as F
from easydict import EasyDict as edict
from baselines.crossmodal_moment_localization.model_components import \
BertAttention, PositionEncoding, LinearLayer, BertSelfAttention, TrainablePositionalEncoding, ConvEncoder
from uti... | UTF-8 | Python | false | false | 35,047 | py | 74 | model_xml.py | 59 | 0.56293 | 0.553371 | 0 | 641 | 53.675507 | 120 |
zzjlogin/mydoc | 14,654,428,431,666 | 6b2d4da667b54d758a8574d359ce4e7aefeeef2b | a1a0d4ea9cd8d84b9e85fff3f56ae3ec605cf4a6 | /source/demo/argparse/class/07-formatter_class.py | 7776852d85ca9e0463f40cdd54fc23db5364a5ac | [] | no_license | https://github.com/zzjlogin/mydoc | 20007b85a44950d07530c18011b4108af83e3c7a | abe0b08c3b6acf8508152f80ab07915441ab3aab | refs/heads/master | 2023-06-04T07:31:09.812638 | 2021-06-19T19:15:41 | 2021-06-19T19:15:41 | 146,100,219 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import argparse
parser = argparse.ArgumentParser(
prog="test",
description="测试formatter_class",
epilog="这里是epilog信息",
formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument('--foo', type=int, default=42, help='FOO!')
parser.add_argument('bar', nargs='*', default=[1, 2, 3], h... | UTF-8 | Python | false | false | 737 | py | 568 | 07-formatter_class.py | 29 | 0.760997 | 0.753666 | 0 | 22 | 29.909091 | 69 |
Ledeor/ISU-2-CIM-Converter | 16,501,264,352,710 | 45426971c7f195e120223dffea1ef98fe55da250 | faf1b94fc64b6b58ada9de2a7353b5c9c19bc53c | /cimLocation.py | b40c110b13cdf13ef2667dedca5ee7386f48726b | [] | no_license | https://github.com/Ledeor/ISU-2-CIM-Converter | 1b9963955a10c91b5255f60a4148cd71dc2e63dc | bf693040d347579aa7b1c9e9dc2160efb78ccb14 | refs/heads/master | 2021-01-17T13:18:58.808582 | 2016-06-21T12:19:13 | 2016-06-21T12:19:13 | 59,199,157 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #-------------------------------------------------------------------------------
# Name: module2
# Purpose:
#
# Author: roddi
#
# Created: 17.03.2016
# Copyright: (c) roddi 2016
# Licence: <your licence>
#-------------------------------------------------------------------------------
i... | UTF-8 | Python | false | false | 2,597 | py | 15 | cimLocation.py | 14 | 0.640354 | 0.635348 | 0 | 65 | 37.984615 | 109 |
KB-perByte/CodePedia | 16,192,026,752,663 | bd335dd5e4d6a0878772f99c25037e64f2b2762b | 89d230ad44d17b18897da507725b0a10c32960d8 | /Gen2_0_PP/Assignment/leetcode_combinationSumIII.py | ee799f729513789eb1e3df5026cd4a5a306b41af | [] | no_license | https://github.com/KB-perByte/CodePedia | aeeae87b56cf0ff6e02200cfd6b34da42a007338 | 287e7a3ce981bbf594436cdc06dde23a02b53bb0 | refs/heads/master | 2021-06-19T07:32:53.849871 | 2021-01-23T16:17:27 | 2021-01-23T16:17:27 | 163,250,017 | 0 | 1 | null | false | 2020-03-21T14:39:36 | 2018-12-27T05:13:55 | 2020-03-21T14:39:13 | 2020-03-21T14:39:34 | 119 | 0 | 0 | 2 | JavaScript | false | false | class Solution:
def __init__(self):
self.answer = set()
def helper(self,k,n,ans=set()):
if n<0 or k<0: return
elif n==0 and k==0:
self.answer.add(tuple(sorted(list(ans))))
return
elif n==0 and k>0:
return
for i in range(1,10):
... | UTF-8 | Python | false | false | 519 | py | 435 | leetcode_combinationSumIII.py | 419 | 0.499037 | 0.475915 | 0 | 16 | 31.5 | 65 |
google/clusterfuzz | 8,598,524,543,103 | 6e39e310d65e86955105d84791c61dddb2e81c80 | 3afe7348e830a0c5139fb7cf393736e18b59ab4a | /src/clusterfuzz/_internal/bot/tasks/task_creation.py | 83a2a88710604c699acae0d0d0aedc3c31c66490 | [
"Apache-2.0"
] | permissive | https://github.com/google/clusterfuzz | 00845899e081dbbb89b70a75ce0b7eba3da73b02 | 6501a839b27a264500244f32bace8bee4d5cb9a2 | refs/heads/master | 2023-09-03T17:34:17.821599 | 2023-09-01T16:11:51 | 2023-09-01T16:11:51 | 168,060,021 | 5,420 | 639 | Apache-2.0 | false | 2023-09-13T16:40:54 | 2019-01-29T00:19:40 | 2023-09-13T14:30:24 | 2023-09-13T16:40:53 | 95,720 | 5,077 | 538 | 258 | Python | false | false | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | UTF-8 | Python | false | false | 9,027 | py | 984 | task_creation.py | 510 | 0.723607 | 0.722278 | 0 | 245 | 35.844898 | 80 |
chung1905/skynet-chatbot | 15,195,594,313,800 | 7b7fda16f1d5259f710c135a5579181a6e3348f1 | 15d0b30acfce59191ddd0006449d70f0b7e77470 | /browsers/phantomjs.py | 5fdde598fd84b7fbdcff1f91169426737e3bf6fc | [
"MIT"
] | permissive | https://github.com/chung1905/skynet-chatbot | 700db890bf31c0260d48474328b2d0e5d830163e | 932a45f81f1bb78a49d1c968d325319fd3c4cc73 | refs/heads/master | 2022-08-08T23:00:58.800298 | 2020-04-17T11:09:10 | 2020-04-17T11:09:10 | 256,136,980 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from selenium import webdriver
from os import path
def get_browser(system: str, root_dir: str) -> webdriver.Firefox:
executable_path = path.abspath(root_dir + '/browsers/phantomjs/' + system + '/bin/phantomjs')
return webdriver.PhantomJS(executable_path=executable_path)
| UTF-8 | Python | false | false | 281 | py | 9 | phantomjs.py | 7 | 0.747331 | 0.747331 | 0 | 7 | 39.142857 | 97 |
lderazo1/social_distancing | 111,669,169,437 | 92cdfdb8373d9f4babf0cb102bb017caded40820 | 9f60ec08a351b9b91117c2f7db220bc35c8bf715 | /variables_globales.py | 4fde2269dc1f58e1a000df6de83c81de8c64163b | [] | no_license | https://github.com/lderazo1/social_distancing | 07949dd32dc6441aa99fae9fbc6f158bb2a746b8 | 2a08e1b537ffdb3f408cc1759319d199d76cec10 | refs/heads/master | 2023-06-01T03:42:13.058619 | 2021-06-29T16:47:00 | 2021-06-29T16:47:00 | 381,424,817 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | DISTANCIA = 150 #Distancia segura
#CARGA YOLO V3
YOLOV3_NOMBRES = './yolov3_library/coco.names'
YOLOV3_CONFIGURACIONES = './yolov3_library/yolov3.cfg'
YOLOV3_PESOS = './yolov3_library/yolov3.weights'
#VIDEOS Y SALIDAS
VIDEO_PRUEBA = './videos_prueba/video5.mp4'
SALIDA = './procesado/resultado5.avi' | UTF-8 | Python | false | false | 299 | py | 4 | variables_globales.py | 2 | 0.759197 | 0.70903 | 0 | 8 | 36.5 | 54 |
cormackikkert/competitive-programming | 7,069,516,191,075 | d86c1c3fdb542e5aefc2198f708eeb05b272296f | ce6fc44470dcb5fca78cdd3349a7be70d75f2e3a | /AtCoder/Beginner 150/C.py | e2d9b1e6622e0ce3f06c34b266df79f54e57df6e | [] | no_license | https://github.com/cormackikkert/competitive-programming | f3fa287fcb74248ba218ecd763f8f6df31d57424 | 3a1200b8ff9b6941c422371961a127d7be8f2e00 | refs/heads/master | 2022-12-17T02:02:40.892608 | 2020-09-20T11:47:15 | 2020-09-20T11:47:15 | 266,775,265 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | N = int(input())
P1 = tuple(map(int, input().split()))
P2 = tuple(map(int, input().split()))
import itertools
a = 0
b = 0
for perm in itertools.permutations([i+1 for i in range(N)]):
if perm <= P1:
a += 1
if perm <= P2:
b += 1
print(abs(b - a)) | UTF-8 | Python | false | false | 269 | py | 867 | C.py | 775 | 0.550186 | 0.516729 | 0 | 13 | 19.769231 | 60 |
CapaFenLisesi/KrauthCourse | 6,854,767,815,157 | 26d055de1ded928f92900cd53129cea49aa7ac09 | a246c42ec6a57b06c3b9aee9021fbc3565c4ef01 | /hw_5/A2.py | e736759e7b093687668ed9f82a857baf0b5d4fca | [] | no_license | https://github.com/CapaFenLisesi/KrauthCourse | 478f961657482c5647d8a5dbcc3f4b7a642dffc9 | 83f9cabb2bd69d46dc876a7f6d7eb5af22946c4a | refs/heads/master | 2021-01-22T10:46:53.124079 | 2016-04-23T18:05:08 | 2016-04-23T18:05:08 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random, math,pylab
import numpy as np
def psi_n_square(x, n):
if n == -1:
return 0.0
else:
psi = [math.exp(-x ** 2 / 2.0) / math.pi ** 0.25]
psi.append(math.sqrt(2.0) * x * psi[0])
for k in range(2, n + 1):
psi.append(math.sqrt(2.0 / k) * x * psi[k - 1] -
... | UTF-8 | Python | false | false | 1,298 | py | 2 | A2.py | 2 | 0.55624 | 0.510786 | 0 | 46 | 27.195652 | 111 |
monk-ee/NHDH | 8,349,416,428,559 | 2268ead62fc3055eef95fa9ee8105fc13f8c469a | 8386d45a367d0ba5d330e036a13833973fc260b2 | /NHDH/modules/py_email.py | ae5081c7359f7db3df60c1428f2bd86891a1d8a5 | [
"Apache-2.0"
] | permissive | https://github.com/monk-ee/NHDH | dbee24c6225519a02719d4aa229886760bc5b558 | 93c449bf3135386ecdd7e4ba719446460f54e32c | refs/heads/master | 2021-01-23T13:32:00.024644 | 2014-06-27T05:35:35 | 2014-06-27T05:35:35 | 14,386,258 | 3 | 2 | null | false | 2014-08-21T05:50:30 | 2013-11-14T05:39:38 | 2014-06-27T00:31:02 | 2014-06-27T05:35:37 | 29,448 | 1 | 2 | 4 | JavaScript | null | null | import smtplib
from NHDH import app
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
def py_email(SUBJECT, BODY):
"""With this function we send out our html email"""
for recipient in app.config['CONFIG']['recipients']:
# Create message container - the correct MIME t... | UTF-8 | Python | false | false | 1,576 | py | 29 | py_email.py | 17 | 0.631345 | 0.628173 | 0 | 38 | 40.5 | 121 |
zhencliu/turtle | 17,291,538,350,332 | c6e6d8d0e54e3e7c75e405593564901d50eae972 | 0a6b3ccafcafa517c3505d46c45adc3cb5e5511d | /arithmetic/expression.py | 6ac69024ed124c5c3c64ac885b66c6999e82903b | [] | no_license | https://github.com/zhencliu/turtle | 3fba0d4e1bf879c21f820cd8d766964422d0bc86 | 6142566a5967be17b616b3db153136b4b521b814 | refs/heads/master | 2020-09-23T01:01:07.141612 | 2019-12-02T11:40:51 | 2019-12-12T06:29:52 | 225,360,867 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
class Expression(object):
def __init__(self, min, max, operators):
self._min = min
self._max = max
self._operators = operators.split()
self.expr = None
self.result = None
def gen_expr(self):
x, y = random.sample(range(self._min, self._max), 2)
... | UTF-8 | Python | false | false | 977 | py | 5 | expression.py | 3 | 0.495394 | 0.489253 | 0 | 33 | 28.575758 | 72 |
JoshAddington/blog | 14,577,119,030,839 | 5876120a7e2151b1d4cef2d694af4767eea4dd90 | f60a837fd5f57f211088b120158c2fe04c314deb | /mysite/citibike/tasks.py | 99b25d0105e7710ad209785ce6c030a7a593cca4 | [] | no_license | https://github.com/JoshAddington/blog | a66acb000acf62f53d65373c2c3260d9e3dfeafa | aaa5211f8da339cee0d07b091d275f8a2fdeeb35 | refs/heads/master | 2021-01-21T18:11:52.880115 | 2015-10-28T12:47:08 | 2015-10-28T12:47:08 | 33,373,280 | 0 | 0 | null | false | 2015-10-28T12:47:08 | 2015-04-03T17:01:02 | 2015-10-14T00:07:16 | 2015-10-28T12:47:08 | 5,076 | 1 | 0 | 0 | HTML | null | null | from celery.task.schedules import crontab
from celery.decorators import periodic_task
from celery.utils.log import get_task_logger
from datetime import datetime
from .models import TaskHistory
from .utils import scrape_citibike_json
logger = get_task_logger(__name__)
# schedule scraper to run every ten minutes
@peri... | UTF-8 | Python | false | false | 787 | py | 39 | tasks.py | 26 | 0.72554 | 0.721728 | 0 | 22 | 34.772727 | 70 |
saiprakash1916/python-practice | 15,358,803,054,962 | 6cb4b36517073c49d537cfb27989e38ee166ee68 | 16764e6bc4ef3262d681e5f9aeec4aab38a2ed67 | /assignment 4.py | 3b7200a279fd3679b543e37fea7142e32426686d | [] | no_license | https://github.com/saiprakash1916/python-practice | 9877d584cfb01052a5c0e5340d8cc49acff6f0ed | 560c1d382d9bbaab46c12fa3c36fdeab2bf6eae0 | refs/heads/master | 2023-03-19T13:56:09.731518 | 2021-03-17T01:21:21 | 2021-03-17T01:21:21 | 348,541,516 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Write a Python program in which a student enters the number of college credits earned. If
the number of credits is greater than 90, 'Senior Status' is displayed; if greater than 60,
'Junior Status' is displayed; if greater than 30, 'Sophomore Status' is displayed; else,
'Freshman Status' is displayed."""
credits = i... | UTF-8 | Python | false | false | 529 | py | 50 | assignment 4.py | 49 | 0.720227 | 0.697543 | 0 | 13 | 39.769231 | 92 |
lkry95/Black-Jack | 14,121,852,511,374 | 04f8bdf784c1d1e7322a0dd153beb21780860841 | ede66c9dac612c84efe006efbd270f4aea6dfe86 | /black_jack_game.py | 1f8eec199014f7d4f15c25232dff33769c50aecf | [] | no_license | https://github.com/lkry95/Black-Jack | 99d0366a88ada05c7744b1c90dd10bbe621a37f2 | 8e0f41b92de61e25be7bdcccd6a4d7de668dd250 | refs/heads/main | 2023-02-21T06:48:29.370875 | 2020-12-30T17:44:14 | 2020-12-30T17:44:14 | 317,320,329 | 0 | 4 | null | false | 2020-12-03T20:05:19 | 2020-11-30T19:08:47 | 2020-12-02T14:31:44 | 2020-12-03T20:05:19 | 3 | 0 | 1 | 0 | Python | false | false | import black_jack
def create_deck():
deck_of_cards = black_jack.Deck()
shuffled_cards = deck_of_cards.deck_cards()
return shuffled_cards
def gameplay():
deck = create_deck()
deal_cards = black_jack.Deal(deck)
dealing_cards = deal_cards.deal_cards(deck)
player_hand = dealing_cards[1]
... | UTF-8 | Python | false | false | 2,870 | py | 7 | black_jack_game.py | 3 | 0.553659 | 0.548432 | 0 | 87 | 31.988506 | 89 |
VTantillo/tech_kings3 | 7,318,624,290,992 | edb8129cac95cb9b0aaf5e6de12dc89245304f6c | b231404e355f85b9dbdb9299e8307bc0d012ec17 | /tbms/src/sub_workshop/ws_manager.py | fa3bf49c59a6dab6ba535b27df5168c1616d7f75 | [] | no_license | https://github.com/VTantillo/tech_kings3 | e5df98df259ab533dc9deb4bdb6b4c7c624e9f0d | e8f4e8370cf6dff4d8791d496221caa15f652b5b | refs/heads/master | 2021-09-01T21:28:55.724324 | 2017-12-15T23:20:08 | 2017-12-15T23:20:08 | 111,738,303 | 0 | 0 | null | false | 2017-12-15T23:21:39 | 2017-11-22T22:26:01 | 2017-12-15T23:20:13 | 2017-12-15T23:21:39 | 422 | 0 | 0 | 0 | Python | false | null | """
Interface for the workshop subsystem.
"""
import network_adapter
import snapshot
from workshop_unit import WorkshopUnit
from workshop_group import WorkshopGroup
from virtual_machine import VirtualMachine
from src.sub_db.db_manager import WorkshopDB
import workshop_unit
import workshop_group
def create(item_name,... | UTF-8 | Python | false | false | 1,616 | py | 72 | ws_manager.py | 47 | 0.581683 | 0.581683 | 0 | 65 | 23.861538 | 109 |
heamabc/MyProjects | 12,403,865,556,304 | 3648758546ac6217dfd77d30c7c774cdbc5dd7b7 | 6b1327647debe40d47dd1eb6f7d8c6598e26ad1a | /PortMgmt/Python/UpdatePortfolio/mgmtPort.py | 637978276641b5feb849daa6e8aae5483c71c21e | [] | no_license | https://github.com/heamabc/MyProjects | 0e6dc718646ca9b525a7228c75e0c02a732fae74 | d1fe8d499f6ef09dcfa788f142dcd6463d9ae987 | refs/heads/master | 2021-09-08T04:32:54.296424 | 2018-03-07T01:43:41 | 2018-03-07T01:43:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Manage Portfolio and update table PortPosition
Created on Feb 1, 2017
@author: ywang
'''
import pandas as pd
from pandas import DataFrame, Series
import sqlalchemy
from urllib.parse import quote_plus
import numpy as np
from numpy import datetime64
SQL_PULL_HOLDING_POSITION = '''
SELECT [TradeDate] AS [Date], ... | UTF-8 | Python | false | false | 7,132 | py | 28 | mgmtPort.py | 10 | 0.589456 | 0.581884 | 0 | 191 | 36.026178 | 137 |
mehak5868/Training | 2,310,692,432,910 | 640f1e1d7dfe1da9a127de51166ccaa86faed6f3 | 33fb697b05475205881d90a0a56d1dae3afdf5ff | /venv/Session16B.py | 0f7c240a681a9dea61c6c218e5e5d58c46351ea0 | [] | no_license | https://github.com/mehak5868/Training | ca3a0c8640df3efd9481b7e473965e6a123105bc | b40d6c6b6291b332856ee50f583f7fb05ad0a401 | refs/heads/master | 2020-04-29T15:46:37.977067 | 2019-04-02T17:04:39 | 2019-04-02T17:04:39 | 176,239,402 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | file =open("idea.xml","r")
data =file.readlines()
for line in data:
print(line)
file.close()
| UTF-8 | Python | false | false | 100 | py | 81 | Session16B.py | 73 | 0.64 | 0.64 | 0 | 5 | 18.4 | 26 |
dennysaug/algoritmo-kruskal | 15,195,594,312,936 | fa5d3a93859a60e2edabbbafe36b0a0b94599a58 | acd35bdb35a0ce950ecdde72db72a86f42c4ac81 | /main.py | 576d9d1184b74a59c098525212d91ed2783077fe | [] | no_license | https://github.com/dennysaug/algoritmo-kruskal | 5516772d5e36bbc44625ba02e233b0d2abdafc1e | d93f35930b763ff8521ce2d1b25bdea0008f7c3a | refs/heads/master | 2021-08-19T14:49:45.870300 | 2017-11-26T18:44:35 | 2017-11-26T18:44:35 | 112,107,232 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
def main():
continua = True
pesos = []
vertice = []
while continua:
os.system('clear')
print "[*] 1 - Adicionar vertice"
print "[*] 2 - Adicionar arestas com os pesos"
print "[*] 3 - Rodar algoritmo de Kruskal"
print "[*] 4 - Sair\n\n"
op = raw_... | UTF-8 | Python | false | false | 1,477 | py | 1 | main.py | 1 | 0.417062 | 0.405552 | 0 | 64 | 22.09375 | 75 |
mik-79-ekb/Python_start | 15,101,105,032,739 | fa922ff31715521b6763d50cc6cac79d3d25b63a | 5ab30e31fbfd7e62551e62ddbe2b74af7975012a | /Lesson_7/HW_7.3.py | 0decebf0318d1ce439d36159952cd175d08d0384 | [] | no_license | https://github.com/mik-79-ekb/Python_start | 141d080eae7a68ec582586ba98893715efaa0972 | f313fa0aca3fe2b40d29cb7bc877a5d98840ef0c | refs/heads/main | 2023-01-23T02:41:19.387760 | 2020-12-12T17:53:59 | 2020-12-12T17:53:59 | 308,719,179 | 1 | 0 | null | false | 2020-12-12T17:54:00 | 2020-10-30T18:58:02 | 2020-11-30T17:29:26 | 2020-12-12T17:53:59 | 23 | 0 | 0 | 0 | Python | false | false | """
Task 7.3
"""
class Kletka:
def __init__(self, index):
self.index = int(index)
def __add__(self, other):
return f'Клетка увеличилась, ее размер стал: {self.index + other.index}'
def __sub__(self, other):
return f'Клетка уменьшилась, ее размер стал: {self.index - other.index}' if ... | UTF-8 | Python | false | false | 1,240 | py | 42 | HW_7.3.py | 39 | 0.5884 | 0.56782 | 0 | 32 | 32.4375 | 150 |
nimra/module_gen | 5,755,256,187,493 | 87dfadf4333b8f87b071340dd312b8b9f524a5d3 | 5b93930ce8280b3cbc7d6b955df0bfc5504ee99c | /nodes/Geron17Hands/B_PartI/D_Chapter4/B_GradientDescent/index.py | 89a67bbbe99b4a411b3624f6ee3c03084f11edbc | [] | no_license | https://github.com/nimra/module_gen | 8749c8d29beb700cac57132232861eba4eb82331 | 2e0a4452548af4fefd4cb30ab9d08d7662122cf4 | refs/heads/master | 2022-03-04T09:35:12.443651 | 2019-10-26T04:40:49 | 2019-10-26T04:40:49 | 213,980,247 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Lawrence McAfee
# ~~~~~~~~ import ~~~~~~~~
from modules.node.HierNode import HierNode
from modules.node.LeafNode import LeafNode
from modules.node.Stage import Stage
from modules.node.block.CodeBlock import CodeBlock as cbk
from modules.node.block.HierBlock import HierBlock as hbk
from modules.node.block.ImageBlock ... | UTF-8 | Python | false | false | 8,250 | py | 2,642 | index.py | 1,350 | 0.67322 | 0.666382 | 0 | 191 | 41.874346 | 122 |
levent-coban/flaskformexamples | 13,434,657,734,627 | 67383546003de4f9957c0e3913dd135dd09bae8c | 6b293f11f65a62de082a8d1cb4123245ed6257a6 | /FORM-GET-EXAMPLE-1/app.py | c37e0623ddd445b99029638b859d05cbb4140ae6 | [] | no_license | https://github.com/levent-coban/flaskformexamples | 2bb0417c4008e622a1aa99baa500d9e5fc6d3942 | a2868e245f61889bd254b20d95a5f52da3c8a87e | refs/heads/main | 2023-04-01T07:41:19.913785 | 2021-03-31T22:48:22 | 2021-03-31T22:48:22 | 353,510,652 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
if request.args:
# request.args: the key/value pairs in the URL query string
# print(request.args['firstname'])
# print(request.args['lastname'])
lst = {
'first_name... | UTF-8 | Python | false | false | 588 | py | 4 | app.py | 3 | 0.581633 | 0.568027 | 0 | 26 | 21.615385 | 67 |
TheJoebus666/Team7Robotics | 2,576,980,424,099 | 982c129269fd60bd945a64bad1fb3a9276880179 | b91a810bf1dde97aa99a39ca95caf5f55f385a54 | /dqn_environment.py | 2b4ece28d9636275261d67b671978648eb3e0d48 | [] | no_license | https://github.com/TheJoebus666/Team7Robotics | 8ea428754c930bced2ef27970d8a53fa2f6e0f4f | c852e9d57f46d77cd4205d208b7b56a3472472fd | refs/heads/master | 2023-05-06T15:30:16.039172 | 2021-04-12T14:18:41 | 2021-04-12T14:18:41 | 352,585,836 | 1 | 1 | null | false | 2021-04-12T14:06:49 | 2021-03-29T09:25:25 | 2021-04-08T14:44:10 | 2021-04-12T14:06:48 | 23,183 | 1 | 1 | 0 | Python | false | false | #!/usr/bin/env python3
#
# Copyright 2019 ROBOTIS CO., LTD.
#
# 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 applicabl... | UTF-8 | Python | false | false | 12,444 | py | 14 | dqn_environment.py | 4 | 0.604147 | 0.594182 | 0 | 337 | 35.925816 | 137 |
IT-corridor/Round-Up | 1,434,519,091,515 | aeae04643062de034ad4f7a5186ad59914cc2c06 | d4831377686b3ff25446af89e2eb0e9e38e68dcb | /main_app/tasks.py | c22655d05ad7a4fd27283f5cc06fb49f2a69d373 | [] | no_license | https://github.com/IT-corridor/Round-Up | 4896484e80cfea4db42a5a7002ccfbb72e03129b | ad757ce1bdedf35b1bdd95096c02fdfed180d4aa | refs/heads/master | 2020-04-03T20:00:04.606916 | 2018-10-31T00:35:05 | 2018-10-31T00:35:05 | 155,543,300 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from decimal import Decimal
import logging
import math
from celery import shared_task
from celery.schedules import crontab
from celery.task import periodic_task
from dateutil import parser
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.core.mail import EmailMessage
f... | UTF-8 | Python | false | false | 28,946 | py | 121 | tasks.py | 69 | 0.520763 | 0.514164 | 0 | 660 | 42.859091 | 196 |
Mrpool96/Python-2020 | 1,924,145,391,679 | d85f951fad966588ad2b99eac0277f3923754a43 | aa534dd11a258dca3b0ab6c0e49355891b046d90 | /Piechart.py | 7daf9e9568a8c2fe9b9a7ce0b8cb93a1b5af6bf4 | [] | no_license | https://github.com/Mrpool96/Python-2020 | b0650171b6d28b1ba7769158d8875dfe9a543d12 | 122b2fc12c1fcd862d53f94f9e30e541640fdc7d | refs/heads/master | 2023-01-03T21:30:35.306675 | 2020-11-01T09:26:16 | 2020-11-01T09:26:16 | 288,363,064 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import matplotlib.pyplot as plt
import numpy as np
y = np.array([35,25,25,10,15])
mylabels = ["one","two","three","four","five"]
myexplode = [0.2,0,0,0,0.3]
plt.pie(y , labels=mylabels , startangle=90, explode=myexplode, shadow = True )
plt.legend()
plt.show() | UTF-8 | Python | false | false | 263 | py | 23 | Piechart.py | 22 | 0.676806 | 0.604563 | 0 | 11 | 23 | 79 |
deemx/myblog | 17,798,344,503,983 | 9b6c0b9b915591c439cdcd55c394fe9b0ff30533 | 748ca0c5dad210a57f8966a20c9976f0e2f0faac | /app/models.py | 69d2c0a6862c59af8a58f1e4ce8238749f287f38 | [] | no_license | https://github.com/deemx/myblog | 7fb6337c6cf184518dfc41a7c931daedb3a616b3 | a03c13af8771c3292300842360985101280f37e0 | refs/heads/master | 2016-09-06T02:57:14.687755 | 2015-09-07T12:06:41 | 2015-09-07T12:06:41 | 40,006,167 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.db import models
from captcha.fields import CaptchaField
from ckeditor.fields import RichTextField
class Tag(models.Model):
name = models.CharField(max_length=255)
def __str__(self):
return '{0}'.format(self.name)
class Post(models.Model):
title = models.CharField(max_length=255)
... | UTF-8 | Python | false | false | 844 | py | 10 | models.py | 7 | 0.667062 | 0.654028 | 0 | 35 | 23.114286 | 50 |
stefan-cross/choraoke | 3,307,124,850,911 | 83e9d9fe26878f03b11511dce3abaf125ca04794 | 6fd59b0c5ccc0240c0cbc15b04ef4eaeb9d8b44b | /backend/ultimate-api/server/tab.py | 9d3e5ecf6d558f0719cc5a8806f166eb19bd4778 | [] | no_license | https://github.com/stefan-cross/choraoke | dcd45ff2ee33623be33051a409736b8a4308b0ae | fe206876d5c2dd8078ae6a9c1d97e55bc9f34aa4 | refs/heads/main | 2023-01-20T14:10:11.431567 | 2020-11-30T08:29:57 | 2020-11-30T08:29:57 | 316,743,439 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from typing import Any
# tab {
# title: "tab name",
# artist_name: "",
# author: "",
# capo: "" (can be null),
# Tuning: "" (can be null),
#
# lines: [
# {
# type: "chord" (OR "lyrics", "blank"),
# chords: [
# {
# note: "G",
# ... | UTF-8 | Python | false | false | 3,473 | py | 9 | tab.py | 5 | 0.523179 | 0.521163 | 0 | 121 | 27.702479 | 140 |
Mantabit/python_examples | 10,471,130,316,860 | 26097d30c9001583aad5c186060ea6c6fb1f8ebc | ed6dd94781e3022f230050284d2ddd3554cc0772 | /pyqt/basic_gui.py | 75cf9caea72edead569cdbbe8ce763c7c436e06e | [] | no_license | https://github.com/Mantabit/python_examples | 602d4f4237dbc2044d30dc5482e3e2dee4d90fb6 | 516dbb9cc63c7de5bfe7d0e79477dff9ff340a5d | refs/heads/master | 2021-07-04T08:26:38.007606 | 2020-08-17T10:09:04 | 2020-08-17T10:09:04 | 153,170,298 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Jul 24 12:21:39 2020
@author: dvarx
"""
from PyQt5.QtWidgets import QApplication,QLabel,QWidget,QVBoxLayout,QPushButton,QHBoxLayout,QSlider
from PyQt5.QtCore import Qt
app=QApplication([])
def top_btn_cb():
global topbutton
topbutton.setText("Clicked Top")
def slid... | UTF-8 | Python | false | false | 1,318 | py | 43 | basic_gui.py | 37 | 0.789833 | 0.770865 | 0 | 59 | 21.355932 | 99 |
santoshr1016/WeekendMasala | 13,048,110,653,875 | 5de04ce814bb03adea8d9fad50da5a2bb0ba3da6 | b41da6f351f27bf0d45a4e4d0e1be8f3a86f4b64 | /itsybitsy/test_torus.py | 3c045886bf0539e377139576af44a37c1387e230 | [] | no_license | https://github.com/santoshr1016/WeekendMasala | a5adbabe0b78cde567667376d7ddf05bb505a0ff | e099f9ac9677f7acb8faf620af94a06d76cae044 | refs/heads/master | 2020-03-26T00:26:32.649429 | 2019-08-30T07:32:24 | 2019-08-30T07:32:24 | 144,320,624 | 0 | 0 | null | false | 2019-06-03T23:08:00 | 2018-08-10T18:36:38 | 2019-06-03T22:55:20 | 2019-06-03T23:07:59 | 2,764 | 0 | 0 | 0 | Python | false | false | import time
def dp_way(str1, start, end, dp):
# base cases
# print("DP Way")
# print(timeit.timeit())
if start > end:
return 0
if start == end:
return 1
#case 1
if dp[start][end] == 0:
if str1[start] == str1[end]:
dp[start][end] = 2 + dp_way(str1, start... | UTF-8 | Python | false | false | 1,400 | py | 231 | test_torus.py | 205 | 0.581429 | 0.55 | 0 | 65 | 20.538462 | 65 |
valentyntroyan/Homework_PyCharm | 7,619,272,024,174 | 45b5407f10403c3a5ab68d8acff56c11efac2c39 | 3363a24d65383a5a064fa6602bb37df7d075fe31 | /homework_1.py | 20e26e7a051aa5c33ff2f686340f2de49cafd4d3 | [] | no_license | https://github.com/valentyntroyan/Homework_PyCharm | a7e79c9c1633ae7c51d230928824306e2bcee5c2 | af258b696e324fd8c6602a74acab564b1ad4f5ea | refs/heads/master | 2020-11-25T01:55:33.663037 | 2019-12-16T17:49:08 | 2019-12-16T17:49:08 | 228,438,560 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | print('Hello world!')
print('Second Commit')
print('Third Commit') | UTF-8 | Python | false | false | 66 | py | 1 | homework_1.py | 1 | 0.727273 | 0.727273 | 0 | 3 | 21.333333 | 22 |
michaelkook/GraphLab | 10,651,518,897,302 | 835ce1ed563c0bdd1ce7b5d850b73b77583393c8 | bac60efbee14e6e7a2b637593e7b5ca08671d212 | /makesnapgraphs.py | 1e0f892d6318e4b62ed19a94a38b981ea4c4bbcf | [] | no_license | https://github.com/michaelkook/GraphLab | 96fb813927c148376bc239f3a228d4f9c233a116 | 466a732ccd429afc47dd83c4b2745220a060c321 | refs/heads/master | 2016-09-16T15:58:14.093239 | 2012-11-28T21:50:58 | 2012-11-28T21:50:58 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import scipy.io as sio
import sys
from glob import glob
def maketsv(G_dir, toDir):
for gr in glob(os.path.join(G_dir,'*')):
G = sio.loadmat(gr)['fibergraph']
f = open( os.path.join(toDir,getBaseName(gr)+".tsv"),"w")
for row in G.indices:
nnz = G[row,:].nonzero()[1]
for ... | UTF-8 | Python | false | false | 1,038 | py | 3 | makesnapgraphs.py | 2 | 0.526012 | 0.514451 | 0 | 44 | 22.590909 | 67 |
junyi1997/pi_livenet | 16,810,502,034,550 | be4cce6274ad68fe2a87e4742fa50f94cc078ca8 | a53c2f957f3b85b7f4271a63ca57a70246ac7937 | /GUIdemo.py | 8158efa4849526ed68ee11898d64753f6f9d8ff8 | [] | no_license | https://github.com/junyi1997/pi_livenet | 20e19b5fa6f8b1ac3e2e9bcddee52579b31d6cd2 | 4c92c953eb3e7aae328b3e39c21d254513d69d4d | refs/heads/master | 2023-07-07T12:54:27.872056 | 2021-08-16T01:36:26 | 2021-08-16T01:36:26 | 395,272,413 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tkinter as tk
from tkinter import ttk
import tkinter.messagebox as messagebox
import pickle
from PIL import Image,ImageTk
from tkinter import Scrollbar, Frame
from tkinter.ttk import Treeview
# import BotSpeak
# list_name = ["Adela Chen","Bonnie Lin","Allan Lin","M10907716","M10907306","M10907324"]
# list_visit ... | UTF-8 | Python | false | false | 7,508 | py | 5 | GUIdemo.py | 3 | 0.531427 | 0.491789 | 0 | 201 | 34.144279 | 131 |
IDJack/leetcode | 936,302,906,243 | 33a27c9597e8d7ea12e2af6e9eadd87e37f9aef8 | 0d15fb1a34f7ff90811f679e4870e826d1da0ee4 | /python3/905_sort_array_by_parity.py | a03cc18843ff0771fcb14c2729d706593d104d17 | [] | no_license | https://github.com/IDJack/leetcode | e405f7acbb6448ff4a77d4ce3acb9ed097068837 | b17d972028e8b8f323ee7d9f2347f88e0f548ea9 | refs/heads/master | 2020-03-31T17:04:23.444593 | 2018-10-13T08:28:31 | 2018-10-13T08:28:31 | 149,770,688 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def sortArrayByParity(self, A):
"""
:type A: List[int]
:rtype: List[int]
"""
# 两指针
start,end = 0,len(A)-1
while start < end:
while start <= len(A)-1 and A[start] % 2 == 0:
start += 1
... | UTF-8 | Python | false | false | 639 | py | 21 | 905_sort_array_by_parity.py | 20 | 0.3552 | 0.3328 | 0 | 23 | 25.826087 | 58 |
audiolion/py-fitness | 16,552,803,989,744 | b596e6d89cda17940323f4de1d0a8d07ddf54aa2 | 7d60588702280c7f8c6477e7703528bb860aaa4a | /py_fitness/py_fitness/workout/migrations/0013_remove_workout_editor.py | 05d89b76f95431f5ea6672a2a0a7643a193db50a | [
"MIT"
] | permissive | https://github.com/audiolion/py-fitness | 7e420c4ef6e10ff122fc4f30309cd428d4d5bc38 | 9e0ca785c73a07cb788685bbde6e840a7a2e3419 | refs/heads/master | 2021-05-01T10:16:22.214094 | 2017-01-02T02:03:51 | 2017-01-02T02:03:51 | 68,249,682 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-29 03:27
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('workout', '0012_auto_20161025_2102'),
]
operations = [
migrations.RemoveField(
... | UTF-8 | Python | false | false | 394 | py | 52 | 0013_remove_workout_editor.py | 32 | 0.591371 | 0.507614 | 0 | 19 | 19.736842 | 48 |
mattgiltaji/miscutils | 10,849,087,416,738 | 093610ba6f2cba0e977f6c0183b920828188e160 | 76192cb0921ef817df5ea9fcc438b127416e607d | /tests/test_filtermanuel.py | 56e5660c4746d72a9d3bb3ba73ed029ec9ffe7e4 | [] | no_license | https://github.com/mattgiltaji/miscutils | 6138dade31bec633d7e4a93c0b5b2039647362f3 | a116edde88efdd30c6f6c8142d0422150c7744cf | refs/heads/main | 2022-08-29T22:49:20.069735 | 2020-02-24T04:15:33 | 2020-02-24T04:15:33 | 86,417,700 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Tests for filtermanuel.py
# run from miscutils dir as:
# python -m pytest tests/test_filtermanuel.py
from os import path
import pytest
import filtermanuel.filtermanuel as fm
# paths to test files and such
current_dir = path.dirname(path.abspath(__file__))
test_data_dir = path.join(current_dir, 'files... | UTF-8 | Python | false | false | 8,105 | py | 24 | test_filtermanuel.py | 8 | 0.584105 | 0.578428 | 0 | 214 | 35.864486 | 80 |
nuaays/apiserver | 19,009,525,258,254 | 2ce86ff550e67d52c2597c07f5143c4e8955dd4a | 6db9ad22b62c137b7401f4b510bf0042cc42291b | /api/member_card/a_member_card.py | abec158c5fbb686aa1172da0bcfef2f827671efe | [] | no_license | https://github.com/nuaays/apiserver | 413a9e1d0b1a76878ae2d449ab24cc439896b977 | 15621db1a64ffe199619924b75a5b5c5e6416bed | refs/heads/master | 2021-01-20T08:07:45.930902 | 2017-03-30T08:40:46 | 2017-03-30T08:40:46 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
个人中心-VIP会员
"""
from eaglet.core import api_resource
from eaglet.decorator import param_required
from business.member_card.member_card import MemberCard
class AMemberCard(api_resource.ApiResource):
"""
个人中心-VIP会员
"""
app = 'member_card'
resource = 'member_card'
@param_required([])
de... | UTF-8 | Python | false | false | 1,812 | py | 370 | a_member_card.py | 274 | 0.675 | 0.674342 | 0 | 60 | 24.333333 | 67 |
brightforme/python-bright | 6,777,458,416,620 | 121aea16487b7e8434fd4e85888cb9044ca22ec8 | a52d446dfdef8f1de7317dca64f1f84bc2d5c783 | /tests/test_collections.py | 904423018a0c2a81c2f90c1edafec4d3ba7ebafa | [
"MIT"
] | permissive | https://github.com/brightforme/python-bright | 97fb2bc85192ffcd35e6b991ffdeb0cd157232d1 | 8366ddf411e237e2a440a578df3d1b0c99cd67ca | refs/heads/master | 2020-02-26T16:01:31.772349 | 2016-10-03T08:25:01 | 2016-10-03T08:25:01 | 38,366,308 | 0 | 0 | null | false | 2015-08-25T13:45:43 | 2015-07-01T10:57:56 | 2015-08-05T11:50:14 | 2015-08-25T13:45:43 | 191 | 0 | 0 | 0 | Python | null | null | import unittest
import bright
from tests import settings
from bright.helpers import Forbidden, ResourceNotFound
class CollectionTests(unittest.TestCase):
@classmethod
def setupClass(self):
scopes = ["collections:read", "collections:write", "collections:like",
"artworks:read", "use... | UTF-8 | Python | false | false | 5,449 | py | 12 | test_collections.py | 9 | 0.594605 | 0.593136 | 0 | 139 | 38.201439 | 95 |
fajriansyah1127/cash_io | 14,224,931,697,925 | e74ddfda77120bb26d5e1669ddd51e3d6b99b8df | 7bde0b3ea9d47b5d53eb3687f2ca67378ad19a26 | /test.py | 4043f73557f39544d198bc34518c1fe6aecf99db | [] | no_license | https://github.com/fajriansyah1127/cash_io | f72da3743c58e2b5b642c303facaca8172f58804 | 9c5d3676ebfeb1cbdf9095bc760fae9f513a10f2 | refs/heads/main | 2023-06-03T07:19:11.262844 | 2021-06-17T00:49:49 | 2021-06-17T00:49:49 | 364,286,703 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Flask, request,render_template,jsonify, make_response
from werkzeug.security import generate_password_hash, check_password_hash
from flask_restful import Resource, Api
from flask_cors import CORS
from mysql.connector import MySQLConnection
# import mysql.connector
import json
import uuid
impor... | UTF-8 | Python | false | false | 12,794 | py | 2 | test.py | 2 | 0.557371 | 0.55315 | 0 | 317 | 38.365931 | 130 |
OmerTariq-KAIST/dnn-based_indoor_localization | 9,302,899,163,815 | bcfcbedb2d3631e24b2ddd8a416ed2f9b4a41f0f | daf0b7391abf35e6bbd9d9b9759c23c2ce64a201 | /models/simo_hybrid_tut_batch-run.py | 26851f39d0e40551ce6a8cc1a1765692417281f4 | [
"MIT"
] | permissive | https://github.com/OmerTariq-KAIST/dnn-based_indoor_localization | 693ae4fe8a1801c7952e8e583710b49d41231b8d | 39e6a60fbd5095b714f6e158f1b933acc435a982 | refs/heads/master | 2023-03-15T13:28:10.074274 | 2020-12-09T04:00:59 | 2020-12-09T04:00:59 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, '../models')
sys.path.insert(0, '../utils')
from simo_hybrid_tut import simo_hybrid_tut
from mean_ci import mean_ci
import argparse
import datetime
import numpy as np
from num2words import num2words
# set coordinates loss weight usi... | UTF-8 | Python | false | false | 3,033 | py | 25 | simo_hybrid_tut_batch-run.py | 24 | 0.658424 | 0.619189 | 0 | 83 | 35.542169 | 170 |
NilNoyon/BACS | 11,476,152,661,113 | 408286dd3975c75403ca04ccfecb3a5c83e370f1 | c6c5dbf05be9dac2a2a4533a1efa7bcaf1c23a06 | /BACS/clients/urls.py | 41f59d1aabf510888c5627e231d46434ac79c170 | [] | no_license | https://github.com/NilNoyon/BACS | 9c54e4a440de79a8a39e13c29956583a5476c07f | 6efdb3d18caa5c08ffef3632afd7d622aedee3b0 | refs/heads/master | 2022-12-13T13:25:44.973194 | 2019-08-26T21:02:24 | 2019-08-26T21:02:24 | 195,283,228 | 0 | 0 | null | false | 2022-12-08T05:55:36 | 2019-07-04T17:59:26 | 2019-08-26T21:02:38 | 2022-12-08T05:55:36 | 7,739 | 0 | 0 | 4 | HTML | false | false | from django.urls import path
from clients.views import *
from . import views
# CLIENTS SECTION
urlpatterns = [
path('dashboard/', views.dashboard_client, name='client_dashboard'),
path('update_profile/', views.update_profile, name='update_profile'),
path('my_profile/', views.my_profile, name='my_profile'),... | UTF-8 | Python | false | false | 547 | py | 35 | urls.py | 17 | 0.700183 | 0.700183 | 0 | 13 | 41.153846 | 82 |
alay3168/XGTestProjects | 15,144,054,688,826 | 16d96f77e59b21103e0b977d04f0909830cb57b2 | 503313e19bfed3f842391f1c2854b7198bb5d09c | /camrea_web_auto_test/TestCase/pytest_demo.py | 326654d01625dccaa00b8a7b314aaf7b763135a2 | [] | no_license | https://github.com/alay3168/XGTestProjects | 264e84aab33f968a704f533577799617175c619b | 01bd4ed3015b28284043cccab54902bd58ce24f8 | refs/heads/master | 2022-11-02T11:11:04.625750 | 2020-10-12T05:04:49 | 2020-10-12T05:04:49 | 250,506,762 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
# content of test_sample.py
def func(x):
return x + 1
def test_answer():
assert func(3) == 5
pytest.main()
| UTF-8 | Python | false | false | 178 | py | 317 | pytest_demo.py | 187 | 0.61236 | 0.589888 | 0 | 12 | 13.833333 | 27 |
dneff/advent2019 | 5,927,054,893,244 | 17084620abe8c3c0e42f46cfc78399a00ae5e208 | ae9a3122bf9fdbb9c38de46acfcefb2440bd4706 | /11/solution.py | 43570d10d8fb5144b4f526bb2a622634468164d5 | [] | no_license | https://github.com/dneff/advent2019 | 683fe9426e196b6a40cd28e6854b22a0a2ddb124 | 5b87b3d20b23370bd623b17e19f4cfce605e2eb6 | refs/heads/master | 2020-11-24T00:50:01.552751 | 2020-01-13T01:27:33 | 2020-01-13T01:27:33 | 227,889,697 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from itertools import permutations
from IntCode import IntCode, InputInterrupt, OutputInterrupt
from collections import defaultdict
def newOrientation(orientation, turn):
if turn == 0:
orientation = (orientation - 1) % 4
elif turn == 1:
orientation = (orientation + 1) % 4
return orientati... | UTF-8 | Python | false | false | 2,808 | py | 27 | solution.py | 26 | 0.494302 | 0.475427 | 0 | 111 | 24.297297 | 85 |
thoas/django-metadata | 4,252,017,632,976 | d54fd069837e037080f271336ca58e5118455b9a | 132e19731444eb30c6c0cea5a3120030af6a9c2a | /metadata/connection.py | 0ea24135dbb2b9881fab2b80ff3f47ad1aac1ec7 | [] | no_license | https://github.com/thoas/django-metadata | d08e5ddf389acac789488a6cd96e976cbb50e13f | a6e3eeac79e3ed36afa1c652db5a8a3d3473507c | refs/heads/master | 2021-01-15T15:47:21.906343 | 2018-06-15T13:02:14 | 2018-06-15T13:02:14 | 10,442,157 | 21 | 1 | null | false | 2014-10-02T13:53:26 | 2013-06-02T20:58:01 | 2014-10-02T09:32:49 | 2014-10-02T13:53:25 | 136 | 8 | 1 | 0 | Python | null | null | from . import settings
from .utils import get_client
client = get_client(settings.REDIS_CONNECTION,
connection_class=settings.REDIS_CONNECTION_CLASS)
| UTF-8 | Python | false | false | 172 | py | 11 | connection.py | 7 | 0.715116 | 0.715116 | 0 | 6 | 27.666667 | 69 |
alimgee/-mollyrose--in-django | 6,966,436,962,629 | fb8b0affbafc8e601d7fa3f2464a959a0f1b2c60 | 5acf3fba7c2937f4b6f22967cae9d26855afbdfb | /help/views.py | cd7690deb0d19b71c4f05e58345632465f56d30e | [] | no_license | https://github.com/alimgee/-mollyrose--in-django | c67638d56409a1a35af3c648be5de55c9a0d5f53 | 07858c332bb7c18dfd61e22dc2b5cd57baccfd37 | refs/heads/master | 2022-12-14T02:27:23.442925 | 2020-09-01T09:11:37 | 2020-09-01T09:11:37 | 287,684,126 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.shortcuts import render
from .models import Organisations
def help(request):
''' function to render homepage'''
organisations = Organisations.objects.all().order_by('position')
context ={
'Organisations': organisations
}
return render (request, 'help/index.html', context) | UTF-8 | Python | false | false | 315 | py | 30 | views.py | 11 | 0.701587 | 0.701587 | 0 | 12 | 25.333333 | 68 |
agussarcee/agussarcee | 13,907,104,121,041 | a6edc55a27cb5aebde9b70434d46ec31e264baf9 | d1cf2b5cf827762bca35c3ebe12b192d9ebec706 | /cat.py | f6250fa489b7da7ee3cd04f60e49cc15b919db66 | [] | no_license | https://github.com/agussarcee/agussarcee | 4e07b5a39673ebb31c199ba281002dd69986f3ad | fdf79eb52c389726a13e4dccf920a0162e312798 | refs/heads/master | 2020-07-20T15:51:40.398474 | 2019-09-13T00:13:58 | 2019-09-13T00:13:58 | 206,672,259 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #muestra los bytes en texto
# 1 - Abrir el archivo
# 2 - Leer el archivo
# 3 - Imprimo en pantalla
# 4 - Cerrar el archivo
NOMBRE = "lorem.txt"
archivo = open(NOMBRE,'r')
contenido = archivo.read ()
print (contenido)
archivo.close()
| UTF-8 | Python | false | false | 235 | py | 8 | cat.py | 8 | 0.693617 | 0.676596 | 0 | 11 | 20.272727 | 27 |
StepanBarantsev/DeepLearn_Numbers | 1,288,490,231,494 | bc4692df50f326a702223a0268da2c65823a8580 | e4526526d8bfb39199f165ebfbf69ccca5376532 | /main2.py | 2d426448687e21e4fbed5d34c33c875f753cd3b1 | [] | no_license | https://github.com/StepanBarantsev/DeepLearn_Numbers | 4d4dd1b3cbe66470f949d71771ded6d61051d862 | afd9374ad338be36a78e472b64d1d44794898330 | refs/heads/master | 2020-07-29T02:29:47.385976 | 2019-09-24T13:39:27 | 2019-09-24T13:39:27 | 209,632,737 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
from skimage.io import imread, imsave
from helper import parse_img, parse_labels, write_weigth_to_file, get_weight
class Neuro2:
# Количество слоев равно количеству имен файлов
# weights_from_file -- булева переменная, отвечающая за то берем ли мы веса из файла
# shapes -- кортежи соде... | UTF-8 | Python | false | false | 3,908 | py | 11 | main2.py | 7 | 0.562032 | 0.536497 | 0 | 83 | 42.361446 | 101 |
AK1737/testRepo | 9,491,877,744,278 | e847a342aabad844c6260233639122644857e271 | b28f166e7f81e3d58868f5d3be6e07fe9483a8af | /Tasks/Kotliarevskiy/bot/bot1.py | fe910a2475a9905542b94a6110029521d143a324 | [] | no_license | https://github.com/AK1737/testRepo | f235a15ecaabe63823e100aac9cfceef6ae69580 | 670b6cd516fb9b6c18ef3a7adb538a7ddb893ed9 | refs/heads/master | 2020-06-03T04:17:26.729074 | 2019-08-05T14:40:03 | 2019-08-05T14:40:03 | 191,435,022 | 0 | 0 | null | true | 2019-06-11T19:14:29 | 2019-06-11T19:14:28 | 2019-05-24T21:23:29 | 2019-05-24T21:23:27 | 83 | 0 | 0 | 0 | null | false | false | from vk_api.longpoll import VkLongPoll, VkEventType
import vk_api
tokenn='d0a27ef71602aca5d4ab459fdf5b3b9e969f6c7f3c39a936949774ef086c87d375f087b8b2aecc51a582f'
vk_session = vk_api.VkApi(token=tokenn)
from vk_api.longpoll import VkLongPoll, VkEventType
longpoll = VkLongPoll(vk_session)
vk = vk_session.get_api()
whil... | UTF-8 | Python | false | false | 593 | py | 24 | bot1.py | 24 | 0.735245 | 0.647555 | 0 | 15 | 38.466667 | 113 |
SemchenkoSergey/port_status_crontab | 19,112,604,501,630 | 572e4e35ed88c3d2978b9f686ffc3efbf7087bce | 4fba426a605e3d29292c3e3b571767f3c829c728 | /resources/Settings.py | 9f6743f00c5ded49c49171ac983639e924b3ccdc | [] | no_license | https://github.com/SemchenkoSergey/port_status_crontab | 341225b9e90f3fb3d244a00c974456300da89749 | fa59036ac0c2e12d3d3d5c7322599362cab08bf8 | refs/heads/master | 2020-03-25T16:58:00.443976 | 2018-08-13T08:25:55 | 2018-08-13T08:25:55 | 143,956,660 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding: utf-8
### Port_Status ###
# Учетные данные DSLAM
login_5600 = ''
password_5600 = ''
login_5616 = ''
password_5616 = ''
#Количество потоков выполнения
threads = 5
#За сколько дней хранить записи
days = 35
#Список DSLAM
hosts = (('ip', '5600'),
('ip', '5616'))
# Mysql
db_host = 'localhost... | UTF-8 | Python | false | false | 535 | py | 9 | Settings.py | 7 | 0.609071 | 0.546436 | 0 | 30 | 14.433333 | 31 |
KyungHoon0126/Algorithm | 6,390,911,367,099 | 078d34e1b6c73623804e9634ac3ada61a5f1c5f0 | f153a36b5e211690ded1af00c0160eebd2add1ca | /이것 취업을 위한 코딩 테스트다 with 파이썬/Greedy/숫자카드게임.py | d89707d43a666928518aaf9ca256bfb8555589c4 | [] | no_license | https://github.com/KyungHoon0126/Algorithm | 47551bbe22c70eac04ed518c2c9c1f65d48ee5b9 | 8369f0e1103d282cdc138666add65dd0ca926e70 | refs/heads/master | 2021-08-17T08:32:09.970502 | 2021-06-22T12:52:22 | 2021-06-22T12:52:22 | 214,456,043 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # 1
# n, m = map(int, input().split())
#
# result = 0
# for i in range(n):
# data = list(map(int, input().split()))
# # 현재 줄에서 '가장 적은 수' 찾기
# min_value = min(data)
# # '가장 작은 수'들 중에서 가장 큰 수 찾기
# result = max(result, min_value)
#
# print(result)
# 2
n, m = map(int, input().split())
result = 0
#... | UTF-8 | Python | false | false | 659 | py | 124 | 숫자카드게임.py | 107 | 0.540395 | 0.524237 | 0 | 31 | 16.967742 | 44 |
flashlan/Curso-Ciencia-da-Computacao-com-Python-Parte-2-Alternative-Solutions | 14,929,306,324,614 | 392a3a656eabd40f68c5c863f3be73cd11a27010 | aca98ac45978308c69c02fd4b56708ccff9f0921 | /dimensoes_matriz.py | c8f087e7a4eecce5b6ae7b9dea14c03b1683cbc1 | [] | no_license | https://github.com/flashlan/Curso-Ciencia-da-Computacao-com-Python-Parte-2-Alternative-Solutions | eaa08b8c698d623dc3f34df5792b7a4f58b3fc8a | c5d15d6d51d9c03b263bc338c25a623a7ff2f447 | refs/heads/master | 2022-08-01T14:53:02.805633 | 2020-05-18T15:24:25 | 2020-05-18T15:24:25 | 260,817,957 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri May 1 12:40:00 2020
@author: pcstream
"""
def dimensoes(matriz):
''' (matriz) --> recebe uma matriz como parâmetro e
imprime as dimensões da matriz recebida, no formato iXj'''
matriz = str(matriz)
colunas = matriz.count("[") - 1
linhas = i... | UTF-8 | Python | false | false | 428 | py | 21 | dimensoes_matriz.py | 20 | 0.58216 | 0.549296 | 0 | 15 | 26.4 | 62 |
onurmatik/LambdaTwitterOAuth | 13,417,477,843,111 | 12fdca52ee430ff2d7397cf19a24b755f5a50f37 | ed84e8fce05f96f088f4c81f4677864fc4c15e4d | /auth.py | 8b110f7fe3fde5a6e0ea1c2201207411e755cd8a | [] | no_license | https://github.com/onurmatik/LambdaTwitterOAuth | 1e28f2434eac34718570c926c63a643a16b07ef3 | b46dc433b53f6e4a93c838fb306e59bc92a400f2 | refs/heads/master | 2021-01-17T17:54:37.283222 | 2016-10-12T15:00:01 | 2016-10-12T15:00:01 | 70,708,232 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import boto3
import json
import twitter
from settings import *
def get_sign_in_token(event, context):
client = twitter.UserClient(
CONSUMER_KEY,
CONSUMER_SECRET,
)
token = client.get_signin_token(
callback_url=CALLBACK_URL
)
return {
'location': token.auth_url,
... | UTF-8 | Python | false | false | 1,327 | py | 2 | auth.py | 1 | 0.574228 | 0.571967 | 0 | 54 | 23.574074 | 75 |
JiajieMo/Hierarchical-Image-Matting-Model-for-Blood-Vessel-Segmentation-in-Fundus-images | 17,386,027,620,053 | 19bdc78f15d4a5b8f4d94a6caed1e89544a417bc | 68b59cdc67b66c2aafacd4718a0568c58cf64d74 | /Vessel Skeleton Extraction.py | c38087bf033c8f5dec7530c8cbc186f761bd44dd | [] | no_license | https://github.com/JiajieMo/Hierarchical-Image-Matting-Model-for-Blood-Vessel-Segmentation-in-Fundus-images | d7ee9bc28cf727fd50ac9dfb4f8619649959d4a3 | 627fdfb2103dc6c0f0cca0bf70bfbaf5069cd24f | refs/heads/master | 2022-12-12T06:33:30.331869 | 2020-09-04T03:35:45 | 2020-09-04T03:35:45 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 28 15:18:18 2019
@author: Adithya
"""
import cv2
import numpy as np
import matplotlib.pyplot as plt
import os
import glob
from PIL import Image
from skimage.exposure import rescale_intensity
from scipy.ndimage import correlate,convolve
import natsort
p... | UTF-8 | Python | false | false | 4,525 | py | 8 | Vessel Skeleton Extraction.py | 5 | 0.560221 | 0.514254 | 0 | 135 | 31.518519 | 91 |
DLu/askbot_crawler | 2,714,419,381,739 | 2985f7a4107c3f1c9e5fc36d179702616179b4cf | da9f1dca0b796ad0fa828d4d66b5e60b232b1aaa | /html_generation.py | 3c47cbd46b1287487269e413d99b95a74cfda576 | [] | no_license | https://github.com/DLu/askbot_crawler | 7931038ae8faf6b6a416b6ef87021eecfe7fe589 | c41f69d4d8768a0df8e82081453e6bf3494055e6 | refs/heads/master | 2021-05-16T02:24:12.690704 | 2018-06-19T20:51:18 | 2018-06-19T20:51:18 | 28,569,962 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
JQUERY_LINKS = """
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js"></script>
<link href="http://cdn.datatables.net/1.10.4/css/jquery.dataTables.css" rel="stylesheet" type="text/css"/>
"""
INFINITY_SORT = """
<sc... | UTF-8 | Python | false | false | 1,589 | py | 11 | html_generation.py | 9 | 0.53241 | 0.520453 | 0 | 58 | 26.396552 | 115 |
qingkediguo/QQMusicAPI | 11,441,792,903,657 | 25de8732cfbb07b8db04f002a852b42a55152cde | b9eba831b971cc3bc6d10c9cbfad759bb382d152 | /QQMusicAPI/song.py | dc41f08d20eea18b07691cbd66ad375c1a862426 | [] | no_license | https://github.com/qingkediguo/QQMusicAPI | 564315f3e9d2842133d5fbee1788a2f89b4018b5 | 1ea6af0415bc3620fdbe735a63fc5b6242e67d85 | refs/heads/master | 2020-04-16T17:46:15.121908 | 2018-12-22T13:09:23 | 2018-12-22T13:09:23 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
import time
import json
import base64
import re
import math
import requests
from bs4 import BeautifulSoup
class Song(object):
def __init__(self, mid, **kwargs):
self.guid = int(random.random() * 2147483647) * int(time.time() * 1000) % 10000000000
self.headers = {
"cookie... | UTF-8 | Python | false | false | 5,228 | py | 8 | song.py | 7 | 0.516194 | 0.495602 | 0 | 160 | 30.2625 | 118 |
CLSPhila/RecordLib | 3,547,643,039,848 | 3d9564c56fb4401fa13e38df192bd84c9e5d68b5 | 7c7f6571373779bffd934c6c8c3441335b7b7319 | /cleanslate/migrations/0008_auto_20200818_1943.py | c29d6e951376e1769ac91b9f79dc4b86fbf61782 | [] | no_license | https://github.com/CLSPhila/RecordLib | efffcf002b369e0beab83ab9ea4ffc9693a28a2c | 3b870fc9026c180455d9953a87e903725de3415d | refs/heads/main | 2021-07-22T04:02:30.271885 | 2021-07-07T20:37:01 | 2021-07-07T20:37:01 | 191,973,008 | 8 | 7 | null | false | 2021-07-22T14:50:27 | 2019-06-14T16:13:29 | 2021-07-07T20:37:10 | 2021-07-22T14:50:26 | 3,982 | 7 | 7 | 6 | Python | false | false | # Generated by Django 2.2.13 on 2020-08-18 19:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cleanslate', '0007_sourcerecord_parse_status'),
]
operations = [
migrations.AddField(
model_name='userprofile',
nam... | UTF-8 | Python | false | false | 1,151 | py | 280 | 0008_auto_20200818_1943.py | 231 | 0.562989 | 0.534318 | 0 | 38 | 29.289474 | 63 |
thorcc/Programmeringskurs-Sandvika | 15,607,911,164,926 | 4d9328fac15cef7cb9f6f057f7d049d343219b8b | 6f07e3222e3f7810a302ce9a54f266013109f827 | /diverse/gpx-to-csv.py | 84767a982fe90eea056a65ae081b2a207aef460b | [] | no_license | https://github.com/thorcc/Programmeringskurs-Sandvika | 4539657109204e83a205e40608ff8a6fa71c17a6 | b710a9aa2b3f151648ed55ecb1fe8de64e4cbb4a | refs/heads/master | 2023-08-30T16:10:44.894358 | 2021-11-17T11:10:36 | 2021-11-17T11:10:36 | 427,966,322 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Program som konverterer gpx-filer til csv-filer
# Programmet krever pakken gpx_converter
# Åpne terminalen/CMD og kjør kommandoen: pip install -U gpx-converter
from gpx_converter import Converter
from datetime import datetime
input = "kolsaastoppen_med_Eirik.gpx"
output = "kolsaastoppen_med_Eirik.csv"
Converter(i... | UTF-8 | Python | false | false | 811 | py | 13 | gpx-to-csv.py | 4 | 0.697157 | 0.684796 | 0 | 24 | 32.708333 | 79 |
gdennany/BlockChainProgramming | 1,975,684,989,018 | 59565a9cd2c97674c1af0797de4d9183925689dd | e0709305da506cc2377f4980dbfecda71ed84b61 | /BlockChain/Transaction.py | 9d4c484ac17f90b077609e9e0c1385c40c0f5458 | [] | no_license | https://github.com/gdennany/BlockChainProgramming | a4c69eed522514b9689e80861dc883d5e11d48d9 | a112e7998316be6f0206d13e904e3a20b1f0ac24 | refs/heads/master | 2021-04-22T02:40:36.989679 | 2020-04-05T21:07:21 | 2020-04-05T21:07:21 | 249,844,552 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import Signatures
#Tx abbreviates transaction
class Tx:
inputs = None #list of input address
outputs = None #list of output addresses and amounts
sigs = None #list of signatures
reqd = None #list of required signatures that are not inputs (to facilitate escrow transactions)
def _... | UTF-8 | Python | false | false | 5,064 | py | 12 | Transaction.py | 12 | 0.561216 | 0.534163 | 0 | 171 | 28.573099 | 131 |
kakulukia/schlampenadmin | 15,522,011,808,931 | 3278451da3ee086c015d832fabfacce8025cb563 | d372a147f8c715cec041dbe51912983f1b9c1675 | /swing_admin/migrations/0002_auto_20170828_1510.py | ed1d83c5cdc2a3a738f9d3a74104fd9fc1566f01 | [] | no_license | https://github.com/kakulukia/schlampenadmin | b521fa617cd714bcab24ded8b8832fd9373cb598 | 6586237222a7a7a10dac159b40563e51433e27cd | refs/heads/master | 2021-12-28T19:04:41.764966 | 2021-04-09T09:20:20 | 2021-04-09T09:20:20 | 41,327,236 | 1 | 0 | null | false | 2021-09-10T17:58:29 | 2015-08-24T21:10:48 | 2021-04-09T09:20:23 | 2021-09-10T17:58:28 | 352 | 1 | 0 | 5 | JavaScript | false | false | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-28 15:10
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('swing_admin', '0001_squashed_0006_remove_news_image'),
]
operations = [
migrations.... | UTF-8 | Python | false | false | 611 | py | 17 | 0002_auto_20170828_1510.py | 10 | 0.585925 | 0.545008 | 0 | 23 | 25.565217 | 77 |
unixorn/themis-lambda | 4,063,039,075,953 | 3dc5372738ed093e2a348224f357078b5f7491e9 | 3a8b40f704695b68b546884db7aa3c16d4608fc3 | /themis_lambda.py | 2b3150d812c2dcd09c308e1edc29e6792f272457 | [
"Apache-2.0"
] | permissive | https://github.com/unixorn/themis-lambda | 893a879a715f6f83e504ed808e9949289dc96aa0 | f69eb0c8285cdab13afa78e9a6eac176464ae411 | refs/heads/master | 2021-10-12T02:36:08.921032 | 2019-01-31T19:17:20 | 2019-01-31T19:17:20 | 105,590,188 | 1 | 0 | Apache-2.0 | false | 2019-01-31T19:17:21 | 2017-10-02T22:07:47 | 2018-01-16T15:33:03 | 2019-01-31T19:17:20 | 15 | 1 | 0 | 0 | Python | false | null | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Copyright 2018-2019 Joe Block <jpb@unixorn.net>
#
# 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/LIC... | UTF-8 | Python | false | false | 11,185 | py | 4 | themis_lambda.py | 1 | 0.663657 | 0.658829 | 0 | 292 | 37.304795 | 107 |
daggy1234/oauthcord | 10,496,900,101,306 | ba6c4ec498e4d6041d296a68db44f5799ba74759 | 50615491f27a33455f7f67ca1e9cc00e2958115b | /oauthcord/application.py | 0f0ec872945b6f4421faab090e9f9168992310cf | [
"MIT"
] | permissive | https://github.com/daggy1234/oauthcord | 77bb73f8b0ba909cabc866cbb827be08dcf12959 | baf919e6008dfccf90bcb82d01f36a3b89467680 | refs/heads/master | 2023-06-24T21:39:14.321436 | 2019-09-17T12:16:23 | 2019-09-17T12:16:23 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Application(object):
"""
Much like a user object, but for the current application
"""
__slots__ = ("id", "name", "icon", "description", "rpc_origins", "bot_public", "bot_require_code_grant", "owner")
def __init__(self, dict):
# Take out everything that we inherited from the GET /oaut... | UTF-8 | Python | false | false | 788 | py | 7 | application.py | 6 | 0.583756 | 0.582487 | 0 | 24 | 31.875 | 117 |
7u83/maxdb-buildtools | 6,536,940,270,656 | 48ea8885b353074b69c41c57407a743939c7b9f3 | e987cd566edc75997f9b02377514d4f3a0dba12c | /sys/src/Python/vmake/dependencies.py | e8913a17664fa363f757be05cfa22353f30dfa4c | [] | no_license | https://github.com/7u83/maxdb-buildtools | f942adff2cd55d0a046b6ef3e18f6645b011a26e | ce9a56943f6195d6755e983035aa96cbe95e6cb2 | refs/heads/master | 2020-05-04T18:23:30.849371 | 2015-02-15T19:25:49 | 2015-02-15T19:25:49 | 30,428,297 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
#
# ========== licence begin GPL
# Copyright (C) 2001 SAP AG
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any late... | UTF-8 | Python | false | false | 5,339 | py | 1,027 | dependencies.py | 234 | 0.533808 | 0.526316 | 0 | 169 | 30.568047 | 80 |
Xuan4dream/Leetcode | 549,755,862,177 | 09133b1602353984776d448d7106d77accc6f50e | 0ed666fb3219f919a5f1549609340ac0405ac5f0 | /M_1041. Robot Bounded In Circle.py | 58fce6bcea5d30da255bdd59aeae47e5531af5e5 | [] | no_license | https://github.com/Xuan4dream/Leetcode | 086cdbbbe53a8a7f287de57e02e31cca2ed6db05 | 013c16574fd6082ae80aa074f1d9579a077261b7 | refs/heads/main | 2023-04-15T00:50:03.699455 | 2021-04-30T04:00:51 | 2021-04-30T04:00:51 | 346,591,422 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[44]:
class Solution(object):
def isRobotBounded(self, instructions):
"""
:type instructions: str
:rtype: bool
"""
# refered to solution:
# 0- north, 1- east, 2-south, 3-west
directions = [[0, 1], [1, 0], [0, -1... | UTF-8 | Python | false | false | 1,683 | py | 30 | M_1041. Robot Bounded In Circle.py | 30 | 0.423648 | 0.383838 | 0 | 58 | 28 | 77 |
Yizhou-Yang/tagger | 13,091,060,320,963 | a462ee8f5f049cae754561c0d7cd7fe36aad6801 | 65ca2bca6c9ce0262c70f026a28826f98a845473 | /tagger.py | aecefa1ac7c8b7b883ccd5c7c9c18d6e27622687 | [] | no_license | https://github.com/Yizhou-Yang/tagger | 73c1297ebfd73c451ca95ee6d0fbac7c5d6a66b2 | c37a16c29d9e632bfc8941d5d1bb681945187c19 | refs/heads/main | 2023-05-08T05:41:13.271237 | 2021-06-01T19:41:57 | 2021-06-01T19:41:57 | 372,942,162 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Currently reads in the names of the training files, test file and output file,
# and calls the tagger (which you need to implement)
import os
import sys
import re
import math
import numpy as np
#this is vanilla viberti taught in lecture
#take log for the probability before nomalizing, and preload all probab... | UTF-8 | Python | false | false | 8,543 | py | 1 | tagger.py | 1 | 0.550977 | 0.533653 | 0 | 255 | 31.509804 | 677 |
joezuntz/des-tile-tools | 14,620,068,692,903 | 008c4468c8fc5bc92f6b46988990c50db60df4d5 | c83dea122415e8b60948e10f566169192559a1e5 | /tile_collections.py | 526fb10b1583be82579894b5dd375fd41cda0a69 | [] | no_license | https://github.com/joezuntz/des-tile-tools | 064244e7fae0a7f41df50fac1e7c73c98193db3c | 5a8b8630232735eeb895b366af687370dbf139a7 | refs/heads/master | 2021-01-19T11:31:08.572574 | 2016-06-10T15:24:06 | 2016-06-10T15:24:06 | 60,851,020 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #DES File tools
import re
import os
UNKNOWN_TILE = "unknown"
tile_pattern = re.compile(r'DES[0-9][0-9][0-9][0-9][+-][0-9][0-9][0-9][0-9]')
def find_tilename(name):
m = tile_pattern.search(name)
if m is None:
return UNKNOWN_TILE
return m.group()
class TileCollection(object):
"A directory with... | UTF-8 | Python | false | false | 1,787 | py | 2 | tile_collections.py | 2 | 0.584219 | 0.575266 | 0 | 59 | 29.288136 | 90 |
underminedsk/kaleidoscope | 11,501,922,451,383 | 5f352fb5e75cee8e02dbc7fcaa065cc256e10d62 | 0f0238a2c2210fcd797f32a3a724a97ac5294e45 | /light_puzzle/light_puzzle_demo.py | 3566d684f8d12c7d8ae24f4a572c998a87554263 | [] | no_license | https://github.com/underminedsk/kaleidoscope | 2a9a8a7ec7220a21afbcc933a9da9b4509ce3b35 | bffd72caf07479d020758abe7fa1d431657215d1 | refs/heads/master | 2020-04-06T07:02:21.902922 | 2016-08-21T00:43:02 | 2016-08-21T00:43:02 | 59,241,432 | 0 | 4 | null | false | 2016-06-14T06:23:39 | 2016-05-19T20:44:06 | 2016-05-20T23:46:36 | 2016-06-14T06:23:39 | 53 | 0 | 1 | 0 | Arduino | null | null | MAX_ALLOWED_MOVES = 9999
NUM_NODES = 3
STATES = ['RED', 'ORANGE', 'YELLOW']
#STATES = ['RED', 'ORANGE', 'YELLOW', 'GREEN', 'BLUE']
def initial_game_state():
#return [STATES[0] for i in range(0,NUM_NODES)]
return ['RED', 'ORANGE', 'YELLOW']
def get_user_input():
choice = raw_input('choose a node (1-%s)):... | UTF-8 | Python | false | false | 1,961 | py | 33 | light_puzzle_demo.py | 29 | 0.583886 | 0.572157 | 0 | 63 | 30.063492 | 81 |
TylerET/Morrowind-Text-Adventure | 14,061,722,966,963 | d275c47295780583658ef611ed3d133ca0ef4e16 | a4ed2d1a2bb505a8fa0792a3072380878cf93343 | /Import.py | 573eb53675381b6b4c1ce3277aa710e49d324bbd | [] | no_license | https://github.com/TylerET/Morrowind-Text-Adventure | 9d054b71d009fb803d0eef31ba433ab72f558e0f | 2b4ed63c93531bdfb6c034a1247aecbd4bd5e8fb | refs/heads/main | 2023-09-06T03:55:51.350100 | 2021-09-28T18:25:44 | 2021-09-28T18:25:44 | 411,395,213 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
f = open('importNPC.txt', 'r')
w = open('NPCs.py', 'a')
print(f.readline())
for _ in range(25):
line = f.readline().rstrip('\n')
description = ''
name = line
minDmg = ''
maxDmg = ''
hp = ''
magicka = ''
weapon = ''
inventory= ''
className = name.... | UTF-8 | Python | false | false | 594 | py | 7 | Import.py | 6 | 0.505051 | 0.501684 | 0 | 24 | 22.5 | 231 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.