blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6bc8e6bda70fb29b075f4f3c8c40b9a6b2656fcf | 9c6e63eb1796bbf4c37d93fca941fb67b4cd4741 | /trunk/scarlett/app.py | 7f7179015d2a9cefbdbe4557f2fd080029521298 | [] | no_license | BGCX261/zizw-svn-to-git | ffc6636d8e0d91b24f124ba3d16c61af10d7441c | c8d068af7a36396ce707dc035b15330c77b02f2a | refs/heads/master | 2016-09-05T13:11:22.053860 | 2015-08-25T15:51:45 | 2015-08-25T15:51:45 | 41,585,036 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,466 | py |
import logging
import webob
import wsgiref.handlers
import simplejson.encoder
import simplejson.decoder
from google.appengine.ext import db
from google.appengine.api import users
from scarlett import model
from scarlett import utils
jsonEncoder = simplejson.encoder.JSONEncoder()
jsonDecoder = simplejson.d... | [
"[email protected]"
] | |
388430234a19c8d3bb7df514027066b68cf8fc68 | 3507fdc5012e55f6a784d70a7ad6da11224e5bfe | /caesar_cipher.py | 2fa71c8cece652f7e97971c772561d702a65ad0c | [] | no_license | jonasthiel/100-days-of-code-python | 640be865bdba10cca17ba72c4923cf9961ed570c | 94ad366d10ed862c6c699ae1f242bd462f2ba597 | refs/heads/main | 2023-04-03T11:53:16.993098 | 2021-04-09T14:20:41 | 2021-04-09T14:20:41 | 330,404,825 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,924 | py | from os import system
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
logo = """
,adPPYba, ,adPPYYba, ,adPPYba, ,adPPYba, ,adPPYYba, 8b,dPPYba,
a8" "" "" `Y8 a8P_____88 I8[ "" "" `Y8 88P' "Y8
8b ,a... | [
"[email protected]"
] | |
ceb0c0134cb3480fdab988077750fcef69ee298d | f8ea3582884df87172cb747e424ebd0c20223614 | /(sandbox,tobemerged)/setup.py | bfdf53b7357b1a52aaad77a7986bc61cc1b5ddd9 | [
"MIT"
] | permissive | karimbahgat/PythonGis | 94f52f800a769ee54b12c7277604ead011465321 | fb99148a15bcbe0438ddca67b484a15076bd961a | refs/heads/master | 2023-04-12T15:59:08.522464 | 2022-09-09T22:48:32 | 2022-09-09T22:48:32 | 47,153,255 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,260 | py | ############
### allow building the exe by simply running this script
import sys
sys.argv.append("py2exe")
############
### imports
from distutils.core import setup
import py2exe
###########
### options
WINDOWS = [{"script": "guitester.py",
"icon_resources": [(1,"pythongis/app/logo.ico")] }]
OPTIONS = {"s... | [
"[email protected]"
] | |
d519581682c5b4acb68ab1878e3cda3a7b8c4ddd | 5e2655fb23e558c54695dea5c9456b5552570947 | /localdev/seed/management/commands/seed_data.py | f42ad2be00ea5d9f4f5111900de0d82b66bf4e16 | [
"BSD-3-Clause"
] | permissive | mitodl/bootcamp-ecommerce | 992cb23243462d82c75cfae6c115a27728491219 | 339c67b84b661a37ffe32580da72383d95666c5c | refs/heads/master | 2023-08-31T10:45:57.827990 | 2023-07-25T13:55:32 | 2023-07-25T13:55:32 | 82,849,185 | 6 | 3 | BSD-3-Clause | 2023-08-24T20:25:47 | 2017-02-22T20:27:24 | Python | UTF-8 | Python | false | false | 709 | py | """Management command to create or update seed data"""
from django.core.management.base import BaseCommand
from localdev.seed.api import create_seed_data
from localdev.seed.utils import get_raw_seed_data_from_file
class Command(BaseCommand):
"""Creates or updates seed data based on a raw seed data file"""
h... | [
"[email protected]"
] | |
c7040497fddc70804c791aa8caffd6ee49621d0d | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_2/hbbirf001/question3.py | 86f1543deb5d0d08303893c1de5d53fe0d63e38e | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | import math
pi =2
denom = math.sqrt(2)
while denom != 2:
pi = pi*2/denom
denom = math.sqrt(2+denom)
print('Approximation of pi:',round(pi,3),sep=' ')
radius = eval(input('Enter the radius:\n'))
area = pi*radius**2
print('Area:', round(area,3)) | [
"[email protected]"
] | |
907107ef98f88293e5eab6076021cbe6900e6c7d | 44acca58155b0a5a2b46d6a9ed255befece4f5d1 | /api_vendas/api_vendas/wsgi.py | 298a0f3193ddd7ce468b07db9e5f06b15df79e98 | [] | no_license | GeovaneCavalcante/appHubVendas | 6f6c74cb2f94b2534ab1c3d0f241422fb88b81f4 | 068bb08e2a270d132e60502c35edc11a4526f671 | refs/heads/master | 2020-03-20T07:22:32.555287 | 2018-06-13T22:38:53 | 2018-06-13T22:38:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | """
WSGI config for api_vendas project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_S... | [
"[email protected]"
] | |
65fc92a79bd813ef453b821d8a02b1a20e6cd577 | e588da296dd6ec3bedee9d24444dfca6e8780aef | /classroom examples/10.py | ab241aa1417f606aba6c9459a043d03a16b9e3e0 | [] | no_license | sujith1919/TCS-Python | 98eac61a02500a0e8f3139e431c98a509828c867 | c988cf078616540fe7f56e3ebdfd964aebd14519 | refs/heads/master | 2023-03-02T09:03:10.052633 | 2021-02-02T16:40:18 | 2021-02-02T16:40:18 | 335,355,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | import time
import os
starttime=time.time()
for x in range(1000):
x**x
endtime=time.time()
print(endtime-starttime)
time.sleep(1) #sleeps for 1 second
ts = os.path.getctime("10.py")
print(ts)
print(time.ctime(ts))
| [
"[email protected]"
] | |
22256ba682801c86d92e53c516104a2ac18db1fd | b27b26462524984951bfbab9250abd145ecfd4c8 | /Demoing/stage_two/bloomingtonnormal/craigslist_sample/craigslist_sample/spiders/craigslist_spider.py | 9ccd525099e5b2802a2344337a1293d1d28242f0 | [] | no_license | afcarl/fastTraffickingGrab | cb813d066f1f69f359598e0b55e632dafd273c89 | 9ff274cb7c9b6c7b60d1436c209b2bfc5907267d | refs/heads/master | 2020-03-26T06:21:21.404931 | 2014-08-16T12:38:29 | 2014-08-16T12:38:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,042 | py |
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import HtmlXPathSelector
from craigslist_sample.items import CraigslistSampleItem
class CraigslistSpider(CrawlSpider):
name = "craigslist"
allowed_domains = ["craigslist.... | [
"[email protected]"
] | |
07b8a5019433683f2a6f9216935aaa0a5caa2f35 | f0b75bd94f133a13f469f429a696f26be3be9862 | /week 2/.history/python_second_assignment_20200204163718.py | b9cd1fdfdd8aa3efdde2ac692d9c4aefc42371f3 | [] | no_license | dechavez4/Python_handin_assignments | 023350fabd212cdf2a4ee9cd301306dc5fd6bea0 | 82fd8c991e560c18ecb2152ea5a8fc35dfc3c608 | refs/heads/master | 2023-01-11T23:31:27.220757 | 2020-05-22T10:33:56 | 2020-05-22T10:33:56 | 237,179,899 | 0 | 0 | null | 2022-12-30T20:14:04 | 2020-01-30T09:30:16 | Python | UTF-8 | Python | false | false | 2,196 | py | import csv
from sys import argv
import platform
import argparse
import os.path
from os import path
# Create a python file with 3 functions:
# A. def print_file_content(file) that can print content of a csv file to the console
def print_file_content(file):
with open(file) as csv_file:
content = csv_fil... | [
"[email protected]"
] | |
8f0ea1ddcb842afbdfefab10bdc1a50be19625f3 | a140b45f9f16b74353d15ed573ea765b3fef046d | /algorithms/leet.0693.src.1.py | 04b92c007caace7e60b187ff08050dfd9eefba49 | [] | no_license | fish-ball/leetcode | 258d4b37f05560d914bcd29f7c54820deeadb33f | 3dfd8f73c65d43cc2766c20700a619141acb927b | refs/heads/master | 2023-05-28T18:32:43.638675 | 2023-05-20T04:25:23 | 2023-05-20T04:25:23 | 31,968,994 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | class Solution:
def hasAlternatingBits(self, n: int) -> bool:
if n <= 2:
return True
if n & 3 in (3, 0):
return False
return self.hasAlternatingBits(n>>1)
| [
"[email protected]"
] | |
5fa3c9d9bb0d62ebb1c3fba841f5fde8baeb38ba | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /tDswMNY7X9h7tyTS4_22.py | cf345fc278bf3cb0fa4a9810e75fe0ead3c22a1a | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,116 | py | """
**Mubashir** was reading about [Pascal's
triangle](https://en.wikipedia.org/wiki/Pascal's_triangle) on Wikipedia.
In mathematics, Pascal's triangle is a triangular array of the binomial
coefficients that arises in probability theory, combinatorics, and algebra.
:
"""
>>> solve(9, 29, 7, 27)
4710194409608608369201743232
"""
print(a ** b + c ** d)
if __name__ == "__main__":
a = int(input())
b = int(input())
c = int(input())
... | [
"[email protected]"
] | |
e70f14eb83da74ee83dd9e8854f5f79da094837c | fb783dda8d0ca34ad95d0c3f7ebbb6794a4b0467 | /ball.py | a2d479dde631ec996cf01de0feb2431d739b6875 | [] | no_license | Loai17/Y--Project | 967ec843ccc033fcdfdb59bd676adcfbea397446 | 155e9820bfa42c13e3dc7a82976146b1b86505ce | refs/heads/master | 2020-04-12T16:29:00.322136 | 2018-12-27T10:34:39 | 2018-12-27T10:34:39 | 162,613,892 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,014 | py | from turtle import *
class Ball(Turtle):
def __init__(self,x,y,dx,dy,r,color):
Turtle.__init__(self)
self.dx=dx
self.dy=dy
self.r=r
self.pu()
... | [
"[email protected]"
] | |
aa2a8c8f570a1c0f44928db8d59780469b207993 | 4f97122844fb8cbaccf9ed9fa300a27a290d1a37 | /1/111.py | 0a46d7eb3eec2fe044cfcd027f9ffbf0dbd17e63 | [] | no_license | cq146637/Advanced | 52d97ab0f8e7ec85e6d81692e92bad967af066e6 | 18380e5c51124ef1e6d243ae216280b49edc7001 | refs/heads/master | 2020-03-22T03:05:02.960444 | 2018-07-02T08:30:27 | 2018-07-02T08:30:27 | 139,151,714 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 834 | py | __author__ = 'Cq'
from collections import deque
import pickle
from random import randint
import os
result = randint(1,100)
print("result is ",result)
deque1 = deque([],5)
if os.path.isfile("save.data"):
deque1 = pickle.load(open("save.data"))
while True:
k = input("\nplease input your guess number: ")
... | [
"[email protected]"
] | |
4148ba0011b8da0c23ac14048f68d96a7d5a144f | ed7f2c5c235d1a3beca2ad78f8ef6eecd9afeea6 | /src/motors.py | d32ecdccd49447815025fb0116e63b984bb1da0e | [] | no_license | mvwicky/roboSim | 8f48bdfa291cfe6abc1c6a7294c7ab59161e3304 | c4d5d5f641ed976c71a591085019fcedc2ec3a5a | refs/heads/master | 2016-09-10T10:40:11.235120 | 2014-08-19T18:51:06 | 2014-08-19T18:51:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,741 | py | import os
import sys
import random
import math
import utilFunctions as utlF
class motor(object):
"""Generic motor object"""
def __init__(self,port,wheelRad=0,ticks=1000,tolerance=0,sprite=None):
"""port:which port the motor is in
wheelRad:the radius of the attached wheel
if not a drive motor: wheelRa... | [
"[email protected]"
] | |
2ea42ed75506284aeaca6832127c5ac1f95139ab | c23b4c6253ca5a0d42822dd0d28ffa752c11ebf5 | /exercises/c3ec2a04-cbca-459a-951f-f17cc34310c7/skeletons/8fd3c5ac-35d2-40cd-9d21-77a4a6671d7c/skeleton4.py3 | e2a36f52de4511c924c13798bc533064cd0477c9 | [] | no_license | josepaiva94/e57d8867-6234-41a6-b239-2cd978ad1e70 | 803e2eb1e2db23c64409bc72ff00c4463875a82f | aa270941dd8cf7b2e1ec8ac89445b1ab3a47f89d | refs/heads/master | 2023-01-07T10:49:56.871378 | 2020-11-16T11:28:14 | 2020-11-16T11:28:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 134 | py3 | if largest != root_index:
nums[root_index], nums[largest] = nums[largest], nums[root_index]
heapify(nums, heap_size, largest)
| [
"[email protected]"
] | |
b8b5d53aedd215e4c38db5455b764f4b73bb83b5 | 3420aba3622faf2d4aede984c656f68ad24a1f3c | /backend/personal_care_22730/settings.py | 230da7088fe365290e5935afd842c015a2ea9d7d | [] | no_license | crowdbotics-apps/personal-care-22730 | bb81af122e64cb58f6d52df31df328b6dfa4b25d | 066d2cd5e890057df054ea7c5b3b5f061e872371 | refs/heads/master | 2023-01-11T06:30:05.971088 | 2020-11-18T16:23:30 | 2020-11-18T16:23:30 | 313,990,783 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,048 | py | """
Django settings for personal_care_22730 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
... | [
"[email protected]"
] | |
56c15e78ef411bada79abd374bd7d67e36ff9929 | 234c7fb0bdabdd696c8e4c6a449ac2c8e3f14ad5 | /build/PureCloudPlatformClientV2/models/workday_values_trend.py | 2cd0430e7aa02ba9e1bd12ac92f707c225c96002 | [
"Apache-2.0",
"MIT"
] | permissive | humano7/platform-client-sdk-python | 2a942c43cc2d69e8cb0c4113d998e6e0664fdedb | dd5b693b1fc90c9dcb36885d7227f11221db5980 | refs/heads/master | 2023-04-12T05:05:53.932393 | 2021-04-22T03:41:22 | 2021-04-22T03:41:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,713 | py | # coding: utf-8
"""
Copyright 2016 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | [
"[email protected]"
] | |
491a1f11b35ab27ff0eb2c2ce7bb95b422862b4a | ed7cd7760c708720f5a847a02b0c3a50cca0175e | /docs/conf.py | c6db3e446649d27013be9c86061f2f9677830789 | [
"MIT"
] | permissive | jcapriot/aurora | bf98b1236e7dc43e0189df71725f7f862d271984 | 08d5ccc671054a2b646a4effb412a2ed48314646 | refs/heads/main | 2023-09-05T00:07:16.984109 | 2021-10-27T02:49:41 | 2021-10-27T02:49:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,585 | py | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | [
"[email protected]"
] | |
13f0735af7afa71669e0b00ec47e9d7d07d8bce0 | d5214b1331c9dae59d95ba5b3aa3e9f449ad6695 | /qPloneDropDownMenu/branches/0.2/skins/qPloneDropDownMenu/qpdm_reorder.py | e0bfe0d169c75bd9dae28edd63c26790aeb59ec2 | [] | no_license | kroman0/products | 1661ee25a224c4b5f172f98110944f56136c77cf | f359bb64db22f468db5d1e411638790e94d535a2 | refs/heads/master | 2021-01-10T07:58:04.579234 | 2014-06-11T12:05:56 | 2014-06-11T12:05:56 | 52,677,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 473 | py | ## Script (Python) "qpdm_reorder"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters= submenu_path, idxs
##title=
##
from Products.CMFCore.utils import getToolByName
menu_tool = getToolByName(context, 'portal_dropdownmenu')
menuitem = ... | [
"mylan@4df3d6c7-0a05-0410-9bee-ae8b7a76f946"
] | mylan@4df3d6c7-0a05-0410-9bee-ae8b7a76f946 |
432aae4837c6d251b61eb69326fd327cebce4c6c | a63d907ad63ba6705420a6fb2788196d1bd3763c | /src/api/resourcecenter/serializers/processing_metrics_serializers.py | bb72d5540d96efd33b60750a04d702611cbf0b03 | [
"MIT"
] | permissive | Tencent/bk-base | a38461072811667dc2880a13a5232004fe771a4b | 6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2 | refs/heads/master | 2022-07-30T04:24:53.370661 | 2022-04-02T10:30:55 | 2022-04-02T10:30:55 | 381,257,882 | 101 | 51 | NOASSERTION | 2022-04-02T10:30:56 | 2021-06-29T06:10:01 | Python | UTF-8 | Python | false | false | 2,364 | py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
-------------------------------------------... | [
"[email protected]"
] | |
ff96ced9ce7021a3e0768e0e4493dcaaee8df6fd | a6086dcd794ee1419081761e473433081249059f | /app/api/errors.py | 9e92b5acf600ead372909b7faad5a3d73fe777ea | [] | no_license | billy0402/flask-stock-api | f1d6f51d7d67300eccc2d7621eacc41f3a8ec609 | 2d656c80b2a062f8dd4f7f8466ed3060f7d56477 | refs/heads/master | 2023-07-18T15:40:53.869479 | 2021-09-08T18:57:47 | 2021-09-08T18:57:47 | 402,569,924 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 632 | py | from flask import jsonify
from . import api
from ..exceptions import ValidationError
def bad_request(message):
response = jsonify({'error': 'bad request', 'message': message})
response.status_code = 400
return response
def unauthorized(message):
response = jsonify({'error': 'unauthorized', 'message... | [
"[email protected]"
] | |
d21c0896c06e1415355d55f1c6aa4eda00358cbc | 46559fa48bb8ae722149b600ecd5e05e558553ac | /RumourEval2019Models/Bert-MFajcik/data_preprocessing/text_preprocessing.py | 185113f8777ca3d00c738e17f3b504dde6cda8ea | [
"MIT"
] | permissive | isspek/veracity-detection | f84eeba6aceb8b2f3f753c5e856bb46d9581c0c5 | 9368309722bead209e49e52c206758e3d173092a | refs/heads/master | 2022-07-15T10:25:10.327352 | 2019-11-14T13:24:55 | 2019-11-14T13:24:55 | 214,429,773 | 0 | 0 | MIT | 2022-06-21T23:08:54 | 2019-10-11T12:23:39 | Python | UTF-8 | Python | false | false | 7,549 | py | import re
import string
import warnings
import preprocessor as twitter_preprocessor
import spacy
# See spacy tag_map.py for tag explanation
from nltk.corpus import stopwords
from spacy.symbols import PUNCT, SYM, ADJ, CCONJ, NUM, DET, ADV, ADP, VERB, NOUN, PROPN, PART, PRON, ORTH
from utils import DotDict
warnings.fi... | [
"[email protected]"
] | |
eedc1a1a7b87294894b34aefd03488bb442339be | 33e5e4b883671f7f40a48e6e0a4b544b3f8f839a | /imageflow/apps.py | 2b8872cb5e0adfd69a6677056fd89db00b564baa | [
"MIT"
] | permissive | typpo/astrokit | ad7ee83664e3d920733d7e008aec4801c7aa84f2 | 59cea2e06c027e83dfa70defb4053820c79ccced | refs/heads/master | 2023-04-12T15:44:11.669710 | 2022-06-21T21:21:04 | 2022-06-21T21:21:04 | 47,933,931 | 9 | 7 | MIT | 2023-03-31T14:28:40 | 2015-12-13T19:52:01 | Python | UTF-8 | Python | false | false | 134 | py | from __future__ import unicode_literals
from django.apps import AppConfig
class ImageflowConfig(AppConfig):
name = 'imageflow'
| [
"[email protected]"
] | |
9b3ef03ef6d8de217adbc634e63f038ae42d5d52 | 0a3bf0a6f10eb143c9291090125946538ee73279 | /summarize/sumy/summarizers/edmundson_location.py | 406597f5a31d71b8b516c58c710328b273d06797 | [
"Apache-2.0"
] | permissive | AIPHES/live-blog-summarization | 19ec1c01b7e254f74b2de153ac3972780daa7506 | a5f899ea07a098e1e0b3ab92cd3d430776e6412a | refs/heads/master | 2022-11-24T09:39:25.750313 | 2019-02-12T13:53:12 | 2019-02-12T13:53:12 | 166,268,167 | 2 | 1 | Apache-2.0 | 2022-11-02T20:47:14 | 2019-01-17T17:34:10 | Python | UTF-8 | Python | false | false | 2,516 | py | # -*- coding: utf8 -*-
from __future__ import absolute_import
from __future__ import division, print_function, unicode_literals
from itertools import chain
from operator import attrgetter
from .._compat import ffilter
from ._summarizer import AbstractSummarizer
class EdmundsonLocationMethod(AbstractSummarizer):
... | [
"[email protected]"
] | |
3941489ec2a7e0de2b1adcec8caab3fafca2f3a0 | 4b4df51041551c9a855468ddf1d5004a988f59a2 | /leetcode_python/Array/corporate-flight-bookings.py | d6486593ea2dc4f37b79869a1f72ef71fc6dc067 | [] | no_license | yennanliu/CS_basics | 99b7ad3ef6817f04881d6a1993ec634f81525596 | 035ef08434fa1ca781a6fb2f9eed3538b7d20c02 | refs/heads/master | 2023-09-03T13:42:26.611712 | 2023-09-03T12:46:08 | 2023-09-03T12:46:08 | 66,194,791 | 64 | 40 | null | 2022-08-20T09:44:48 | 2016-08-21T11:11:35 | Python | UTF-8 | Python | false | false | 5,073 | py | """
1109. Corporate Flight Bookings
Medium
There are n flights that are labeled from 1 to n.
You are given an array of flight bookings bookings, where bookings[i] = [firsti, lasti, seatsi] represents a booking for flights firsti through lasti (inclusive) with seatsi seats reserved for each flight in the range.
Retu... | [
"[email protected]"
] | |
8da121d649ea828a915d2f8fee0f8d2f41569f13 | bfc25f1ad7bfe061b57cfab82aba9d0af1453491 | /data/external/repositories_2to3/120243/tradeshift-text-classification-master/src/online-model/tk7_solution.py | ffa812f783556c5f81ae943cd1fa4a0497105321 | [
"MIT"
] | permissive | Keesiu/meta-kaggle | 77d134620ebce530d183467202cf45639d9c6ff2 | 87de739aba2399fd31072ee81b391f9b7a63f540 | refs/heads/master | 2020-03-28T00:23:10.584151 | 2018-12-20T19:09:50 | 2018-12-20T19:09:50 | 147,406,338 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,176 | py | '''
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
... | [
"[email protected]"
] | |
7da0cdbd0ae336d14f7023b24a2e9169e58abf11 | 94fd1381adcfaa5ea64dc13123aef16697b0396a | /covid_dashboard/views/get_districts_daily_report_day_wise/request_response_mocks.py | 540280aed7e3719046e9b95366e4f81bc83ed4df | [] | no_license | bharathi151/covid_dashboard | 30ac9fe4720b8cd42028b33dcc1b620e0f1ebdb1 | 930bf3e46e8d7c56c682ce10f7f6e5fa7f50cab8 | refs/heads/master | 2022-11-14T20:18:24.648922 | 2020-06-27T10:08:53 | 2020-06-27T10:08:53 | 269,612,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 336 | py |
RESPONSE_200_JSON = """
[
{
"district_name": "string",
"district_id": 1,
"day_wise_statistics": [
{
"total_confirmed_cases": 1,
"total_deaths": 1,
"total_recovered_cases": 1,
"date": "string"
}
... | [
"[email protected]"
] | |
b90fbfd3c2d421fb70c9156499e70a3a7511340d | 4af090efabd08ef73c411a00ce4972a1c6f30a22 | /python_100days/7day/practice11.py | 82eb730e0a554302387bf8dc26b7ee42b67aaddd | [] | no_license | predatory123/byhytest | e52bca664f9461c9309aaa9bf779c02368ed937c | 578206c9ec9253d0d9325e72cdc13dde6eeb2fc1 | refs/heads/master | 2023-04-26T13:33:14.462408 | 2021-05-20T13:33:37 | 2021-05-20T14:26:22 | 369,213,148 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | # 综合案例2:约瑟夫环问题
"""
《幸运的基督徒》
有15个基督徒和15个非基督徒在海上遇险,为了能让一部分人活下来不得不将其中15个人扔到海里面去,
有个人想了个办法就是大家围成一个圈,由某个人开始从1报数,报到9的人就扔到海里面,他后面的人接着从1开始报数,
报到9的人继续扔到海里面,直到扔掉15个人。由于上帝的保佑,15个基督徒都幸免于难,问这些人最开始是怎么站的,
哪些位置是基督徒哪些位置是非基督徒。
"""
def main():
persons = [True] * 30
counter, index, number = 0, 0, 0
while counter < 15:
... | [
"[email protected]"
] | |
3fce41e05b897b1b5f9cb8483bc9db41b2f751a0 | 3c8701e04900389adb40a46daedb5205d479016c | /oldboy-python18/day02-列表-字典/home-work-stu/购物车.py | 63b937b4063f23e586269f417564b2537968ebdd | [] | no_license | huboa/xuexi | 681300653b834eaf506f49987dcca83df48e8db7 | 91287721f188b5e24fbb4ccd63b60a80ed7b9426 | refs/heads/master | 2020-07-29T16:39:12.770272 | 2018-09-02T05:39:45 | 2018-09-02T05:39:45 | 73,660,825 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,584 | py | #coding:utf-8
goods = [
{"name": "电脑", "price": 1999},
{"name": "鼠标", "price": 10},
{"name": "游艇", "price": 20},
{"name": "美女", "price": 998},
]
shopping_car=[]
while True:
# 获取总资产
total_assets = input('请输入你的总资产:').strip()
if len(total_assets) == 0:
continue
else:
if to... | [
"[email protected]"
] | |
2372a02f129a67fbf7970e593aecdaeb2bdb38b5 | 55647a80c8b412af9df0ba3f50595cc2f29c25e6 | /res/scripts/client/messenger/doc_loaders/colors_schemes.py | 5d932c37ceee7ccf7724d9394a83e08eff0f0204 | [] | no_license | cnsuhao/WOT-0.9.17-CT | 0035eb6070fb4fab8d8ee9f8bbc676c10d511cfb | d1f932d8cabaf8aa21708622e87f83c8d24d6451 | refs/heads/master | 2021-06-08T18:11:07.039293 | 2016-11-19T19:12:37 | 2016-11-19T19:12:37 | null | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 2,484 | py | # 2016.11.19 19:53:40 Střední Evropa (běžný čas)
# Embedded file name: scripts/client/messenger/doc_loaders/colors_schemes.py
from messenger.doc_loaders import _xml_helpers
def _readColors(xmlCtx, section, colorsNames, defName):
result = {}
notFound = colorsNames[:]
for tagName, subSec in section.items():
... | [
"[email protected]"
] | |
6aafd67487c0bd93b6877eceb974ad1a5b907767 | ec7ecc5abbdd03fb55f24e89dbbdfa23ebd7b60f | /evaluate postfix expression.py | 0287083b4698fdbb7abd669aeabc7e66044a9f3e | [] | no_license | poojithayadavalli/codekata | cd290e009cf3e2f504c99dd4f6de9171f217c6be | 1885c45a277cf1023e483bd77edf0c6edf8d95f3 | refs/heads/master | 2020-07-18T14:06:17.190229 | 2020-05-30T09:00:29 | 2020-05-30T09:00:29 | 206,259,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,541 | py | class Evaluate:
# Constructor to initialize the class variables
def __init__(self, capacity):
self.top = -1
self.capacity = capacity
# This array is used a stack
self.array = []
# check if the stack is empty
def isEmpty(self):
return True if... | [
"[email protected]"
] | |
4be0a9347751505cc966aaaae4aa8a00df3626f7 | f13acd0d707ea9ab0d2f2f010717b35adcee142f | /AtCoder_Virtual_Contest/macle_20220825/c/main.py | 02c948ca2212d942ef5f1445c169292d56933fb5 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | KATO-Hiro/AtCoder | 126b9fe89fa3a7cffcbd1c29d42394e7d02fa7c7 | bf43320bc1af606bfbd23c610b3432cddd1806b9 | refs/heads/master | 2023-08-18T20:06:42.876863 | 2023-08-17T23:45:21 | 2023-08-17T23:45:21 | 121,067,516 | 4 | 0 | CC0-1.0 | 2023-09-14T21:59:38 | 2018-02-11T00:32:45 | Python | UTF-8 | Python | false | false | 5,236 | py | # -*- coding: utf-8 -*-
import math
from bisect import bisect_left, bisect_right, insort
from typing import Generic, Iterable, Iterator, TypeVar, Union, List
T = TypeVar('T')
class SortedMultiset(Generic[T]):
"""Sorted multi set (set) in C++.
See:
https://qiita.com/tatyam/items/492c70ac4c955c055602
... | [
"[email protected]"
] | |
f3e2452d08102097b71299f1835a5000ecc6f07d | e4f8b14cead542586a96bcaa75993b0a29b3c3d0 | /pyNastran/f06/test/test_f06.py | 1bd6ea7db2cd64bd4ae4a058a7e38f9e763c9e81 | [] | no_license | afcarl/cyNastran | f1d1ef5f1f7cb05f435eac53b05ff6a0cc95c19b | 356ee55dd08fdc9880c5ffba47265125cba855c4 | refs/heads/master | 2020-03-26T02:09:00.350237 | 2014-08-07T00:00:29 | 2014-08-07T00:00:29 | 144,398,645 | 1 | 0 | null | 2018-08-11T15:56:50 | 2018-08-11T15:56:50 | null | UTF-8 | Python | false | false | 5,968 | py | import os
import sys
import time
from traceback import print_exc
import pyNastran
from pyNastran.f06.f06 import F06
#from pyNastran.op2.test.test_op2 import parseTableNamesFromF06, getFailedFiles
def run_lots_of_files(files, debug=True, saveCases=True, skipFiles=[],
stopOnFailure=Fal... | [
"mesheb82@abe5364a-6225-a519-111c-932ebcde5b3b"
] | mesheb82@abe5364a-6225-a519-111c-932ebcde5b3b |
6142e7a74039e267ec08477e21952b9991b89888 | 4ee5affb8b16ff7d26df9b19ffee8d675df11e4e | /nested-loops/train_the_trainers.py | ce76aebb5569e2ac15837eb95cccaa5edc35603a | [] | no_license | ayk-dev/python-basics | f60849f6502d64445105a0d27272d9910ea1d509 | af6d04f9001d9a45e8474f9bd4fa2b3ebe380c97 | refs/heads/main | 2023-01-12T11:56:12.210880 | 2020-11-17T20:06:40 | 2020-11-17T20:06:40 | 311,747,624 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 594 | py | n = int(input()) # number of people in jury
presentation_counter = 0
presentaion = input()
all_presentations_grades = 0
while presentaion != 'Finish':
total = 0
for pres in range(1, n + 1):
grade = float(input())
total += grade
average_grade = total / n
all_presentation... | [
"[email protected]"
] | |
c994ba0a911d0bf5726934a74e94cc5b6ea8197c | da878a03674024f290775b2c10d745edf091a4dc | /Global Fires/venv/Scripts/pip3-script.py | d05b0aa101ecf28df5c3555bf979ec367071f105 | [
"MIT"
] | permissive | EnriqueGambra/Global-Fires | 1b3aa5670dbb69804c733b865c7906f6e9698995 | 652606ccd573e7bfd7a232876f0b59fcefc15f9b | refs/heads/master | 2020-08-03T00:44:38.156931 | 2019-09-28T23:30:43 | 2019-09-28T23:30:43 | 211,568,271 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | #!"C:\Users\Owner\github-Repos\Global-Fires\Global Fires\venv\Scripts\python.exe"
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?... | [
"[email protected]"
] | |
ff22176a2b050a193f1882462e0d36e591e42784 | cb0e7d6493b23e870aa625eb362384a10f5ee657 | /solutions/python3/0567.py | 65478b7cc2fb087117f7698fe743cdccb13f091a | [] | no_license | sweetpand/LeetCode-1 | 0acfa603af254a3350d457803449a91322f2d1a7 | 65f4ef26cb8b2db0b4bf8c42bfdc76421b479f94 | refs/heads/master | 2022-11-14T07:01:42.502172 | 2020-07-12T12:25:56 | 2020-07-12T12:25:56 | 279,088,171 | 1 | 0 | null | 2020-07-12T15:03:20 | 2020-07-12T15:03:19 | null | UTF-8 | Python | false | false | 500 | py | class Solution:
def checkInclusion(self, s1: str, s2: str) -> bool:
count1 = collections.Counter(s1)
required = len(s1)
for r, c in enumerate(s2):
count1[c] -= 1
if count1[c] >= 0:
required -= 1
if r >= len(s1):
count1[s2[r... | [
"[email protected]"
] | |
52564c55ce188af128e41cc3810567e62b0cb71c | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_wisecracked.py | df762aa40f8d90ebf7ab0b38869d1bab6c31eb7e | [
"MIT"
] | permissive | 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 | UTF-8 | Python | false | false | 236 | py |
#calss header
class _WISECRACKED():
def __init__(self,):
self.name = "WISECRACKED"
self.definitions = wisecrack
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['wisecrack']
| [
"[email protected]"
] | |
28d7853629e519d31e6615eabe002706b6b08b38 | 4cb2bbd929ba3722d78cd6bd9feb2c5c0dd57025 | /olympic/forms.py | d27d0f59c4a933f98e12550b23203e2966edaad2 | [
"BSD-2-Clause"
] | permissive | mjtamlyn/tamlynscore | ebeebdc73feeab86995a2cb888e1bea203854553 | c6ac4e9a5e37dc3778b1f754b3143e44fa8dc0bc | refs/heads/master | 2023-08-24T11:00:16.153489 | 2023-08-08T11:30:24 | 2023-08-08T11:30:24 | 17,013,657 | 7 | 2 | BSD-3-Clause | 2023-08-05T19:52:51 | 2014-02-20T08:28:08 | Python | UTF-8 | Python | false | false | 3,102 | py | from django import forms
from .models import Result, SessionRound
class ResultForm(forms.ModelForm):
class Meta:
model = Result
exclude = ('match', 'seed')
class SetupForm(forms.Form):
SPREAD_CHOICES = (
('', 'No special options'),
('expanded', 'One target per archer'),
... | [
"[email protected]"
] | |
641aacc8b6854764e829d6932d4d0627ea980786 | 19d03d646fcee318cca8078af27636732290d77b | /parlai/utils/flake8.py | 1170b4bbb4a717b201637e00678bf96a87614026 | [
"MIT"
] | permissive | yongkyung-oh/CMU-Studio-Project | 2d6fe6ef6fa30fda1a4f2d1fc45c5b85d6143775 | 448492f342e8157df2e736aa52825b66b1d66fd7 | refs/heads/master | 2022-10-24T16:56:46.763865 | 2020-07-01T10:03:00 | 2020-07-01T10:03:00 | 252,878,283 | 2 | 5 | MIT | 2021-03-25T23:50:27 | 2020-04-04T01:02:44 | Python | UTF-8 | Python | false | false | 3,424 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Custom flake8 rules for ParlAI.
Includes:
- Checks for python3 shebang
- Check for copyright message
- Docformatter... | [
"[email protected]"
] | |
57e19bf0eacc2c9dc6bfd1452ebf6c427e698494 | 311ce6fbe1b264f2b656ba235371e756695dca53 | /forcing/dot_in/aestus1_A1_ae1/make_dot_in.py | 3e296f6d56c6863053a5285cd0f5d84cb28cdf8f | [
"MIT"
] | permissive | parkermac/LiveOcean | 94bc9cb9fba1bdc2e206488e0e2afadfafeabb34 | 4bd2776cf95780a7965a18addac3c5e395703ce5 | refs/heads/master | 2022-11-30T10:21:50.568014 | 2022-11-21T16:32:55 | 2022-11-21T16:32:55 | 35,834,637 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,180 | py | """
This creates and poulates directories for ROMS runs on gaggle. It is
designed to work with the "BLANK" version of the .in file,
replacing things like $whatever$ with meaningful values.
"""
import os
import sys
fpth = os.path.abspath('../../')
if fpth not in sys.path:
sys.path.append(fpth)
import forcing_func... | [
"[email protected]"
] | |
dff2b536322cbc8ac24cd00ed962fdad5d4bbba2 | 592961def9fe287a31e117649f1ac1e97b085a9b | /venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py | a6582e6dd5b515ec3783b7ecc3ed81adffc4f3cb | [] | no_license | Rushin95/The_Trip_Planner-Lyft_vs_Uber | 62f03a1df8c6a0268089f50f4e80ec3d9b6b9870 | 4eeea4029eb4df047471b92065455a6828232293 | refs/heads/master | 2021-01-19T11:52:47.766019 | 2018-05-03T23:59:58 | 2018-05-03T23:59:58 | 82,268,914 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 663 | py | from __future__ import absolute_import, division, unicode_literals
from . import base
try:
from collections import OrderedDict
except ImportError:
# noinspection PyUnresolvedReferences
from ordereddict import OrderedDict
class Filter(base.Filter):
def __iter__(self):
for token in base.Filter... | [
"[email protected]"
] | |
2e0a0431b921c67132029866d0dc9a2fe708b565 | e0268b6e868fcaaf6fc9c42b720e014c3ae41a20 | /scripts/make_bu_data.py | ee30a5f8470d550046a3ed6c5170a7e7aee29344 | [
"MIT"
] | permissive | gradio-app/ImageCaptioning.pytorch | 79208726dd09e1e532863af56c7a900b576cbca2 | 436d900d01139dc402b24425c60679409e0c9051 | refs/heads/master | 2022-11-15T03:27:38.775656 | 2020-07-12T22:44:30 | 2020-07-12T22:44:30 | 279,639,722 | 1 | 1 | MIT | 2020-07-14T16:37:47 | 2020-07-14T16:37:46 | null | UTF-8 | Python | false | false | 1,889 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import base64
import numpy as np
import csv
import sys
import zlib
import time
import mmap
import argparse
parser = argparse.ArgumentParser()
# output_dir
parser.add_argument('--downloaded_feats', d... | [
"[email protected]"
] | |
ce037214f60bd6c8975b5e9da15eaaa6acd30d83 | 685038d4be188fa72e9dba1d2213a47ee3aa00a2 | /ECOS2021/Demands/Inputs/Surveys/A/S3/Oct_S3_A.py | f3bb6b79446fe8f081e16398f9239662c9c7acc0 | [] | no_license | CIE-UMSS/Tradeoff-between-Installed-Capacity-and-Unserved-Energy | e5599e4e4ac60b97f0c4c57c5de95e493b1b5ac4 | 459f31552e3ab57a2e52167ab82f8f48558e173c | refs/heads/master | 2023-06-01T18:09:29.839747 | 2021-06-19T15:56:26 | 2021-06-19T15:56:26 | 343,720,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,968 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 31 14:33:07 2020
@author: alejandrosoto
Script for 2 class of household in Raqaypampa.
"""
# -*- coding: utf-8 -*-
"""
@author: Alejandro Soto
"""
from core import User, np
User_list = []
#User classes definition
HI = User("high income",1)
Us... | [
"[email protected]"
] | |
df585f561e1bd0f95edb526fd662fc99e5cba754 | f56fda98a93cedcec33a7d9fbb330e5cf78031e1 | /Leetcode/45. Jump Game II.py | b2d963b2956cda7d0acaeac20324868e1d0d0149 | [] | no_license | GuanzhouSong/Leetcode_Python | 7a2bac42203fb6c0b671153d9e300eb0c73d39d1 | dbb9be177c5e572eb72a79508bb6e24f357d54b3 | refs/heads/master | 2021-09-25T04:10:09.217565 | 2018-10-17T22:31:41 | 2018-10-17T22:31:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | import sys
class Solution:
def jump(self, nums):
mintimes = [0] + [sys.maxsize] * (len(nums) - 1)
for i in range(0, len(nums) - 1):
for j in range(1, min(nums[i] + 1, len(nums) - i)):
mintimes[i + j] = min(mintimes[i + j], mintimes[i] + 1)
return mintimes[-1]
s = Solution()
nums = [6, 2,... | [
"[email protected]"
] | |
382ab283e99868eb7c25aae590e703339aa079d0 | f4b694982027ac362de1e9d6755f2943d0355a06 | /DECSKS-12 -- debugging the recast from DECSKS-09 by comparing with v1.2/v1.2/DECSKS/lib/diagnostics.py | e4234421bf17641907309887eb6c7504590672c3 | [] | no_license | dsirajud/IPython-notebooks | 55275e44191c16f5393571522787993f931cfd98 | 6ad9d978c611558525fc9d716af101dc841a393b | refs/heads/master | 2021-01-15T15:33:57.119172 | 2016-07-13T20:08:29 | 2016-07-13T20:08:29 | 35,054,473 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,472 | py | import DECSKS
import numpy as np
import sys # to retrieve smallest float for lower bound tolerance
def HighPrecisionE(number):
"""Converts a number into a string object
while retaining a chosen degree of precision. This
is designed to evade the truncation that is involved
with str() so that outputs can... | [
"[email protected]"
] | |
bfcab4cecd2a7d8e3946cf55d03659e839d25b3d | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/82/usersdata/165/44623/submittedfiles/decimal2bin.py | b07134dde6b2df7bd468626e44d12cc75e301ed4 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py | # -*- coding: utf-8 -*-
n=int(input('digite n:'))
i=0
soma=0
while n>0:
resto=n%10
soma=soma+resto*(2**i)
n=n//10
i=i+1
print(soma)
| [
"[email protected]"
] | |
9feacf0a85e2b4cb750a3f12f786d8971b96efc5 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/arc042/B/4081354.py | 8eea907c466a07c6b45bfcd05fcae80479294c1a | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 250 | py | #!/usr/bin/env python3
p = complex(*list(map(int, input().split())))
N = int(input())
li = [complex(*list(map(int, input().split()))) for _ in range(N)]
li += [li[0]]
m = min(((p - a) / (b - a)).imag * abs(b - a) for a, b in zip(li, li[1:]))
print(m) | [
"[email protected]"
] | |
79f62a7ee6eb1f0d6df192c475af8fec47ca39a9 | ea5af064f6583c4dc244627f67bf51a9119347a9 | /crypto.py | 4c6a27ad97768b78070c68886cdd9f351d4f73f8 | [] | no_license | celiyan/PyPassManager | 034c10cfe594d365822dc836e0f0143e02ac25e3 | fda994b44b7a003825e16bbcaffd07cf094e04b7 | refs/heads/master | 2022-12-19T19:51:29.714559 | 2020-10-15T05:16:37 | 2020-10-15T05:16:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,530 | py | from Crypto.Cipher import AES
from os import urandom
def pad(txt):
"AES CBC requires the number of plaintext bytes to be a multiple of 16, so we pad it to the nearest multiple. Takes&Returns bytes object."
padding_length = AES.block_size - len(txt)%AES.block_size
# we pad with a character = to the padding length... | [
"[email protected]"
] | |
8284303e2d78a6089a9fd4c7ccbb37454b2e67c4 | 503d2f8f5f5f547acb82f7299d86886691966ca5 | /atcoder/abc200_c.py | e206350c17a0371913a9b0f7696b9550c9039895 | [] | no_license | Hironobu-Kawaguchi/atcoder | 3fcb649cb920dd837a1ced6713bbb939ecc090a9 | df4b55cc7d557bf61607ffde8bda8655cf129017 | refs/heads/master | 2023-08-21T14:13:13.856604 | 2023-08-12T14:53:03 | 2023-08-12T14:53:03 | 197,216,790 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 278 | py | # https://atcoder.jp/contests/abc200/tasks/abc200_c
from collections import Counter
n = int(input())
a = list(map(int, (input().split())))
for i in range(n):
a[i] %= 200
cnt = Counter(a)
ans = 0
for i, v in cnt.items():
if v>=2:
ans += v*(v-1) // 2
print(ans)
| [
"[email protected]"
] | |
c344c8404ac954642b6f02f8f20bca296c731bae | 5fc6b5a420b9cb2a7d5102df55b0b5248f8199e1 | /pypykatz/commons/winapi/local/function_defs/live_reader_ctypes.py | aa2bae8f03b5ebc283d8a225b8ccda4bdf88894b | [
"MIT"
] | permissive | ASkyeye/pypykatz | 8e1c598d57017fd400b9a8d830ed314be7562b96 | 8ad07f2f6f0c4904f9a77c711f693d6c794a7fb4 | refs/heads/master | 2021-07-03T13:48:34.350145 | 2020-11-14T22:50:30 | 2020-11-14T22:50:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,565 | py | import os
import sys
import ctypes
import enum
import logging
from pypykatz import logger
from .ntdll import *
from .kernel32 import *
from .psapi import *
class WindowsMinBuild(enum.Enum):
WIN_XP = 2500
WIN_2K3 = 3000
WIN_VISTA = 5000
WIN_7 = 7000
WIN_8 = 8000
WIN_BLUE = 9400
WIN_10 = 9800
#utter microsoft... | [
"[email protected]"
] | |
84be026c4a9decd8c8cbeb0044e6269de46348c9 | c383840367c09a4aa3762d224b17b742fe53eb31 | /GANs_Advanced/DiscoGAN/train_DiscoGAN_org.py | 081a29ab949a0e8e7a706e48f2d192a1060b2e74 | [] | no_license | qzq2514/GAN | 04f3f1ff6437d6805369f28b207a8f726a112d11 | a313deb08884c2ce60d4fc3834b79a8518e38f44 | refs/heads/master | 2020-09-21T17:32:00.913453 | 2020-01-17T05:02:18 | 2020-01-17T05:02:18 | 224,866,070 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,800 | py | from tensorflow.examples.tutorials.mnist import input_data
from tensorflow.python.framework import graph_util
import tensorflow.contrib.slim as slim
from DataLoader import Pix2Pix_loader
from net.DiscoGAN import DiscoGAN
import tensorflow as tf
import numpy as np
import scipy.misc
import os
os.environ['CUDA_VISIBLE_DEV... | [
"[email protected]"
] | |
d235aec102d27ca4fae3b8e5d215f502675ae6fb | 17c366bf8aa9fed59fb3d91db06142860cb9ce38 | /nbs/examples/mnist_blocks.py | 14043be821f6c97c3bf782edb3b9b4b097f38029 | [
"Apache-2.0"
] | permissive | dienhoa/fastai | 3f4884f9fb96f9e5199e33b959478dfa0bbfa0d4 | fdce0330e05ae02db90c3456f9fc2827c3cf86a0 | refs/heads/master | 2022-04-14T06:27:52.994595 | 2022-04-13T21:24:27 | 2022-04-13T21:24:27 | 154,803,492 | 0 | 0 | Apache-2.0 | 2018-10-26T08:38:44 | 2018-10-26T08:38:43 | null | UTF-8 | Python | false | false | 422 | py | from fastai.vision.all import *
splitter = GrandparentSplitter(train_name='training', valid_name='testing')
mnist = DataBlock(blocks=(ImageBlock(PILImageBW), CategoryBlock),
get_items=get_image_files, splitter=splitter, get_y=parent_label)
if __name__ == '__main__':
data = mnist.dataloaders(unta... | [
"[email protected]"
] | |
f178b663d0ee93882d7f0f23f79762c86c9a62b3 | d3efc82dfa61fb82e47c82d52c838b38b076084c | /Autocase_Result/ReverseRepo/YW_NHG_SHHG_019_GC028.py | 697b950c9b5b4c9f6d0da0feb24a47bcfb16928d | [] | no_license | nantongzyg/xtp_test | 58ce9f328f62a3ea5904e6ed907a169ef2df9258 | ca9ab5cee03d7a2f457a95fb0f4762013caa5f9f | refs/heads/master | 2022-11-30T08:57:45.345460 | 2020-07-30T01:43:30 | 2020-07-30T01:43:30 | 280,388,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,026 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import sys
sys.path.append("/home/yhl2/workspace/xtp_test/xtp/api")
from xtp_test_case import *
sys.path.append("/home/yhl2/workspace/xtp_test/service")
from ServiceConfig import *
from mainService import *
from QueryStkPriceQty import *
from log import *
sys.path.append("/h... | [
"[email protected]"
] | |
e3890f86efe95e867f60a04ad1fb1640b5b9c625 | 6a253ee7b47c5f70c826bbc97bb8e33cd1dab3b6 | /4.Working with Dask Bags for Unstructured Data/Filtering vetoed bills.py | f6f1b993c692dc6f8cda3afb05d26a40595ed1aa | [] | no_license | Mat4wrk/Parallel-Programming-with-Dask-in-Python-Datacamp | 19a646d6d16ff46173964c25639ff923407c8f32 | 535f69b78adb50cffc7f402f81ddff19f853eea1 | refs/heads/main | 2023-03-06T19:52:39.495066 | 2021-02-13T13:27:06 | 2021-02-13T13:27:06 | 338,565,569 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | # Filter the bills: overridden
overridden = bills_dicts.filter(veto_override)
# Print the number of bills retained
print(overridden.count().compute())
# Get the value of the 'title' key
titles = overridden.pluck('title')
# Compute and print the titles
print(titles.compute())
| [
"[email protected]"
] | |
ccd7c753cf3f1a7e04ca7b256c5f92fffcc69c25 | 3b2e30a6f082b4b21818eae44ea2f55fc25e7aa2 | /project/cart/views.py | 51a36c3411656d1a5ebb2b1e76ab2d20290d4d53 | [] | no_license | alekseykonotop/online_store_django | d9e9941ddedd783b38b5592ab2a3af5e35f0c2ee | 183cb3680b5b8f90457ea144dafaa96c13a3433d | refs/heads/master | 2020-07-30T09:13:57.449081 | 2019-11-07T19:46:58 | 2019-11-07T19:46:58 | 210,168,644 | 0 | 0 | null | 2020-06-05T23:07:09 | 2019-09-22T15:19:34 | JavaScript | UTF-8 | Python | false | false | 942 | py | from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from store.models import Product, Category
from .cart import Cart
from .forms import CartAddProductForm
@require_POST
def cart_add(request, product_id):
cart = Cart(request)
product = get_obj... | [
"[email protected]"
] | |
c8214a41a82f875f402de97e2db11c439208e33c | cf2ec51dfcb2d6777b5045137d2bcfe62afdec8c | /upvcarshare/core/templatetags/core_tags.py | 9e4b4acedbe5f435252e61b22be188f25d1f1041 | [] | no_license | morrme/upvcarshare | c4b8b1587370e7931d8b5d6c78b948188617795c | 189c91c608d0b61f6b68ef5c49a2546fdbbe38a2 | refs/heads/master | 2021-01-22T22:07:52.611880 | 2017-05-29T14:57:36 | 2017-05-29T14:57:36 | 88,732,669 | 0 | 0 | null | 2017-04-19T10:33:58 | 2017-04-19T10:33:58 | null | UTF-8 | Python | false | false | 1,295 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function, absolute_import
from django import template
from django.conf import settings
from django.http import QueryDict
from journeys import DEFAULT_GOOGLE_MAPS_SRID
from journeys.helpers import make_point
register = template.Library()
@regist... | [
"[email protected]"
] | |
26cb68b12f6852ef885417963ed3f227dde4232b | ad6681ec221fddc78956d45182f22bd8f1aae8e1 | /基础班/python基础班作业/zuoye5.py | d7778e78f4774e78cf7432ba9bdc60433604db33 | [] | no_license | caoxp930/MyPythonCode | cb2428fd7078100df0b118f64713b7db76fe1e23 | 6b7e17b23fbaddcc69812ba7a14a0a5ad548ad4b | refs/heads/master | 2023-03-15T01:22:17.847582 | 2021-03-02T12:37:09 | 2021-03-02T12:37:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | # -*- coding: utf-8 -*-
for i in range(1,10):
for j in range(1,i+1):
print(j,'*',i,'=',i*j,end='\t')
if i == j:
print() | [
"[email protected]"
] | |
774d14b2179139ab271f99c788c217d85202583e | f61db5940e29773aba8fc342a21de00e91a5ab2e | /base/day9/02python操作文件.py | a7f6d0023d40ea4faa5dadda9bbcdb01e1cb4462 | [] | no_license | liyaozr/project | c17a9dcbcda38fe9a15ec4c41a01242a13695991 | 0b0fc10e267ceb19f6792b490fede177035459fe | refs/heads/master | 2020-11-29T18:38:03.297369 | 2020-03-10T01:11:00 | 2020-03-10T01:11:00 | 230,190,916 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,339 | py | """
============================
Author:柠檬班-木森
Time:2020/1/13 20:28
E-mail:[email protected]
Company:湖南零檬信息技术有限公司
============================
"""
"""
python操作文件
open的常用参数:
第一个:要打开的文件名字或者文件路径
第二个参数:文件打开的模式
r:只读模式
rb:只读模式,以二进制的编码格式去打开文件
第三个参数:
encoding:用来指定打开文件的编码格式(使用rb的时候,不需要加该参数)
"""
# 读取同级目录下的文件,... | [
"[email protected]"
] | |
de1275ebc2f6aa4b9161b36c637abba3cfb8339b | 055b7c4c2118e6e862cfae344d722e8e90534cb4 | /config.py | 5aa53ff4827b52082755f58b81f4fb855ebf1ae7 | [] | no_license | Omulosi/iReporter | 745b3194f5a06371ca01c4d790cac763a09cf89f | db80d76b84d786330fb389d94c2623cbbad13be9 | refs/heads/develop | 2022-12-09T13:42:32.856875 | 2019-04-23T04:14:27 | 2019-04-23T04:14:27 | 158,638,861 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,162 | py |
'''
instance.config
------------------
This module provides default configuration values.
'''
import os
from datetime import timedelta
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config:
'''
Base configurat... | [
"[email protected]"
] | |
2355da4fe0a15ebbd2427a4c7f7b891e2e2ad149 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/contrib/cv/pose_estimation/Hourglass_for_PyTorch/mmpose-master/demo/mmdetection_cfg/faster_rcnn_r50_fpn_1x_coco.py | 4fb90266f00299d6ac45e49f928e81c2c3eb7535 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 6,403 | py | # -*- coding: utf-8 -*-
# Copyright 2021 Huawei Technologies 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 app... | [
"[email protected]"
] | |
bc3798906716aa41be8beb4ecc2a2c58459a8f86 | dc767b48d46e2f6b9851ce61914e880fc95fe520 | /myshop/shop/migrations/0001_initial.py | cca6008d38c1c259f458a69c4f61f46f334c2252 | [] | no_license | EdmilsonSantana/django-by-example | c06081a1a3915aaf3996d017fea91c8273cbe2e0 | 7c895b55b8f6fcc05a2d5cd2181bf207dc9256fc | refs/heads/master | 2021-01-12T02:58:49.261515 | 2017-02-28T20:05:29 | 2017-02-28T20:05:29 | 78,144,090 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,044 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-16 23:59
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... | [
"[email protected]"
] | |
78a758b50b7c3ecb4bb6e5761d61565d2eb317a5 | 2c5b25d0b5d6ba66d013251f93ebf4c642fd787b | /wrong_answer_codes/Contiguous_Array/Contiguous Array_324757576.py | 1c620fdc45f25037006caf70d00f3c54a4797b19 | [] | no_license | abhinay-b/Leetcode-Submissions | da8099ac54b5d36ae23db42580064d0f9d9bc63b | d034705813f3f908f555f1d1677b827af751bf42 | refs/heads/master | 2022-10-15T22:09:36.328967 | 2020-06-14T15:39:17 | 2020-06-14T15:39:17 | 259,984,100 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 787 | py | class Solution:
def findMaxLength(self, nums: List[int]) -> int:
count = [0]*2
start = end = 0
maxVal = 0
for idx,num in enumerate(nums):
count[num] += 1
diff = abs(count[0] - count[1])
# print(diff,start,end)
if diff > 1:
... | [
"[email protected]"
] | |
edcb724454b921fe8dc091a316470e10f89459df | 6cea6b8cfeef78b433e296c38ef11f4637609f20 | /src/collectors/ipmisensor/test/testipmisensor.py | 66a79164c5d9b0f45141583e0676c31a4b5b8902 | [
"MIT"
] | permissive | philipcristiano/Diamond | b659d577ec054c06ab99308d6c2ba3163de84e1a | 577270ea820af597458aa5d3325367608cd37845 | refs/heads/master | 2021-01-18T10:04:59.057835 | 2012-08-02T04:08:02 | 2012-08-02T04:08:02 | 3,140,864 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,392 | py | #!/usr/bin/python
################################################################################
from test import *
from diamond.collector import Collector
from ipmisensor import IPMISensorCollector
################################################################################
class TestIPMISensorCollector(Coll... | [
"[email protected]"
] | |
a4bcbc3ea13c6d7161096668057371a82bc97ec8 | e7ea544475ebfa70ebdf5d5949bde9e23edc60ba | /gbp/scripts/common/buildpackage.py | e1edfb29587dfad1895660c095e2fe13141cba7b | [] | no_license | dcoshea/git-buildpackage | 80cb7d890222488663a09e3d790fc5e985f791b9 | f4aa76bfcda1ded4649cd071b123ef8d7bf2344d | refs/heads/master | 2020-05-26T21:05:37.574986 | 2017-02-19T13:17:11 | 2017-02-19T13:17:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,061 | py | # vim: set fileencoding=utf-8 :
#
# (C) 2006-2011, 2016 Guido Guenther <[email protected]>
# (C) 2012 Intel Corporation <[email protected]>
# 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 Softwa... | [
"[email protected]"
] | |
a46afda8041485109144a60243600a990bd2b7d1 | c0d5b7f8e48a26c6ddc63c76c43ab5b397c00028 | /tests/columns/test_array.py | 731e15ff8b962d66534e989094fe5f8cbef23a93 | [
"MIT"
] | permissive | aminalaee/piccolo | f6c5e5e1c128568f7ccb9ad1dfb4746acedae262 | af8d2d45294dcd84f4f9b6028752aa45b699ec15 | refs/heads/master | 2023-07-14T09:44:04.160116 | 2021-07-11T22:56:27 | 2021-07-11T22:56:27 | 386,398,401 | 0 | 0 | MIT | 2021-07-15T19:32:50 | 2021-07-15T19:08:17 | null | UTF-8 | Python | false | false | 2,199 | py | from unittest import TestCase
from piccolo.table import Table
from piccolo.columns.column_types import Array, Integer
from tests.base import postgres_only
class MyTable(Table):
value = Array(base_column=Integer())
class TestArrayPostgres(TestCase):
"""
Make sure an Array column can be created.
"""
... | [
"[email protected]"
] | |
3f259779a113f38727e5e331c041593a3830edfe | caaf56727714f8c03be38710bc7d0434c3ec5b11 | /tests/components/telegram/test_notify.py | 7488db49d9ea58db8f78e93cab0842fa686ee119 | [
"Apache-2.0"
] | permissive | tchellomello/home-assistant | c8db86880619d7467901fd145f27e0f2f1a79acc | ed4ab403deaed9e8c95e0db728477fcb012bf4fa | refs/heads/dev | 2023-01-27T23:48:17.550374 | 2020-09-18T01:18:55 | 2020-09-18T01:18:55 | 62,690,461 | 8 | 1 | Apache-2.0 | 2023-01-13T06:02:03 | 2016-07-06T04:13:49 | Python | UTF-8 | Python | false | false | 1,598 | py | """The tests for the telegram.notify platform."""
from os import path
from homeassistant import config as hass_config
import homeassistant.components.notify as notify
from homeassistant.components.telegram import DOMAIN
from homeassistant.const import SERVICE_RELOAD
from homeassistant.setup import async_setup_componen... | [
"[email protected]"
] | |
3169f03ad1a82380f124de333e6a15857ecf1ae8 | 4fc21c3f8dca563ce8fe0975b5d60f68d882768d | /GodwillOnyewuchi/Phase 1/Python Basic 2/day 12 task/task10.py | a4924e40fbc8159a266fbfd0579729acab934db6 | [
"MIT"
] | permissive | Uche-Clare/python-challenge-solutions | 17e53dbedbff2f33e242cf8011696b3059cd96e9 | 49ede6204ee0a82d5507a19fbc7590a1ae10f058 | refs/heads/master | 2022-11-13T15:06:52.846937 | 2020-07-10T20:59:37 | 2020-07-10T20:59:37 | 266,404,840 | 1 | 0 | MIT | 2020-05-23T19:24:56 | 2020-05-23T19:24:55 | null | UTF-8 | Python | false | false | 290 | py | # Python program to get numbers divisible by fifteen from a list using an anonymous function
def divisibleby15(lists):
newList = []
for i in lists:
if i % 15 == 0:
newList.append(i)
return newList
print(divisibleby15([23, 56, 12, 15, 45, 23, 70, 678, 90])) | [
"[email protected]"
] | |
ce6667dc95fdefc8be193b41ae44902d4600a89a | 7a9c01f7029e74c697100e244d26c72d0e283d47 | /models/amenity.py | 9adbf8d9f5418e8b43eeb584cccd1acbde12617c | [] | no_license | toyugo/holbertonschool-AirBnB_clone | 63321296ecee98b1a0cda39c7b155cc2ea5ececb | 5edaeafb6516130f2027b505fe8b168f6f9de174 | refs/heads/main | 2023-03-21T06:32:18.728878 | 2021-03-04T13:08:56 | 2021-03-04T13:08:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | #!/usr/bin/python3
""" Module Amenity """
from models.base_model import BaseModel
class Amenity(BaseModel):
""" Class Amenity base en BaseModel """
name = ""
| [
"[email protected]"
] | |
c4b2fcaa8f6499cdca69575ead3662b305b1ccd5 | 4ed33dba672aa6aaef42698ef8437c872b078d37 | /backend/home/migrations/0001_load_initial_data.py | e78b5b69ad3761f691200103468335142fc62434 | [] | no_license | crowdbotics-apps/flat-heart-27928 | aecb93c66e39e94e01cef7fe9506effe994cde18 | ce209de8910b1e9f006814b58a05aed1eeada32d | refs/heads/master | 2023-05-26T14:51:41.045373 | 2021-06-11T20:01:34 | 2021-06-11T20:01:34 | 376,130,678 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | from django.db import migrations
def create_site(apps, schema_editor):
Site = apps.get_model("sites", "Site")
custom_domain = "flat-heart-27928.botics.co"
site_params = {
"name": "Flat Heart",
}
if custom_domain:
site_params["domain"] = custom_domain
Site.objects.update_or_cr... | [
"[email protected]"
] | |
6bc05f1c24acd83be18b9337a531c43c42f39d63 | 6e928e1651713f945c980bca6d6c02ac5dce249a | /task1/5.py | 64b92c59d071daed1a062f5bbc9c61742d9564d9 | [] | no_license | Akzhan12/pp2 | 97334158b442383df32583ee6c0b9cab92a3ef45 | 56e33fd9119955ea8349172bf3f2cc5fbd814142 | refs/heads/main | 2023-06-28T08:30:11.068397 | 2021-07-29T08:34:43 | 2021-07-29T08:34:43 | 337,359,826 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 211 | py | a = list(map(int,input().split()))
n = int(input()) % len(a)
if n < 0:
n = abs(n)
print(*a[n:],end = " ")
print(*a[0:n])
else:
n = abs(n)
print(*a[-n:],end = " ")
print(*a[0:-n]) | [
"[email protected]"
] | |
e5ab44dc776222c231274dd703bcd5aebdb8b110 | f207586e34b37b13ee6012ea08f174e302fa0078 | /mimo/util/decorate.py | cf41979d6dfcac6b024ecd468df4e0901d8627e7 | [
"MIT"
] | permissive | pnickl/mimo | 92b7858108e077ff43082f15f635d1205120b143 | 81c4bbd2594e2136445009eae752ab8a1602a1cf | refs/heads/master | 2022-12-24T02:10:34.838878 | 2020-08-04T19:24:21 | 2020-08-04T19:24:21 | 302,394,694 | 2 | 0 | MIT | 2020-10-08T16:07:26 | 2020-10-08T16:07:25 | null | UTF-8 | Python | false | false | 1,796 | py | def pass_obs_arg(f):
def wrapper(self, obs=None, **kwargs):
if obs is None:
assert self.has_data()
obs = [_obs for _obs in self.obs]
else:
obs = obs if isinstance(obs, list) else [obs]
return f(self, obs, **kwargs)
return wrapper
def pass_obs_and_la... | [
"[email protected]"
] | |
b9c5ca1798fcaffb1707909fd79abe2418769bda | 04ac33f68827aeef7d5bc441d10979143828ef1a | /contactSpider.py | 037682c5a672fc9a935a9454eaef442e24e5a338 | [] | no_license | samshultz/realtor_agent_spider | a06e99af15fc78902c5f44fcb91dd6d55490b14f | 4550301a9e4733ad19bd6fd904e079037847bbf7 | refs/heads/master | 2021-07-05T04:28:17.703484 | 2017-09-30T02:22:34 | 2017-09-30T02:22:34 | 105,333,052 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,933 | py | import scrapy
class ContactSpider(scrapy.Spider):
# name of the spider
name = "contacts"
# the url to start scraping from
start_urls = [
"https://www.realtor.com/realestateagents/Los-Angeles_CA"
]
def parse(self, response):
# check the page for the name of the agent...
... | [
"[email protected]"
] | |
43078cfccfee9f2bbde2f0af3de46006b564a128 | 0725ed7ab6be91dfc0b16fef12a8871c08917465 | /tree/is_bst.py | 26ed670c86a2703f7550da0fa62852b62ed81d7b | [] | no_license | siddhism/leetcode | 8cb194156893fd6e9681ef50c84f0355d09e9026 | 877933424e6d2c590d6ac53db18bee951a3d9de4 | refs/heads/master | 2023-03-28T08:14:12.927995 | 2021-03-24T10:46:20 | 2021-03-24T10:46:20 | 212,151,205 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 716 | py | # A binary tree node
import sys
class Node:
# Constructor to create a new node
def __init__(self, data):
self.data = data
self.left = None
self.right = None
def is_bst(node, min_limit, max_limit):
if not node:
return True
if not (min_limit < node.data < max_limit):
... | [
"[email protected]"
] | |
3987405f70f48d91c8ac18c9912585cb8b9c44d3 | 5ba345bc16519d892fb533451eeface7c76a7d48 | /Classification/Logistic-Regression/LogisticRegression.py | 33ac92c5f131dde88d715d277e16cca84ae2164e | [] | no_license | sayands/machine-learning-projects | 337fd2aeb63814b6c47c9b2597bfe1ce4399a1f1 | 8e516c0ac3a96a4058d063b86559ded9be654c35 | refs/heads/master | 2021-05-06T16:26:37.008873 | 2018-08-02T20:27:20 | 2018-08-02T20:27:20 | 113,749,745 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,653 | py | #Logistic Regression
#Importing libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
#Importing the dataset
dataset = pd.read_csv('Social_Network_Ads.csv')
X = dataset.iloc[:, 2:4].values
Y = dataset.iloc[:, 4].values
#Splitting the dataset into the Training Set and Test set
from sklearn... | [
"[email protected]"
] | |
fc5d1edb3647e18a663c8c43b897809c51abbf89 | 4c2a391f2f4d7361f2c7111b6d63edf67056f327 | /model/oauth.py | 4c650a7683108b8d5c4e420c7b90b52c00c2172a | [] | no_license | niyoufa/tnd_server | 6d69db32ceb5a6a14417b3e8b0f021fdc0e7e79c | 59c9ac6769773573685be215b4674d77545fe127 | refs/heads/master | 2020-06-23T15:43:28.891619 | 2016-08-26T03:44:01 | 2016-08-26T03:44:01 | 66,613,944 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | # -*- coding: utf-8 -*-
"""
author : youfaNi
date : 2016-07-13
"""
from bson.son import SON
import renren.model.model as model
import renren.libs.mongolib as mongo
import renren.consts as consts
import renren.libs.utils as utils
class OauthModel(model.BaseModel,model.Singleton):
__name = "renren.oauth_cl... | [
"[email protected]"
] | |
ea71dcf4271de4375a1cd100421e6cb04179b2a8 | ae1d96991a256b905ab8793ebc6063a9628cef02 | /muddery/combat/normal_combat_handler.py | f572690ce4f9a5ce3b3ed3411737fa890fdf193b | [
"BSD-3-Clause"
] | permissive | FWiner/muddery | bd2028e431dbeae16d6db9806cd2e9a7f4c5f22d | f6daa5fab6007e7c830e301718154fbc7b78b2bb | refs/heads/master | 2020-07-31T23:02:54.165362 | 2019-09-04T13:29:59 | 2019-09-04T13:29:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,083 | py | """
Combat handler.
"""
from django.conf import settings
from muddery.utils import defines
from muddery.utils.builder import delete_object
from muddery.combat.base_combat_handler import BaseCombatHandler
class NormalCombatHandler(BaseCombatHandler):
"""
This implements the normal combat handler.
"""
... | [
"[email protected]"
] | |
9aefb0ae5bd605c4dae7ca200d14f1508eb9fb11 | f0755c0ca52a0a278d75b76ee5d9b547d9668c0e | /atcoder.jp/abc084/abc084_d/Main.py | 672f72253da43a227e962b8055a0caa9001017ec | [] | no_license | nasama/procon | 7b70c9a67732d7d92775c40535fd54c0a5e91e25 | cd012065162650b8a5250a30a7acb1c853955b90 | refs/heads/master | 2022-07-28T12:37:21.113636 | 2020-05-19T14:11:30 | 2020-05-19T14:11:30 | 263,695,345 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | def primes(n):
is_prime = [1]*(n+1)
is_prime[0] = 0
is_prime[1] = 0
for i in range(2, int(n**0.5) + 1):
if not is_prime[i]:
continue
for j in range(i*2,n+1,i):
is_prime[j] = 0
return is_prime
max = 100001
prime = primes(max)
a = [0]*max
for i in range(max):
... | [
"[email protected]"
] | |
fb95a962370d7b4bb6c6d781611394a5ad69f45a | e3fe234510d19c120d56f9a2876b7d508d306212 | /17tensorflow/5_lm/ngram/ngram.py | 6146628f947c8ebec2603563c38c067b7d61b32d | [
"Apache-2.0"
] | permissive | KEVINYZY/python-tutorial | 78b348fb2fa2eb1c8c55d016affb6a9534332997 | ae43536908eb8af56c34865f52a6e8644edc4fa3 | refs/heads/master | 2020-03-30T02:11:03.394073 | 2019-12-03T00:52:10 | 2019-12-03T00:52:10 | 150,617,875 | 0 | 0 | Apache-2.0 | 2018-09-27T16:39:29 | 2018-09-27T16:39:28 | null | UTF-8 | Python | false | false | 3,057 | py | # -*- coding: utf-8 -*-
# Author: XuMing <[email protected]>
# Data: 17/11/29
# Brief:
"""读取语料 生成 n-gram 模型"""
from collections import Counter, defaultdict
from pprint import pprint
from random import random
import jieba
N = 2 # N元模型
START = '$$' # 句首的 token
BREAK = '。!?' # 作为句子结束的符号
IGNORE = '\n “”"《》〈〉()*' # ... | [
"[email protected]"
] | |
5630da04cc30441eabf72f420f1a24217fbaba01 | e2423781704811bf0a0ecc07f9cb29d0a044ac48 | /tensorflow_datasets/image/bccd/dummy_data_generation.py | bddde3b24d939e2a794def3d52ba9eee64bd8de6 | [
"Apache-2.0"
] | permissive | mbbessa/datasets | af2506a8cf5c46c33143d6e0266ba50d8b4c3fcc | 2a7e8e793197637948ea0e0be4aa02a6aa2f7f55 | refs/heads/master | 2021-11-30T22:28:55.825453 | 2021-11-19T20:49:49 | 2021-11-19T20:52:42 | 171,528,015 | 0 | 0 | Apache-2.0 | 2019-02-19T18:34:26 | 2019-02-19T18:34:26 | null | UTF-8 | Python | false | false | 5,387 | py | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | [
"[email protected]"
] | |
a1cc5cf11e5624b2b3f89755554f97571fd1a25b | f759188e90610e08b4d85358abeaf27f2796964e | /tinyos-main/apps/PIR_Sensor/util/Listener.py | 464d97ddd4475819140e31d39a6f13222a0dc46e | [] | no_license | SoftwareDefinedBuildings/KetiMotes | 5555626231edb1cb76cb96bb4134a52d1d88bbb1 | b6dfea4b7d3dd384dd78a91ce62e7990cd337009 | refs/heads/master | 2020-04-06T23:55:42.151717 | 2014-09-11T18:25:17 | 2014-09-11T18:25:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,595 | py |
import socket
import UdpReport
import re
import sys
import time
import threading
port = 7000
stats = {}
class PrintStats(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.daemon = True
def run(self):
while True:
self.print_stats()
tim... | [
"[email protected]"
] | |
5f68224654afb98c99125e28a341ed8dd9de664a | 316c473d020f514ae81b7485b10f6556cf914fc0 | /scrapycrawlspidertest/scrapycrawlspidertest/spiders/universal.py | 38f44ee1edb89a378c243113f5a699a7ccc43884 | [
"Apache-2.0"
] | permissive | silianpan/seal-spider-demo | ca96b12d4b6fff8fe57f8e7822b7c0eb616fc7f3 | 7bdb77465a10a146c4cea8ad5d9ac589c16edd53 | refs/heads/master | 2023-06-20T03:47:04.572721 | 2023-05-24T06:27:13 | 2023-05-24T06:27:13 | 189,963,452 | 1 | 1 | Apache-2.0 | 2022-12-08T03:24:54 | 2019-06-03T08:15:56 | Python | UTF-8 | Python | false | false | 1,855 | py | # -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
from scrapycrawlspidertest.utils import get_config
from scrapycrawlspidertest.items import *
from scrapycrawlspidertest.wraps import *
from scrapycrawlspidertest import urls
class Univers... | [
"[email protected]"
] | |
a5d5b5d8d00dd3c8d9faee9c11aeea428df67616 | fd94ec2d4cfcdb8aa41c2ecf92504a6502987b54 | /scripts/EmuMarker.py | 27dad104e3e1fda0c3243804da0f8a2a8f3c2f84 | [
"LicenseRef-scancode-glut",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"Unlicense",
"MIT",
"SGI-B-2.0"
] | permissive | greggman/regal | 70bccfd935c42f2a532471f84f164b9992886bce | 60d5f5f060dcbfa6ff2cdd5bf8823fd5a9cf11db | refs/heads/master | 2020-12-30T19:11:25.692166 | 2012-09-12T14:39:39 | 2012-09-12T14:39:39 | 5,432,185 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 854 | py | #!/usr/bin/python -B
formulae = {
'Insert' : {
'entries' : [ 'glInsertEventMarkerEXT' ],
'impl' : [ '_context->marker->InsertEventMarker( _context, ${arg0plus} );',
'RegalAssert(_context->info);',
'if (!_context->info->gl_ext_debug_marker) return;' ]
},
... | [
"[email protected]"
] | |
f4acaf7682a9a1e14d09298963943cca14536cb0 | 7b38197bb4772724f5e875f9d3b79d61050a072b | /BioSTEAM 1.x.x/biorefineries/cornstover/_plot_spearman.py | 0c107226c916f5a7750fac6a89132a83827bf351 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | yalinli2/Bioindustrial-Park | fac6d58d82af56f5081f529c3ee0c65a70fe7bd3 | 196e2d60ec9bf0466ef804d036c995b89bc72f72 | refs/heads/master | 2021-09-24T11:24:26.586458 | 2021-09-09T14:05:33 | 2021-09-09T14:05:33 | 232,337,200 | 2 | 0 | MIT | 2021-09-09T14:05:34 | 2020-01-07T14:04:05 | Jupyter Notebook | UTF-8 | Python | false | false | 2,749 | py | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 16 00:02:57 2019
@author: yoelr
"""
import pandas as pd
from biosteam import colors
from biosteam.evaluation.evaluation_tools import plot_spearman
# %% Plot Spearman correlations
# Replacement parameter labels
replacement_labels = {
'Stream-Ethanol price': 'Ethanol... | [
"[email protected]"
] | |
5cc4b052f8af56030d1a18a236cfee198c0e14a0 | c7a6f8ed434c86b4cdae9c6144b9dd557e594f78 | /ECE364/.PyCharm40/system/python_stubs/348993582/gst/_gst/Date.py | b079f8261188a978cb48855b5781e2227e2dea1e | [] | no_license | ArbalestV/Purdue-Coursework | 75d979bbe72106975812b1d46b7d854e16e8e15e | ee7f86145edb41c17aefcd442fa42353a9e1b5d1 | refs/heads/master | 2020-08-29T05:27:52.342264 | 2018-04-03T17:59:01 | 2018-04-03T17:59:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 822 | py | # encoding: utf-8
# module gst._gst
# from /usr/lib64/python2.6/site-packages/gst-0.10/gst/_gst.so
# by generator 1.136
# no doc
# imports
import gobject as __gobject
import gobject._gobject as __gobject__gobject
import gst as __gst
class Date(__gobject.GBoxed):
# no doc
def __init__(self, *args, **kwargs): ... | [
"[email protected]"
] | |
71f09344d33d23e6d19b7a1d9894d79eb5f34f8d | 986236feac0d098977dc3f98b705d68155048233 | /0x06-python-classes/100-singly_linked_list.py | 1e413ac97d382295ceaf0a64d2ca75f43de9041b | [] | no_license | Noeuclides/holbertonschool-higher_level_programming | 1f1ec5731840f39ab988593ace190403f701ee67 | fcf0d733b73904a848b5718266a644c4f6452166 | refs/heads/master | 2020-05-18T03:28:56.901071 | 2019-10-03T17:30:20 | 2019-10-03T17:30:20 | 184,145,627 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 352 | py | #!/usr/bin/python3
class Node:
def __init__(self, data=0):
if type(size) is not int:
raise TypeError("size must be an integer")
elif size < 0:
raise ValueError("size must be >= 0")
else:
self.__size = size
def data(self):
return(self.__size **... | [
"[email protected]"
] | |
c2ef80a416cc1c202f00d685ef27f6d11b3faf08 | 4fed7ad67d3bb7da502acaf347dff542971c1c4c | /app.py | 24f400a3d432d02740af9391a5b196df5498a484 | [
"MIT"
] | permissive | coolsnake/WebFtp | b62437b895261f3083d3f7d3550b541116b30cef | d76bce2391d393d2eeb92be7700dd49a1663e696 | refs/heads/master | 2021-04-15T14:05:50.752335 | 2017-09-25T10:59:50 | 2017-09-25T10:59:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 818 | py | #!/usr/bin/env python3
import tornado.ioloop
import tornado.web
from controllers import index
from controllers import account
settings = {
'template_path': 'template',
'static_path': 'static',
'static_url_prefix': '/static/',
'cookie_secret': '43809138f51b96f8ac24e79b3a2cb482',
'login_url': '/logi... | [
"[email protected]"
] | |
9c26acdd9f243cc659a6ae97ad61d70e3a774709 | af3ec207381de315f4cb6dddba727d16d42d6c57 | /dialogue-engine/src/programy/spelling/textblob_spelling.py | 17dce9132a295389213305638b9ac113ad1c6fc2 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mcf-yuichi/cotoba-agent-oss | 02a5554fe81ce21517f33229101013b6487f5404 | ce60833915f484c4cbdc54b4b8222d64be4b6c0d | refs/heads/master | 2023-01-12T20:07:34.364188 | 2020-11-11T00:55:16 | 2020-11-11T00:55:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,540 | py | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distri... | [
"[email protected]"
] | |
2146739f9834f0af7d112fc44b3b75d696d80c39 | f1a51bb6cb5810a2dfac27cbbe32f5c5761bd8ec | /angrmanagement/data/object_container.py | 63b931645b8e1c14d8a5902e8eb52b570ff38979 | [
"BSD-2-Clause"
] | permissive | sraboy/angr-management | 904848408e9eec6662e16d9b69a0991b0374d3c6 | 4c4c1df7bce7083547ae38a19709f33dd10b7e22 | refs/heads/master | 2020-04-30T17:23:24.427321 | 2019-09-21T09:34:21 | 2019-09-21T09:34:21 | 176,977,927 | 0 | 1 | BSD-2-Clause | 2019-03-21T15:52:06 | 2019-03-21T15:52:06 | null | UTF-8 | Python | false | false | 2,374 | py |
from ..utils.namegen import NameGenerator
class EventSentinel:
def __init__(self):
self.am_subscribers = []
def am_subscribe(self, listener):
if listener is not None:
self.am_subscribers.append(listener)
def am_unsubscribe(self, listener):
if listener is not None:
... | [
"[email protected]"
] | |
a4f282d077acf231c813e0781067964299e282f7 | 6f50d88145923deba55f5df5f88e872a46504f71 | /siteconfig/utils.py | e51be1affa4f0bc68f3bca34d399fc656a2d03cf | [] | no_license | vfxetc/siteconfig | ce85cff95a865a8ab6271f305b70643c364c1952 | 7124e941cf5068a70f07d0011902af797b74657e | refs/heads/master | 2021-09-12T13:00:40.933138 | 2017-08-04T15:08:42 | 2017-08-04T15:08:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 314 | py | import re
def normalize_key(input_):
input_ = re.sub(r'[^\w\[\]]+', '_', input_)
input_ = re.sub(r'^(\w+)', lambda m: m.group(1).upper(), input_)
return input_
def shell_escape(input_):
return str(input_).replace('"', '\\"')
def shell_quote(input_):
return '"%s"' % shell_escape(input_)
| [
"[email protected]"
] | |
30054b750cf65f48a5410dc67d6c9fd17cee69f1 | 53947441840357e3966eda580c6a5de3e0b92613 | /blaze/module/qualname.py | 65b9d324944ebfcc5fd2d0ce2f7ac4a97f5915c3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | jedbrown/blaze-core | 8b9eda6267253e1609a7382197ffdf67a41407f6 | b2f0d350f5cb7b802819ca46738bacdbe70db13a | refs/heads/master | 2021-01-17T06:24:38.307059 | 2013-04-04T18:24:36 | 2013-04-04T18:24:36 | 9,283,188 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,381 | py | #------------------------------------------------------------------------
# Names
#------------------------------------------------------------------------
class Namespace(object):
def __init__(self, names):
self.names = names
def show(self):
return '.'.join(self.names)
class QualName(object)... | [
"[email protected]"
] | |
b1b10f74c7b2b141fab2f67520ef2bafb047a1f3 | 051d25888b6a36e50714fa5940f6a31ee951ce77 | /gentb_website/tb_website/apps/dropbox_helper/dropbox_util.py | f43f6ff658915949644e878347d6b70ddd524912 | [
"MIT"
] | permissive | cchoirat/gentb-site | d0d627ffc160c53b61d92dc8f02a11f930a2b09a | 24ebce58cd5f5e0a2f1449e2f14b1f75b592f28f | refs/heads/master | 2021-01-21T02:20:55.909012 | 2015-11-25T18:27:23 | 2015-11-25T18:27:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,476 | py | from os.path import join, isdir
import os
from apps.dropbox_helper.dropbox_retriever import DropboxRetriever
from apps.dropbox_helper.models import DropboxRetrievalLog
from django.conf import settings
def get_dropbox_metadata(predict_dataset):
"""
Wrap the DropboxRetriever function
- (True, DropboxRetriev... | [
"[email protected]"
] | |
32f23cb372dfdf98567ae16228bdbb95e6934524 | 74549d7c57b4746ac2a9c275aa12bfc577b0e8af | /hogwartsEmailAdderss.py | 245b738aa52c6cc12e18274915c1042e79fc0fa9 | [] | no_license | abidkhan484/hackerrank_solution | af9dbf6ec1ead920dc18df233f40db0c867720b4 | b0a98e4bdfa71a4671999f16ab313cc5c76a1b7a | refs/heads/master | 2022-05-02T11:13:29.447127 | 2022-04-13T03:02:59 | 2022-04-13T03:02:59 | 99,207,401 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 354 | py | #!/bin/python3
import string
def isValid(email):
for i in range(5):
if email[i] not in string.ascii_lowercase:
return 'No'
else:
if email[5:] != '@hogwarts.com':
return 'No'
return 'Yes'
if __name__ == "__main__":
s = input().strip()
result... | [
"[email protected]"
] | |
f401333e5549b41f09b8c1318936448c3a83d737 | 98e1716c1c3d071b2fedef0ac029eb410f55762c | /part9-Manipulating-DataFrames-with-pandas/No08-Changing-index-of-a-DataFrame.py | c7f11201fbcc7e64a48481ca0e8a27f8c2375844 | [] | no_license | iamashu/Data-Camp-exercise-PythonTrack | 564531bcf1dff119949cbb75e1fd63d89cb2779f | c72a4e806494f0e263ced9594597dc8882c2131c | refs/heads/master | 2020-07-22T00:23:12.024386 | 2019-04-12T09:24:42 | 2019-04-12T09:24:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,477 | py | #Changing index of a DataFrame
'''
As you saw in the previous exercise, indexes are immutable objects. This means that if you want to change or modify the index in a DataFrame, then you need to change the whole index. You will do this now, using a list comprehension to create the new index.
A list comprehension is a s... | [
"[email protected]"
] | |
3d456ff2fdf7f69d9519317f0a9a47b44322d273 | f4b75e06e456dbd065dc57f07d55a2f5ec4ad688 | /openstates/data/migrations/0012_person_current_role.py | d9e866c1e3a313f007b32336097bd875c571590a | [
"MIT"
] | permissive | openstates/openstates-core | 19bf927a2e72c8808a5601f4454846acaf32218a | 3055632ea7ddab6432cc009989ffb437aed6e530 | refs/heads/main | 2023-09-05T10:30:58.866474 | 2023-09-01T15:43:59 | 2023-09-01T15:43:59 | 251,511,904 | 19 | 27 | MIT | 2023-09-06T19:30:03 | 2020-03-31T05:47:28 | Python | UTF-8 | Python | false | false | 477 | py | # Generated by Django 3.0.5 on 2020-08-04 15:24
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("data", "0011_auto_20200804_1108")]
operations = [
migrations.AddField(
model_name="person",
n... | [
"[email protected]"
] | |
497e345288a9d28536fdbaf5f67a2102b003849e | 7652b3d21519771aa073c4f4a9d66f4f4d5db013 | /creating-project/project/project_app/urls.py | de7fffc7ea068fde214f0d92d79c134b3e945a32 | [] | no_license | pavkozlov/NETOLOGY-Django-homeworks | 9c64cde294590c8a85c5f89fd2190fe989720c84 | c331fa10906470c974802932e9d7d7526841f6f1 | refs/heads/master | 2022-11-27T22:36:12.537296 | 2019-07-17T16:19:11 | 2019-07-17T16:19:11 | 189,250,824 | 0 | 1 | null | 2022-11-22T03:14:37 | 2019-05-29T15:20:09 | Python | UTF-8 | Python | false | false | 282 | py | from django.urls import path
from .views import stations_view
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('stations/', stations_view, name='stations_view')
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
| [
"[email protected]"
] | |
dcf60d425a75a5583dc890529bb1f1fffe42a262 | 428ee863e50fecfaedbbf64f3da95e9acb746ae4 | /src/tamsin/main.py | a9ea83fa097c8b5749742963afb74886d3b5d15a | [
"BSD-3-Clause",
"Unlicense",
"LicenseRef-scancode-public-domain"
] | permissive | catseye/Tamsin | ba53a0ee4ac882486a958e6ba7225f19eea763ef | 1c9e7ade052d734fa1753d612f2426ac067d5252 | refs/heads/master | 2021-01-17T09:21:25.202969 | 2016-03-31T15:00:14 | 2016-03-31T15:00:14 | 19,212,331 | 12 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,766 | py | # encoding: UTF-8
# Copyright (c)2014 Chris Pressey, Cat's Eye Technologies.
# Distributed under a BSD-style license; see LICENSE for more information.
import os
import subprocess
import sys
from tamsin.buffer import FileBuffer, StringBuffer
from tamsin.event import DebugEventListener
from tamsin.term import Atom
fr... | [
"[email protected]"
] | |
5b3e342ade56e396a3dfad0237f974e5082e1bc9 | 114b61513733083555924fc8ab347335e10471ae | /stackone/stackone/viewModel/MultipartPostHandler.py | df8c4aa526fbfe18ae6a303322624a6199dcffe3 | [] | no_license | smarkm/ovm | 6e3bea19816affdf919cbd0aa81688e6c56e7565 | cd30ad5926f933e6723805d380e57c638ee46bac | refs/heads/master | 2021-01-21T04:04:28.637901 | 2015-08-31T03:05:03 | 2015-08-31T03:05:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,033 | py | #!/usr/bin/python
####
# 02/2006 Will Holcomb <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later v... | [
"[email protected]"
] | |
2332d5c21dfd47be0eab2e6439fbacef32c5aeb3 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p3BR/R1/benchmark/startPyquil199.py | b8ba1c63c355402f38a256e26772b3f9cb67ca75 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,775 | py | # qubit number=2
# total number=33
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=1
pr... | [
"[email protected]"
] | |
f427572dcc294f2f278b1dc156e4b0e0c130a115 | a4c5a56ed6d3c4299213ff8fd0e4f37719e063ff | /tests/test_override.py | ec0ad1f2bfab03914d5df5c21408b1e52fcbb993 | [
"BSD-3-Clause"
] | permissive | pyecore/motra | 76add183cf2777bef5916b88e30dd2b3eef8cb06 | c0b3e8e54b46572c3bc10bb2b719102e267c371b | refs/heads/main | 2023-09-02T12:44:37.688979 | 2021-10-27T05:53:01 | 2021-10-27T05:53:01 | 395,357,398 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 965 | py | import pytest
import inspect
import pyecore.ecore as ecore
from motra import m2m
@pytest.fixture(scope='module')
def t1():
# Define a transformation meta-data
t = m2m.Transformation('t1', inputs=['in_model'], outputs=['in_model'])
@t.mapping(when=lambda self: self.name.startswith('Egg'))
def r1(self:... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.