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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6f2d0035b27900c2f7fc843139b6b74c96b2bf51 | ae2c2bdf3aba6b5bd0753778be1991f968e689ec | /dotbiz/migrations/0031_uploadedfile_file_name.py | 86e1abecbb628ab31cbfd47120129aac6079d12d | [] | no_license | bintangx1902/clone_biz | 7cd5ce56073ebd7627c93bb1608de10177a33dfd | 80ee7b04aaff167001f5cbd9307bd3f487d3919c | refs/heads/main | 2023-08-24T10:53:18.590655 | 2021-10-25T06:32:28 | 2021-10-25T06:32:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | # Generated by Django 3.1.4 on 2020-12-30 15:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dotbiz', '0030_uploadedfile'),
]
operations = [
migrations.AddField(
model_name='uploadedfile',
name='file_name',
... | [
"[email protected]"
] | |
6bbddf9120b6877356513aa49b8ece59f6e330f0 | f48778b953c76cfb0039735094eb2246d6e56177 | /graphs/enhanced_qos/experiment_rssi/plot_association.py | a8ac4e20efc2706cfee98114ffb05ca5c8729634 | [] | no_license | phisolani/wifi_monitoring | 36826c52a00cf79d71f93c4acd0dc8b6d56ff934 | 06c62e625d395e4f179b9fef95318a746fee1786 | refs/heads/master | 2021-06-07T02:53:59.832752 | 2021-04-09T09:36:37 | 2021-04-09T09:36:37 | 142,306,383 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 508 | py | #!/usr/bin/env python
__author__ = "Daniel Kulenkamp"
__copyright__ = "Copyright 2020, QoS-aware WiFi Slicing"
__license__ = "GPL"
__version__ = "1.0"
__maintainer__ = "Daniel Kulenkamp"
__email__ = "[email protected]"
__status__ = "Prototype"
" Python script for testing association plot"
from graphs.enhanced_qos.asso... | [
"[email protected]"
] | |
da866e6ea6f4eb4518bbc5ec3a0d9a1479af131e | c3c8b7779381c37a97c7176947f175a1168b6149 | /instrument/generate_port_agent_config.py | 95920fcfc744e6aff2b2d762f9af8f11f88e0f0a | [] | no_license | ronkyo/ooi-tools | 9f7e51dc6fbc8fc5d77d91d3523f4342e957f8e1 | 36034ae3f950ff7c585363c6cc07f8a51549185d | refs/heads/master | 2021-01-21T03:54:24.522565 | 2015-04-27T23:22:23 | 2015-04-28T20:52:01 | 25,649,899 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,645 | py | #!/usr/bin/env python
"""
generate_port_agent_config.py
Generate port agent configuration files and a supervisord file from CSV input
Usage:
generate_port_agent_config.py <path> <name> <csv_file>
"""
import shutil
import jinja2
import os
import docopt
from csv import DictReader
loader = jinja2.FileSystemLoader(s... | [
"[email protected]"
] | |
5b545d841152235d7e1f5f4957a3721084e203b0 | 8d6f73af697f56834e8cef88876be78a360190d9 | /flaskblog/users/forms.py | 73112b0e9cadba5151b9b28e081593b41fb3d9b2 | [] | no_license | Sukhrobjon/flask-blog | 7a837f3454263f69935d88cc3c73858a2848c22c | 357b311efd32f3537fce9f84ecbadd0835aac524 | refs/heads/master | 2020-04-18T10:49:58.829788 | 2019-02-25T23:28:14 | 2019-02-25T23:28:14 | 167,480,195 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,654 | py | from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileAllowed
from wtforms import StringField, PasswordField, SubmitField, BooleanField
from wtforms.validators import DataRequired, Length, Email, EqualTo, ValidationError
from flask_login import current_user
from flaskblog.models import User
class R... | [
"[email protected]"
] | |
bd65812cfdd6ab3cd0e5706f3851f79bf3fe9fda | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02803/s706884747.py | 68d1a7bdccac1d1136b3fdc1c6c24530314347e6 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,575 | py | import numpy as np
H, W = map(int, input().split())
map_lis = [input() for i in range(H)]
ans = 0
def prob(x,y,h,w):
if 0<=x<h and 0<=y<w:
return True
else:
return False
def count(x,y,lis):
if not lis[x][y]:
return True
else:
return False
def maze(x,y,lis):
if lis[x][y] == ".":
return T... | [
"[email protected]"
] | |
098e437846ce6912a30c7c1604db09a0b6f8e608 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/87/usersdata/190/59803/submittedfiles/contido.py | 665f253469da7a4df1c7e7b19b10513a1ca38f72 | [] | 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 | 232 | py | # -*- coding: utf-8 -*-
n=int(input('digite o numero de elementos de a:'))
m=int(input('digite o numero de elementos de b:'))
a=[]
b=[]
for i in range(1,n+1,1):
valor=float(input('digite o valor:'))
a.append(valor)
print(a) | [
"[email protected]"
] | |
7f66de5ad7a64720048a36fbb2fe4e9553f4d762 | cb57a9ea4622b94207d12ea90eab9dd5b13e9e29 | /lc/python/0404_sum_of_left_leaves.py | 8933e5d4e7cc50241ba77f57829793df8661ba7e | [] | no_license | boknowswiki/mytraning | b59585e1e255a7a47c2b28bf2e591aef4af2f09a | 5e2f6ceacf5dec8260ce87e9a5f4e28e86ceba7a | refs/heads/master | 2023-08-16T03:28:51.881848 | 2023-08-10T04:28:54 | 2023-08-10T04:28:54 | 124,834,433 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,263 | py |
# binary tree and dfs
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def sumOfLeftLeaves(self, root: Optional[TreeNode]) -> int:
if not root:
... | [
"[email protected]"
] | |
a5693d14d44e83141c8b81ec18c896a2cc1e4a0d | 5842d17a6c85f7e135609fc9e9951978ad42e6a5 | /app/migrations/0015_userprofile_tz.py | cfecfa463d489995a488b33d945bc7b61d423689 | [] | no_license | projectdata8thsem/lctva | ca95f56b8f3ceaffe6ef724fddcde2f3edb37e30 | 71522cd65451cc52f65eed2033f4ae2bac52040f | refs/heads/master | 2020-04-07T06:03:45.380412 | 2016-10-11T20:05:34 | 2016-10-11T20:05:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-07 03:21
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0014_auto_20160102_1636'),
]
operations = [
migrations.AddField(
... | [
"[email protected]"
] | |
e647def5e76581edc66f86e284a7583b0c68c1e2 | c32809922bbdb8bef698f9979999187a30823d8f | /setup.py | a5da1976c5aad387385a747d3276c2692a26520b | [
"MIT"
] | permissive | mattdennewitz/pat | 6f98cc19ed7d647dac27ffee6d434fac0be63107 | 782ebf29a75ab9b35d45fc11d2eb7a50fa2f611b | refs/heads/master | 2020-04-01T18:45:35.721013 | 2016-07-27T05:35:20 | 2016-07-27T05:35:20 | 64,279,791 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 741 | py | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
import pip.download
from pip.req import parse_requirements
reqs_txt = os.path.join(os.path.dirname(__file__), 'requirements.txt')
pip_reqs = parse_requirements(reqs_txt, session=pip.download.PipSession())
pip_reqs = [str(obj.req) for obj in... | [
"[email protected]"
] | |
0182379e6cb385585af008abaae27b6f33a00cb1 | cbd2f3db68ec311e0d40f5281111bc3a8f200115 | /modelo/bookings/api/urls.py | ef95c12cefbd96832bd4ab68b6f9dfb1c5b4e6b3 | [] | no_license | CoutinhoElias/fullcalendar | fceff2dfae07508f02ceabf0247bac2da4528224 | 4553828cd1dd20f15a139bf535060b9cee27d3f1 | refs/heads/master | 2020-03-09T20:28:53.020188 | 2018-04-25T20:35:37 | 2018-04-25T20:35:37 | 128,986,130 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,033 | py | from django.conf.urls import url
from django.contrib import admin
from modelo.bookings.api.serializers import BookingListFeriadoSerializer
app_name = 'bookings-api'
from .views import (
PostListAPIView,
PostListFeriadoAPIView,
PostDetailAPIView,
PostDeleteAPIView,
PostUpdateAPIView,
PostCreate... | [
"[email protected]"
] | |
0c7322d41077b64b7c875f3f2f1d39845ebd37f3 | d93159d0784fc489a5066d3ee592e6c9563b228b | /Calibration/EcalAlCaRecoProducers/python/ALCARECOEcalESAlign_Output_cff.py | 4dd5cc22d3f4dbedd90a21eaf5229cad92c545c6 | [] | permissive | simonecid/cmssw | 86396e31d41a003a179690f8c322e82e250e33b2 | 2559fdc9545b2c7e337f5113b231025106dd22ab | refs/heads/CAallInOne_81X | 2021-08-15T23:25:02.901905 | 2016-09-13T08:10:20 | 2016-09-13T08:53:42 | 176,462,898 | 0 | 1 | Apache-2.0 | 2019-03-19T08:30:28 | 2019-03-19T08:30:24 | null | UTF-8 | Python | false | false | 1,006 | py | import FWCore.ParameterSet.Config as cms
OutALCARECOEcalESAlign_noDrop = cms.PSet(
# put this if you have a filter
SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring('pathALCARECOEcalESAlign')
),
outputCommands = cms.untracked.vstring(
'keep ESDCCHeaderBlocksSorted_ecalPresho... | [
"[email protected]"
] | |
0f277c60902e8603255da3dbd08294738084831d | 4fbd844113ec9d8c526d5f186274b40ad5502aa3 | /algorithms/python3/minimum_area_rectangle_ii.py | 708813731bf76371e270627e1c38eb0d4c3a71c5 | [] | no_license | capric8416/leetcode | 51f9bdc3fa26b010e8a1e8203a7e1bcd70ace9e1 | 503b2e303b10a455be9596c31975ee7973819a3c | refs/heads/master | 2022-07-16T21:41:07.492706 | 2020-04-22T06:18:16 | 2020-04-22T06:18:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,363 | py | # !/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Given a set of points in the xy-plane, determine the minimum area of any rectangle formed from these points, with sides not necessarily parallel to the x and y axes.
If there isn't any rectangle, return 0.
Example 1:
Input: [[1,2],[2,1],[1,0],[0,1]]
Output: 2.00... | [
"[email protected]"
] | |
b90f6e7917af6e75b2d7465f1ec61af936e8ad06 | a08f5a2a75dcbe8e6871759d6b7a89e0e2f3519e | /pypodman/pypodman/lib/actions/rmi_action.py | 7c3d0bd795b1c9a13a592f15020303f704fb5c37 | [
"Apache-2.0"
] | permissive | 4383/python-podman | 99a7d8906e13811059743feba005a7550ff9f604 | 94a46127cb0db2b6187186788a941ec72af476dd | refs/heads/master | 2020-04-22T10:47:05.035526 | 2019-01-14T14:30:35 | 2019-01-14T14:30:35 | 170,317,428 | 0 | 0 | Apache-2.0 | 2019-02-12T12:52:13 | 2019-02-12T12:52:12 | null | UTF-8 | Python | false | false | 1,339 | py | """Remote client command for deleting images."""
import sys
import podman
from pypodman.lib import AbstractActionBase
class Rmi(AbstractActionBase):
"""Class for removing images from storage."""
@classmethod
def subparser(cls, parent):
"""Add Rmi command to parent parser."""
parser = par... | [
"[email protected]"
] | |
5bedb6acfb11c0720e53b72916dc4b2a3fe2290b | 1843fd5ccb4377240e664acd21ba5a9369eca2ab | /bluebottle/utils/exchange_rates.py | 5a13a2e89fbde1ff2d96b0f6451e16a83362c4b3 | [
"BSD-2-Clause"
] | permissive | raux/bluebottle | ba2e576cebcb6835065004c410b22bd8a6b9ee29 | 49d92b5deb289c1539f99122abc20f845577b879 | refs/heads/master | 2020-03-27T03:20:11.465491 | 2018-08-23T13:09:25 | 2018-08-23T13:09:25 | 145,854,614 | 0 | 0 | null | 2018-08-23T13:05:00 | 2018-08-23T13:04:59 | null | UTF-8 | Python | false | false | 198 | py | from djmoney_rates.utils import convert_money
def convert(money, currency):
""" Convert money object `money` to `currency`."""
return convert_money(money.amount, money.currency, currency)
| [
"[email protected]"
] | |
36b6bc2a275ccfba0a769e03a047842003034ffa | 8d1d1e7677e1a18c00fb295971211d4e29d10896 | /vocal_synthesis/experiments/22feb_testing_b2_rmsprop_rectify.py | 5bbb31566fa7981f6bc49ff20056e209698369f4 | [] | no_license | christopher-beckham/ift6266h16 | 8296d1529f6ce3e209af371283f816a4c6d63ea9 | f141fb0a320c20c2c7b43b46f06b1c68cde183f0 | refs/heads/master | 2021-01-10T13:38:40.733180 | 2016-04-17T02:22:52 | 2016-04-17T02:22:52 | 49,399,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,177 | py | import numpy as np
from scipy.io import wavfile
import os
import sys
sys.path.append( os.pardir )
import cPickle as pickle
from lasagne.updates import *
import rnn_experiment as experiment
if __name__ == "__main__":
# e.g. 1000_60sec.pkl
in_pkl = sys.argv[1]
out_pkl = sys.argv[2]
with open(in_pkl) as... | [
"[email protected]"
] | |
b665f56e5dff437feeb254d063d46896215f3942 | bad686ba27539a3d3286418cc3ebf2aa80ae4958 | /src/kits/maker-pi-rp2040-robots/time-of-flight-display-test.py | f633d990bc842f9f8617dc32d4679a845184fb29 | [] | no_license | AaryaBatchu/micropython | f0a31b579b3a998586f26b92036875c93588eca7 | aef7d33937352e9ab6f9615bfc5bf9aa1a9bee57 | refs/heads/main | 2023-08-19T13:33:15.006432 | 2021-10-23T19:06:26 | 2021-10-23T19:06:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 657 | py | # Test program for VL53L0X
import time
from machine import Pin, I2C
from ssd1306 import SSD1306_I2C
import VL53L0X
I2C0_SDA_PIN = 0
I2C0_SCL_PIN = 1
I2C1_SDA_PIN = 2
I2C1_SCL_PIN = 3
i2c0=machine.I2C(0,sda=machine.Pin(I2C0_SDA_PIN), scl=machine.Pin(I2C0_SCL_PIN))
i2c1=machine.I2C(1,sda=machine.Pin(I2C1_SDA_PIN), scl=m... | [
"[email protected]"
] | |
105c0808de6a0d4f0fca7819c1b26ac7d1fd97cf | 1cd83cf06ff7ae750ab419ac867d475d38342388 | /play-with-numbers/lychrel.py | ee4e3ef1b0281f78eebe6e5db760bed2cd2e7ead | [
"MIT"
] | permissive | AnuragAnalog/maths | 28e402a980075e0201a699528387a7ca223737e8 | b8fd5398dd8fce657ba5c3c0170b5e493eb9d341 | refs/heads/master | 2022-10-31T14:50:52.114560 | 2022-10-15T19:19:36 | 2022-10-15T19:19:36 | 146,905,452 | 0 | 3 | MIT | 2022-10-15T19:19:37 | 2018-08-31T14:52:56 | C | UTF-8 | Python | false | false | 1,074 | py | #!/usr/bin/python3.6
""" If we take 47, reverse and add, 47 + 74 = 121, which is palindromic.
It is thought that some numbers, like 196, never produce a palindrome.
A number that never forms a palindrome through the reverse and add process
is called a Lychrel number. Due to the theoretical nature of these number... | [
"[email protected]"
] | |
d0d2170beaa496a695545f31c255a9f64e877438 | 3c38febb2f7a42fb72b543eb23caa9f46580f06b | /Uva Problems/Python/713.py | e95e6f573511da20421cca9b7150a6881a4d1807 | [] | no_license | joyonto51/Programming_Practice | 479b8e84862e35f29a3904bd3556edb6532efb4b | 1d6ff08cf63011cfde6b73988bc1686a12e70a79 | refs/heads/master | 2020-03-09T05:34:39.502942 | 2018-10-01T14:34:17 | 2018-10-01T14:34:17 | 128,617,218 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | T = int(input())
for i in range(T):
a,b=map(str,input().split())
x = int(a[::-1])
y = int(b[::-1])
w = str(x+y)
z = int(w[::-1])
print("{}".format(z))
| [
"meghla1609"
] | meghla1609 |
91225add6aa7e75a6cef7c47459470a6ff209b39 | 58d2b60989a83142286273c1d3bdd66a77842c76 | /Wind/Train/RunConfig.py | 0220ddff4b85e2aa74b7fa6c181234275d0f4756 | [] | no_license | castorgit/wind_code | 8193c7439eb459e58a55b8ff107df6032f77ad7d | 6f25302e9ba581f769d22d47b2c86aa2d60de393 | refs/heads/master | 2022-09-24T13:14:59.280976 | 2020-06-06T17:13:58 | 2020-06-06T17:13:58 | 270,047,772 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,846 | py | """
.. module:: RunConfig
RunConfig
*************
:Description: RunConfig
Object to store information from the flags passed to the script for training
:Authors: HPAI-BSC
:Version:
:Created on: 06/07/2018 8:09
"""
__author__ = 'HPAI-BSC'
class RunConfig:
"""Class Runconfig
Stores informatio... | [
"[email protected]"
] | |
927db656a17a58d4953f22fbdc57fd16d812b724 | 27ff7fec0ae3f29f58089a2acab0aa3bc4e6e1f7 | /RIDE-python3/utest/controller/test_tcuk_copy.py | 4d4c8ab42b7c9cad385b512f4c7fb6b0a38d324f | [
"Apache-2.0"
] | permissive | zhangsong1417/xx | 01435d6057364991b649c1acc00b36ab13debe5a | c40cfdede194daf3bdf91b36c1936150577128b9 | refs/heads/master | 2020-04-06T14:06:23.011363 | 2019-07-09T02:38:02 | 2019-07-09T02:38:02 | 157,528,207 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,828 | py | import time
import unittest
from robotide.robotapi import TestCaseFile
from robotide.controller.filecontrollers import TestCaseFileController
from resources import COMPLEX_SUITE_PATH
from nose.tools import assert_equal, assert_true
class TestCaseAndUserKeywordCopyingTest(unittest.TestCase):
controller = TestCas... | [
"[email protected]"
] | |
e09bfea83d8f83c4c3596a4e1384efbdb19d67e1 | f5a1fcc57ba6d1bdd946158d269f861747023977 | /google_problems/problem_19.py | ba9c6737ede40571563275798458611485c593dd | [
"MIT"
] | permissive | younes38/Daily-Coding-Problem | 64f8c4137b86fc44d6202585f009a3a5e05f4eac | ba2b48fbd4d86b2130a396b9d464f2395b9983b6 | refs/heads/master | 2021-07-19T01:41:20.665277 | 2019-11-30T21:00:50 | 2019-11-30T21:00:50 | 225,072,874 | 2 | 0 | MIT | 2019-11-30T21:38:13 | 2019-11-30T21:38:13 | null | UTF-8 | Python | false | false | 463 | py | """This problem was asked by Google.
Implement an LRU (Least Recently Used) cache. It should be able to
be initialized with a cache size n, and contain the following methods:
• set(key, value): sets key to value. If there are already n items in the
cache and we are adding a new item, then it should also
remove the l... | [
"[email protected]"
] | |
8ceb1e40fd1074a3ca829be6b58a977dfba353b3 | 828e58fff5f3779b6fddbc029f332345adb97c4f | /yoohalal/apps/dashboard/promotions/app.py | 9a86e30efe48de93a9f59df745206195afa7b01e | [] | no_license | sofyandamha/Django-Oscar-Marketplace-yoohalal | 5c33ac77834dcbc199d5f39971b0f527e9627167 | 8bc1f11b1fe301f1dc5f9f9edfd6c24402effeb3 | refs/heads/master | 2020-03-27T20:52:37.031477 | 2018-09-02T16:03:43 | 2018-09-02T16:03:43 | 147,099,611 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,564 | py | from django.conf.urls import url
from oscar.apps.dashboard.promotions.app import PromotionsDashboardApplication as CorePromotionsDashboardApplication
from oscar.core.loading import get_class
from apps.promotions.conf import PROMOTION_CLASSES
class PromotionsDashboardApplication(CorePromotionsDashboardApplication):
... | [
"[email protected]"
] | |
e0ed0dfefb138ca3c8fd3e937468c210583a4899 | ace717292aec2cbff637da1455e265b2c4f5894b | /azdev/operations/tests/test_break_change.py | 6a81837caf7c11c4c8bb9ba49d0e3b8e9f1cb7b8 | [
"MIT"
] | permissive | Azure/azure-cli-dev-tools | b62b936327c1129d970e7b836b7f926e7c277cce | d4e9490071a5161c3f663e41a99f16b7a091feea | refs/heads/dev | 2023-08-24T12:36:36.386669 | 2023-08-10T05:57:09 | 2023-08-10T05:57:09 | 158,465,443 | 78 | 106 | MIT | 2023-09-14T02:55:18 | 2018-11-20T23:46:08 | Python | UTF-8 | Python | false | false | 2,621 | py | # -----------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
i... | [
"[email protected]"
] | |
989ffac9bbb35c98fef0e0e921d47fbd26eac1d9 | 4e02d5b0b1b0739553fd40bbbdfb0d02c9830350 | /0279_Perfect_Squares.py | a4f7a1558f81bae7ae146a21635bc67ee099f516 | [] | no_license | bingli8802/leetcode | b039ab6af62f0c8992463393f561caafd21056e6 | a509b383a42f54313970168d9faa11f088f18708 | refs/heads/master | 2023-03-29T03:11:45.801090 | 2021-03-23T22:55:16 | 2021-03-23T22:55:16 | 279,321,659 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,738 | py | class Solution(object):
def numSquares(self, n):
"""
:type n: int
:rtype: int
"""
dp = [0] * (n+1)
for i in range(1, n+1):
dp[i] = i
j = 1
while i - j*j >= 0:
dp[i] = min(dp[i], dp[i-j*j] + 1)
j += 1
... | [
"[email protected]"
] | |
b85bd0e003e0af4800ebefdd62eaedba1d847289 | 83cbb5554f488f78b9cc8fddda5749e4a77cd9d7 | /corona_chan/app_celery.py | d2f74a0925bf8a3b6fdd875f3bcee3262aaa42f5 | [
"WTFPL"
] | permissive | dem4ply/corona_chan | 5273beef3bb859314a39bf6948d983db1f9ead38 | e422a6ddd2ea7628d83f9f7eb09dc8b39984971b | refs/heads/master | 2022-01-21T17:34:56.458016 | 2020-03-28T08:12:40 | 2020-03-28T08:12:40 | 252,572,781 | 0 | 0 | WTFPL | 2022-01-06T22:43:34 | 2020-04-02T21:53:46 | Python | UTF-8 | Python | false | false | 398 | py | from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
__all__ = [ 'corona_chan_task' ]
os.environ.setdefault( 'DJANGO_SETTINGS_MODULE', 'corona_chan.settings' )
corona_chan_task = Celery( 'corona_chan' )
corona_chan_task.config_from_object( 'django.conf:setti... | [
"[email protected]"
] | |
d9a61d0432914bf06dd735f4f255e00fbb172535 | 6a3db7061752a7dc7466f3965e1d7aef116b2adc | /core/manager/threadmanager.py | 0a24f226af42726d5611b3b10dedc9d19d0f664f | [
"BSD-2-Clause"
] | permissive | bwbj/imagepy | f3b68b320a82bbb3e0641539a244046e9dc6fa73 | e2ee389f1003fc297a541968dcfd7fd883b91e01 | refs/heads/master | 2021-01-25T09:25:45.077798 | 2017-06-04T16:02:19 | 2017-06-04T16:02:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py | # -*- coding: utf-8 -*-
"""
Created on Sat Jan 14 23:24:32 2017
@author: yxl
"""
import numpy as np, os
import IPy
class ThreadManager:
threads = [] | [
"[email protected]"
] | |
c64c92384af399fffd97ca2e1811f3c53183049a | ad20495c8df427211dba51c93c507365f9fce319 | /tilejetserver/source/models.py | 99a2588f534876baed6957523db4f391849ae42f | [
"LicenseRef-scancode-public-domain"
] | permissive | tilejet/tilejet-server | 779398257c65138c906f3989c63e029dfe45587e | 7bd0caa18cde98a8fd80aeea6e06bbe8aa2fa1be | refs/heads/master | 2021-01-10T02:41:23.553939 | 2015-12-06T07:18:56 | 2015-12-06T07:19:59 | 43,448,267 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,709 | py | import datetime
import logging
import os
import io
import sys
import uuid
from base64 import b64encode
from optparse import make_option
import json
import argparse
import time
import os
import subprocess
import binascii
import re
from django.db import models
from django.db.models import signals
from django.conf import... | [
"[email protected]"
] | |
847223e52750a1c83489ec6b1a24eef605dc399e | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/contrib/cv/detection/centernet2/projects/CenterNet2/centernet/modeling/layers/deform_conv.py | 1f769c8cc406ad284f290a81f443686934da2c31 | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"GPL-1.0-or-later",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | 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 | 4,579 | py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# Copyright 2020 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.... | [
"[email protected]"
] | |
5e3edb681874b53ffa1b0407e4f3f44e9c9564ce | a2d36e471988e0fae32e9a9d559204ebb065ab7f | /huaweicloud-sdk-gaussdb/huaweicloudsdkgaussdb/v3/model/mysql_flavors_info.py | f645f35059fe903ce4c4505600efa70fabee5fdc | [
"Apache-2.0"
] | permissive | zhouxy666/huaweicloud-sdk-python-v3 | 4d878a90b8e003875fc803a61414788e5e4c2c34 | cc6f10a53205be4cb111d3ecfef8135ea804fa15 | refs/heads/master | 2023-09-02T07:41:12.605394 | 2021-11-12T03:20:11 | 2021-11-12T03:20:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,889 | py | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class MysqlFlavorsInfo:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key i... | [
"[email protected]"
] | |
f98b586ac029d55f77d430b036cbbe0642135da8 | 0660cfca0799685969f75b4082455a5608e23bc4 | /TensorFlow2/Recommendation/WideAndDeep/data/outbrain/nvtabular/preproc.py | 52240c1143495c764743a4c98d2bd58e20e4257a | [] | no_license | resemble-ai/DeepLearningExamples | c88dc66930bc2c4627fd187fc0034e783e6244d3 | 2d555548b698e4fc207965b7121f525c37e0401c | refs/heads/master | 2023-04-12T17:23:45.349726 | 2021-04-26T13:00:10 | 2021-04-26T13:00:10 | 362,784,409 | 4 | 3 | null | 2021-04-29T10:51:42 | 2021-04-29T10:51:41 | null | UTF-8 | Python | false | false | 1,995 | py | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | [
"[email protected]"
] | |
8319f4003ac2e4e7bc59b13fa6bded86492c5bf2 | d89cbdfbb67e46d43a05edb2abeb5e1deedfd3a2 | /functions/shake_shake_function.py | 2b38e2c551c100ed70044885d915227a673d2921 | [
"MIT"
] | permissive | minhtannguyen/pytorch_shake_shake | c9a6fb520ba2201c1ccb022767cbba963225bbae | d7f245d8d8b9e81a6020aadb438ffeae6d5593c2 | refs/heads/master | 2020-03-27T14:22:09.646020 | 2018-09-01T02:00:25 | 2018-09-01T02:00:25 | 146,658,651 | 0 | 0 | MIT | 2018-08-29T21:07:24 | 2018-08-29T21:07:24 | null | UTF-8 | Python | false | false | 1,363 | py | # coding: utf-8
import torch
from torch.autograd import Function
class ShakeFunction(Function):
@staticmethod
def forward(ctx, x1, x2, alpha, beta):
ctx.save_for_backward(x1, x2, alpha, beta)
y = x1 * alpha + x2 * (1 - alpha)
return y
@staticmethod
def backward(ctx, grad_out... | [
"[email protected]"
] | |
94c31b6f766395c271029a4a360588b51ce03a06 | bc40c23403c1926e5bb81d3f6b6be567ccee7a70 | /ecommerce/user_model/models.py | 049da65fb7f8b02f6947ab77d96e101120f2e8e3 | [] | no_license | hrupesh/ecommerce | e1e0abf624ad3222bcf57548f051a3197ae899e5 | 2fc645e0e43f1920d787612e8f5b47d5990c793e | refs/heads/master | 2020-04-20T01:28:35.977058 | 2019-01-31T14:51:20 | 2019-01-31T14:51:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,178 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.db import models
import hashlib
# Create your models here.
class register_model(models.Model):
firstname = models.CharField(max_length=250, help_text='Required')
lastname = models.CharField... | [
"[email protected]"
] | |
db865ebb216e0b6efcc8947e4b2809b42095bcd7 | 07c3034f7b6ef88e08430b8c908613ea0091f1b6 | /Labs/Lab 7.py | 540d228ec6bf38673cdb8a3ea31a04a997b03f8a | [] | no_license | HelalChow/Data-Structures | 494b8fabcdf1cac20db78055547ce4160ad6a018 | 3b3401cbd23e01b2d7d95dfc3b95451ca179cee9 | refs/heads/master | 2021-10-19T00:24:23.589224 | 2019-02-15T22:34:05 | 2019-02-15T22:34:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,395 | py | #Question 1
def powers_of_two(num):
for i in range(1,num+1):
yield 2**i
#Question 2
def decimal_to_binary(int):
if int==1:
return "1"
else:
hold = decimal_to_binary(int-1)
#Question 3
def partition(lst):
low = 1
high = len(lst)-1
pivot = lst[0]
wh... | [
"[email protected]"
] | |
cf2d48e9ab4da0ece9b9ee4ddd631919aa2261e1 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2790/60720/237340.py | ea1258231b7d219c2f8c047b47fb50bd69d1f997 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | list=input().split()
size1=int(list[0])
size2=int(list[1])
list1=input().split()
list2=input().split()
for i in range(size1):
list1[i]=int(list1[i])
for i in range(size2):
list2[i]=int(list2[i])
count=0
for i in range(size2-1):
for j in range(size1):
if list1[j]<=list2[i]:
count=count+1
... | [
"[email protected]"
] | |
e8d4272f4fa006bd29293b9b21adeec8080c6d47 | 3b15dc211cb6c034f4d843b1bbc540f1699182f7 | /爬虫/多线程爬取.py | 5fb5a954f28cf987da7a0401528b87219b49f4f9 | [] | no_license | Hanlen520/- | eea27d5a1272272a2f47f9070f285e44300ab0d2 | 308d3401ff368cd11f4aeac7949d57c3136f2b6e | refs/heads/master | 2023-03-15T19:18:25.168665 | 2020-07-05T14:39:41 | 2020-07-05T14:39:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,074 | py | import requests
import re
import threading
import os
num = 1
def get_html_text_one(url, headers):
request = requests.get(url, headers=headers)
if request.status_code == 200:
return request.text
return request
def get_images_one(html, headers):
urls = re.findall('><a href="(.*?)" alt=".*?".*?">... | [
"[email protected]"
] | |
9d822d260cb327e22781dc7abc5ad41d19df961c | 01c2254dcd0547058e66dd0ca0ecd9e2941e3cb9 | /billingstack/openstack/common/jsonutils.py | e8ab2d559752d171eeb769e1538b0bc0a47621dc | [
"Apache-2.0"
] | permissive | lanve/billingstack | 8ac3c52eca8f1d2dc46753d043ff09b55f536fcf | dfeb22992d503e1d407a55b7cf1a7658386fefa3 | refs/heads/master | 2021-01-22T15:22:08.731143 | 2014-10-31T10:21:35 | 2014-10-31T10:21:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,458 | py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
#... | [
"[email protected]"
] | |
ab19e7a013264bab618abc32f5c3b27d2161ed9d | 3ef70fe63acaa665e2b163f30f1abd0a592231c1 | /stackoverflow/venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/html5lib/_utils.py | 0703afb38b13bf56998d43aa542dcea9839d8132 | [
"MIT"
] | permissive | wistbean/learn_python3_spider | 14914b63691ac032955ba1adc29ad64976d80e15 | 40861791ec4ed3bbd14b07875af25cc740f76920 | refs/heads/master | 2023-08-16T05:42:27.208302 | 2023-03-30T17:03:58 | 2023-03-30T17:03:58 | 179,152,420 | 14,403 | 3,556 | MIT | 2022-05-20T14:08:34 | 2019-04-02T20:19:54 | Python | UTF-8 | Python | false | false | 4,015 | py | from __future__ import absolute_import, division, unicode_literals
from types import ModuleType
from pip._vendor.six import text_type
try:
import xml.etree.cElementTree as default_etree
except ImportError:
import xml.etree.ElementTree as default_etree
__all__ = ["default_etree", "MethodDispatcher", "isSurr... | [
"[email protected]"
] | |
ec5e14ca7ee91e5a11c352f1f40d86319a8f3aca | 6e8f2e28479566dbaa338300b2d61f784ff83f97 | /.history/code/live_20210421141743.py | fc17bb0a93cda5b645c4b46e5443cb671d1f180d | [] | no_license | eeng5/CV-final-project | 55a7d736f75602858233ebc380c4e1d67ab2b866 | 580e28819560b86f6974959efb1d31ef138198fc | refs/heads/main | 2023-04-09T21:28:21.531293 | 2021-04-21T19:57:22 | 2021-04-21T19:57:22 | 352,703,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,640 | py | import os
import cv2
import sys
import numpy as np
from models import SimpleModel
from preprocess import Datasets
import hyperparameters as hp
import tensorflow as tf
from skimage.transform import resize
from PIL import Image, ImageFont, ImageDraw
from scipy.spatial import distance as dist
from imutils import face... | [
"[email protected]"
] | |
803ff5ac5b0cdf521eddb1c05b2ba9f5a0625e88 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2518/60667/257400.py | 5a34f96a54c8f08657b63d8da8e6099b6338fb0a | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 330 | py | import math
houses = list(map(int, input().split(',')))
heaters = list(map(int, input().split(',')))
dist = []
for i in range(len(houses)):
dist.append(len(houses))
for heater in heaters:
for i in range(len(houses)):
dist[i] = min(dist[i], math.fabs(houses[i] - heater))
print(int(max(dist))) ... | [
"[email protected]"
] | |
3b36ccf527d7f2266c29d77220345506c88dfb84 | 4a8bfa3407aa98a04ede3162f85467b1b5012fe7 | /aiogram/api/types/input_venue_message_content.py | ae89bf991e07eb8b472c705371a17a215d91e73c | [] | no_license | aiogram/tg-codegen | 07ec80814eec46f464d2490fd27b7b6b27257f1b | ba3c2f893591d45dda418dd16e0646e260afdf14 | refs/heads/master | 2022-12-09T10:44:10.781570 | 2021-11-07T23:33:25 | 2021-11-07T23:33:25 | 218,523,371 | 24 | 5 | null | 2022-12-08T08:47:43 | 2019-10-30T12:33:21 | Python | UTF-8 | Python | false | false | 1,278 | py | from __future__ import annotations
from typing import TYPE_CHECKING, Optional
from .input_message_content import InputMessageContent
if TYPE_CHECKING:
pass
class InputVenueMessageContent(InputMessageContent):
"""
Represents the `content <https://core.telegram.org/bots/api#inputmessagecontent>`_ of a ve... | [
"[email protected]"
] | |
2aebcd46bf5395a3b680783cacda6f9c826dd5e0 | ac085e82a957da4e59beefe52fae06e8e0077e09 | /gen3va/endpoints/api/download_api.py | 9979505563b22fad1ad79b4ccb1bdbb559c60975 | [] | no_license | MaayanLab/gen3va | 9cb670f971690c911a09f633c49c2e8a35d69afc | b08755993633f5bfc710be088da327813b8df1fc | refs/heads/master | 2022-05-13T13:13:35.151752 | 2022-04-15T15:04:13 | 2022-04-15T15:04:13 | 67,866,413 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,028 | py | """Manages downloads.
"""
import os
import zipfile
import StringIO
from flask import Blueprint, Response
from substrate import Tag
from gen3va import database
from gen3va.config import Config
download_api = Blueprint('download_api',
__name__,
url_prefix='%s/downloa... | [
"[email protected]"
] | |
8f367326fc506820a4dc0f6116e2f02a0c3a3d1e | 9d84fa1d80c4248ad304f4b1ac32cb6adfa7a0f1 | /mk_dti_report.py | d07b0c8c0884dd676b8f1e4a0fc95068c4a97fd6 | [
"MIT"
] | permissive | poldrack/dtiqa | 6a504848af736eb2c585a337568c41a11812c0b6 | 3b44e3dbec4cace8fb4bb2fcdf43e4f64a649898 | refs/heads/master | 2021-01-10T21:01:33.025637 | 2015-07-13T21:20:31 | 2015-07-13T21:20:31 | 39,037,793 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,707 | py | """
make report for QA using reportlab module
"""
from reportlab.pdfgen import canvas
import numpy as N
import time
import os
def mk_dti_report(infile,dtidir,datavars):
#imgsnr,meansfnr,spikes,badvols):
timestamp=time.strftime('%B %d, %Y: %H:%M:%S')
report_header=[]
report_header.a... | [
"[email protected]"
] | |
5bd5a62e7c57b3658b7b1fd7f54e5fffc4ca9fc9 | a14ec6e367e6a471bfc74c066fb958ef585bc269 | /2019/04/common.py | 89c29d75ecf7bdfd829c92b56ca0d45e14d2a616 | [] | no_license | jimhendy/AoC | 90641814ed431f46a8500ff0f022c6c957567563 | a1727f88bc2e6f739d65902dce188377966b3fb4 | refs/heads/master | 2023-09-02T14:48:39.860352 | 2023-08-28T08:09:19 | 2023-08-28T08:09:19 | 225,152,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 443 | py | import numpy as np
import pandas as pd
def possibles(inputs):
Min, Max = (int(i) for i in inputs.split("-"))
return pd.DataFrame([list(str(i)) for i in np.arange(Min, Max)]).astype(int)
def diffs(possibles):
return possibles.diff(axis=1).fillna(0)
def counts(possibles):
counts = {
i: possi... | [
"[email protected]"
] | |
7e5988d2abc9de3328191dcf4a48925e1114b43a | 1dbc955c3d717476fa75a48cc87a05e2eceb0002 | /easy/min_depth.py | bc408df46fa538cc996dbb3442ff9a4ebdd9d9e3 | [] | no_license | gregorysimpson13/leetcode | e68eaee2ba38a1edff119eda1ccdeacc0c400d26 | ae88b9f9979a5643497cb2dfeb90d19a1bcdb137 | refs/heads/master | 2023-03-31T23:58:58.940234 | 2021-04-11T14:37:31 | 2021-04-11T14:37:31 | 258,632,884 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,013 | py | # 111. Minimum Depth of Binary Tree - EASY
# https://leetcode.com/problems/minimum-depth-of-binary-tree/submissions/
# Given a binary tree, find its minimum depth.
# The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.
# Note: A leaf is a node with no c... | [
"[email protected]"
] | |
2d0c20dbdb1d0b69c0e130f7c0b4fb5917f56aed | e2bbbf67487fddfd4648c3f37d84849efee5bfaa | /backend/hazardest/game/tests/test_trick.py | 644cfa0ee7485c64b02fe2197757d46af891215b | [] | no_license | JordanSlaman/hazardest | 2a6f813e86c58fdee2a4b6cde0b9634c2750b57a | 07d055d9cc8423f5fc45fc2992f8a8798d054cf2 | refs/heads/master | 2022-09-01T17:35:22.414359 | 2022-08-07T22:47:23 | 2022-08-07T22:47:23 | 98,753,092 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,107 | py | from django.test import TestCase
from ..models.game import Game
from ..models.hand import Hand
from ..models.trick import Trick
from ..utils.create_cards import create_cards
from .fixtures import create_game_with_players
class TrickModelTests(TestCase):
def setUp(self):
create_cards()
self.tes... | [
"[email protected]"
] | |
2623b29fb1f656b795b705e7ca7f4f8ed1255c7b | 0e25dc15ae9efce8bfd716d4d2041da07767968b | /qbench/benchmarks/QLib/OPENQL_converted/benstein_vazirani_41b_secret_16.py | fc9be6f9ad7d194f78cb38cb05d15e7415b54a28 | [] | no_license | alxhotel/crossbar-bench | f608fc0062b4f8a5162ec33d61c0204aaf27b6ff | 3bf7536e7697d29c3089b0ba564ba22d39698b88 | refs/heads/master | 2021-07-13T16:06:50.085838 | 2020-10-04T23:39:05 | 2020-10-04T23:39:05 | 213,409,122 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,090 | py | from openql import openql as ql
import os
import argparse
def circuit(config_file, new_scheduler='yes', scheduler='ASAP', uniform_sched= 'no', sched_commute = 'yes', mapper='base', moves='no', maptiebreak='random', initial_placement='no', output_dir_name='test_output', optimize='no', measurement=True, log_level='LOG_W... | [
"[email protected]"
] | |
a5c147f2b13a9262b93ad5d48796d82c3012edfb | 04e5b6df2ee3bcfb7005d8ec91aab8e380333ac4 | /Lib/objc/StoreKit.py | 4b919a9b01a65ef35f5ae3e2e78d36703567db64 | [
"MIT"
] | permissive | ColdGrub1384/Pyto | 64e2a593957fd640907f0e4698d430ea7754a73e | 7557485a733dd7e17ba0366b92794931bdb39975 | refs/heads/main | 2023-08-01T03:48:35.694832 | 2022-07-20T14:38:45 | 2022-07-20T14:38:45 | 148,944,721 | 884 | 157 | MIT | 2023-02-26T21:34:04 | 2018-09-15T22:29:07 | C | UTF-8 | Python | false | false | 5,635 | py | """
Classes from the 'StoreKit' framework.
"""
try:
from rubicon.objc import ObjCClass
except ValueError:
def ObjCClass(name):
return None
def _Class(name):
try:
return ObjCClass(name)
except NameError:
return None
SKCloudServiceController = _Class("SKCloudServiceController... | [
"[email protected]"
] | |
23a9af8c3a7546c53ad2b85b5f514b566b53d151 | c36679186f669c6e3bd1c106c96d4a17be1f5ab1 | /Practice_Telusko/121.py | ddb01801081aec49788165b80cbbbe017000e1b4 | [] | no_license | touhiduzzaman-tuhin/python-code-university-life | 60a3d671b200a6f5222c6d176c13c5f20f013509 | 6d2e3d90d430faa5c83fe79e7fb1ebe516994762 | refs/heads/master | 2023-03-22T15:18:10.636203 | 2021-03-06T18:52:04 | 2021-03-06T18:52:04 | 332,467,190 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | x = int(input("Enter A Number : "))
if x == 0:
print("Zero Number")
elif x >= 0:
print("Positive Number")
if x % 2 == 0:
print("Even Number")
else:
print("Odd Number")
else:
print("Negative Number") | [
"[email protected]"
] | |
f0457a3c6eba2170502ff89f45eef7cd3dcb14d9 | 36bfa8c212270b3c1eaab77210a525f0bbef6874 | /podoc/ast/__init__.py | 2bb4bd02683ba6fae13666a16f9937b333aa96eb | [
"BSD-3-Clause"
] | permissive | podoc/podoc | ce7b22571251ae90b56d272eff0277ec6090ea75 | 1868e7f82a521b1722dca528802acedf9010b11a | refs/heads/master | 2021-01-17T15:18:12.158127 | 2018-02-12T15:16:10 | 2018-02-12T15:16:10 | 41,724,522 | 54 | 9 | BSD-3-Clause | 2018-02-04T15:08:13 | 2015-09-01T07:44:50 | Python | UTF-8 | Python | false | false | 338 | py | # -*- coding: utf-8 -*-
# flake8: noqa
"""JSON plugin."""
#-------------------------------------------------------------------------------------------------
# Imports
#-------------------------------------------------------------------------------------------------
from ._ast import ASTNode, ASTPlugin, PandocPlugin... | [
"[email protected]"
] | |
6f337a988d6c798586c741832f986ede08989829 | a964f0f3f93a84d5195042d3c1bb2288e8b62161 | /muddery/server/dao/event_data.py | 3bec35efc460fb681d575e820864148aa197845a | [
"BSD-3-Clause"
] | permissive | nobodxbodon/muddery | 474433791b75d2f2130e6b758fb3126e2d56230b | 4b4c6c0dc5cc237a5df012a05ed260fad1a793a7 | refs/heads/master | 2023-06-19T19:28:39.252340 | 2021-07-14T15:07:47 | 2021-07-14T15:07:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | """
Query and deal common tables.
"""
from muddery.server.dao.base_query import BaseQuery
from muddery.server.dao.worlddata import WorldData
class EventData(BaseQuery):
"""
Object's event data.
"""
table_name = "event_data"
@classmethod
def get_object_event(cls, object_key):
"""
... | [
"[email protected]"
] | |
2192bb616634a4295e7ef0cd9808e3bbab101988 | e629795e54c7f0bf79c9128adc8bc9154bebfb19 | /dynamic_programming/leetcode/python/leet_code_1289.py | 4b2f08063b0352438dfb7adf0f552bae3817f7f6 | [] | no_license | sm2774us/leetcode_hackerrank_codesignal_practice | 1aff675b8b3e6b58e3bb2f81c46c8646da50589f | bdc2407f391a8bc08e3a119227c384f3e15bb693 | refs/heads/main | 2023-07-19T21:59:31.638152 | 2021-08-25T12:29:59 | 2021-08-25T12:29:59 | 392,862,836 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 886 | py | from typing import List
class Solution:
def minFallingPathSum(A):
rows = len(A)
cols = len(A[0])
prv_row_min1 = prv_row_min2 = 0
prev_pos1 = -1
for i in range(rows):
curr_row_min1 = curr_row_min2 = float('inf')
for j in range(cols):
if ... | [
"[email protected]"
] | |
bdb032f9ec951da8035b9e788b89c0624320bc26 | e1243b212be599a801e8d1fb5fd00e0ab0db974d | /models/EDSR_freq.py | fa798b278b49185c4ded544307b278cd3d6168e4 | [] | no_license | hyungminr/PyTorch_SISR | d17358ca94ccf7a82223a3b383b7529f1bfff0cd | 5aa22c3f68d262eb7ff80618cb3a75a7b488dacc | refs/heads/master | 2023-04-17T04:15:58.591604 | 2021-04-27T01:02:20 | 2021-04-27T01:02:20 | 328,836,251 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,452 | py | from models.EDSR import EDSR
from models.EDSR import MeanShift
import math
import torch.nn as nn
import torch
class EDSR_freq(nn.Module):
def __init__(self, scale=2, num_feats=64, kernel=3, padding=1, bias=True):
super().__init__()
self.model_image = EDSR(scale=scale, num_feats=32)
... | [
"[email protected]"
] | |
a9ee77da3ed775af437905f8a77e31c68934d890 | b47c136e077f5100478338280495193a8ab81801 | /Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/motorkit_dc_test.py | acee534bc1f2a7feb18935e5d4caa5d3f8df88a2 | [
"Apache-2.0"
] | permissive | IanSMoyes/SpiderPi | 22cd8747cc389f674cc8d95f32b4d86f9b7b2d8e | cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1 | refs/heads/master | 2023-03-20T22:30:23.362137 | 2021-03-12T17:37:33 | 2021-03-12T17:37:33 | 339,555,949 | 16 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,059 | py | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import board
from adafruit_motorkit import MotorKit
kit = MotorKit(i2c=board.I2C())
kit.motor1.throttle = 0
while True:
print("Forward!")
kit.motor1.throttle = 0.5
time.sleep(1)
... | [
"[email protected]"
] | |
75d822e59f72d9e13076734236f48c4e1dafc564 | 12112cdb7efa8a7026925f3eea9bf096b098ed3b | /yy_api/dao/address.py | 6517613dac58761ab644934790528a0fc6197e79 | [] | no_license | smallstrong0/Earth | c377f43216515b21191778c8a529c1c073bd8954 | c81c2e0e0ea18af62ef8f81b2ea84d2cc0faed8d | refs/heads/master | 2021-05-16T00:08:12.047520 | 2019-07-27T01:39:48 | 2019-07-27T01:39:48 | 106,982,264 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 877 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import core.mongo as db_core
import tool.c_utils
import tool.t_utils
collection = db_core.DbUtils().db.address
"""
字段规则
ctime
mtime
address_id 地址唯一id
user_id 用户ID全局唯一 UUID生成
name 收货人姓名
phone 电话
qq qq号
we_chat 微信号
address 地址
place 具体门牌号
"""
def create(dic={}):
dic['... | [
"[email protected]"
] | |
212fd46f2e5f7911e6424e3b7c2bc3491bab7a3b | f8b9e5de8823ff810ec445b6fa6d0e34f7b6319f | /Django/Users_project/apps/Users_app/migrations/0001_initial.py | 01e46249e25ed13984f49c592311b5448c9212d9 | [] | no_license | amalfushi/Python | 6c042443a8aeae15fc96a41a692abdbea05db863 | 067c2cef722457e884833f77baf9f44f45a4a165 | refs/heads/master | 2021-01-24T04:08:21.278071 | 2018-02-26T06:25:59 | 2018-02-26T06:25:59 | 122,923,686 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 879 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-18 14:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',... | [
"[email protected]"
] | |
2f7a6efeb9a5d3c242058dcae19f31ce8c0190c8 | b4f5055ab8c61098a66cfb10095d835acbb373b7 | /dataaccess/basedao.py | 3075a4cdbe3bb3d571997f4822803471207d9fc9 | [] | no_license | shmyhero/option | f9f01f98144e5f58023ddacfd133647a019b63a2 | 436027c8b33a7bc25cebcf16daa6962eb079c220 | refs/heads/master | 2021-03-16T09:03:04.229299 | 2017-11-29T08:15:02 | 2017-11-29T08:15:02 | 111,675,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,013 | py | import traceback
import datetime
import mysql.connector
from utils.logger import Logger
from common.pathmgr import PathMgr
from common.configmgr import ConfigMgr
class BaseDAO(object):
def __init__(self):
self.logger = Logger(self.__class__.__name__, PathMgr.get_log_path())
@staticmethod
def get... | [
"[email protected]"
] | |
610705888444eecd4a25200c9dd46b8ac12f5337 | 6eb207074705bacb36457d713e1dc06555192380 | /plot_ppi_blockage_map.py | ff52f40610dd5525e69260d3983ba9dba9563685 | [] | no_license | ritvje/lidar-xband-article-scripts | 22574adb29d2645fab31003ae8cd654363f6cb0a | ad6ec0997b09609c494316e2ae285296ffdde0eb | refs/heads/main | 2023-04-07T01:31:49.337350 | 2023-02-07T07:55:01 | 2023-02-07T07:55:01 | 491,413,099 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,484 | py | """Plot a 2-panel figure of radar and lidar availability PPIs.
Looks for files in directory `inpath` called
- xband_obs_pct_{startdate}_{enddate}_pct.txt
- xband_obs_pct_{startdate}_{enddate}_range.txt
- xband_obs_pct_{startdate}_{enddate}_azimuth.txt
- lidar_obs_pct_{startdate}_{enddate}_pct.txt
- lidar_obs_pct_{star... | [
"[email protected]"
] | |
59c5e626e9a7066e4b46f04bc311d2d0bb6b243e | 13f78c34e80a52442d72e0aa609666163233e7e0 | /Other/ICPC Live Archive/7526/input_gen.py | e02dee7416064f5e4eaed6e55e6ef4f49cc2d0f0 | [] | no_license | Giantpizzahead/comp-programming | 0d16babe49064aee525d78a70641ca154927af20 | 232a19fdd06ecef7be845c92db38772240a33e41 | refs/heads/master | 2023-08-17T20:23:28.693280 | 2023-08-11T22:18:26 | 2023-08-11T22:18:26 | 252,904,746 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 660 | py | import random
def genTestCase(out):
ROWS = random.randint(200, 300)
COLS = random.randint(200, 300)
SPARE_ROWS = random.randint(0, int(ROWS / 5))
SPARE_DIODES = random.randint(0, int(ROWS * COLS / 7))
out.write("{} {} {} {}\n".format(ROWS, COLS, SPARE_ROWS, SPARE_DIODES))
ZERO_DENSITY = random.... | [
"[email protected]"
] | |
cb7b18e29e9988f4058c89a85ff27762dd7ea458 | eb1a2e24ecdbe9be8a6aac153fe1980b19dcbe4a | /sameline.py | db7711b6a73bb522e178afdfcfdba7a0d80d7476 | [] | no_license | sushmithasushi/playerlevel | 1e7363e63bd75deba79b96a659db7736c93ed6a2 | 612ea4483a5c5d7c3c3a8564e0b7ce0df08a686a | refs/heads/master | 2020-06-19T07:03:06.457910 | 2019-07-24T04:28:31 | 2019-07-24T04:28:31 | 196,608,802 | 0 | 0 | null | 2019-07-12T16:08:51 | 2019-07-12T16:08:51 | null | UTF-8 | Python | false | false | 206 | py | num1=input().split()
n2=input().split()
n3=input().split()
if(num1[0]==n2[0]==n3[0] or num1[1]==n2[1]==n3[1] or (num1[0]==num1[1] and n2[0]==n2[1] and n3[0]==n3[1])):
print('yes')
else:
print('no')
| [
"[email protected]"
] | |
7de4e0db9696917074e2cac47616c5de30351365 | 1f33bcbd545b82bc64e7f7b5ef2052798b02b279 | /Quiz:Program1/quiz.py | f90e3289eeff403a20c20b0baeae41159bfc7583 | [] | no_license | jlevy44/LearningScripts | 107369798605641a24a5a29c9f8f249d5396e0b6 | fe7ce46a995cd6b7e40099a4b2db558a549de446 | refs/heads/master | 2021-01-01T19:19:11.849540 | 2017-09-27T00:19:54 | 2017-09-27T00:19:54 | 98,566,879 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 365 | py | def is_true(i):
if i==2:
return True
else:
return False
print(is_true(2))
def lalala(i):
return lambda y: i**2
print(lalala(5))
print('alpha' > 'beta')
d='hello'
for p in d: print(p)
print(d[-2:2])
def add(x,y):
print x+y
add(2,6)
def make_scalar(c):
return lambda n: c*(n)
... | [
"[email protected]"
] | |
21120623aaae1cf3c80e160d93a4a917c30ebcfc | ece0d321e48f182832252b23db1df0c21b78f20c | /engine/2.80/scripts/templates_py/ui_previews_dynamic_enum.py | 39a3750bfee6404d1a45d3c448143682e5ad1b80 | [
"GPL-3.0-only",
"Font-exception-2.0",
"GPL-3.0-or-later",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain-disclaimer",
"Bitstream-Vera",
"LicenseRef-scancode-blender-2010",
"LGPL-2.1-or-later",
"GPL-2.0-or-lat... | permissive | byteinc/Phasor | 47d4e48a52fa562dfa1a2dbe493f8ec9e94625b9 | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | refs/heads/master | 2022-10-25T17:05:01.585032 | 2019-03-16T19:24:22 | 2019-03-16T19:24:22 | 175,723,233 | 3 | 1 | Unlicense | 2022-10-21T07:02:37 | 2019-03-15T00:58:08 | Python | UTF-8 | Python | false | false | 4,092 | py | # This sample script demonstrates a dynamic EnumProperty with custom icons.
# The EnumProperty is populated dynamically with thumbnails of the contents of
# a chosen directory in 'enum_previews_from_directory_items'.
# Then, the same enum is displayed with different interfaces. Note that the
# generated icon previews d... | [
"[email protected]"
] | |
3f5aafbcf9931ad72e65de3c2d356b6fddbf2328 | 55e11b61b3230f7442dd2c8f2c16754ad50dcaf6 | /code/SLFN/training.py | 801ed20b9e22b128eae974493e8cffee9b990256 | [] | no_license | manuwhs/B-ADSNs | f70f534ebf1389f2fe51c4d46978ca1c24bbb671 | 6fe0c8456f71dbeb72b172baccdbf98caaa86d7c | refs/heads/master | 2021-04-28T03:06:26.873816 | 2018-04-18T21:54:08 | 2018-04-18T21:54:08 | 122,131,782 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,058 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 24 01:31:58 2015
@author: montoya
"""
import numpy as np
from sklearn import cross_validation
import paramClasses as paC
from time import time # For the random seed
def train (self):
# Adapt the labels so that they are correct (-1 or 0 and transform multivaria... | [
"[email protected]"
] | |
d1ad790afa900acbcfab2baee1841aa7e9952ce7 | 4926535b3e0d2fe8a80bf231f72347abff6dcee4 | /experiments/spatial.py | 31164bbbb7f0f2a8b3630e61e75e76ba06247078 | [] | no_license | yangarbiter/blindguess | 1f2a34b0eb30fc53ab9be5c01fa1c184b8eb2ff9 | 86e49749ba62132a263dfea3743513b23895b03e | refs/heads/master | 2021-01-16T10:17:51.582682 | 2020-02-25T18:43:31 | 2020-02-25T18:43:31 | 243,076,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,862 | py | import os
import logging
import torch
from bistiming import Stopwatch
from mkdir_p import mkdir_p
import numpy as np
from sklearn.preprocessing import OneHotEncoder
from .utils import set_random_seed, load_model
from lolip.utils import estimate_local_lip_v2
from lolip.variables import get_file_name
logging.basicConf... | [
"[email protected]"
] | |
eda928275e1b9cc5238c2f7b986b78ac46b584e3 | 313203cd01705e08bc8967246bfeacb7fa5cd6c9 | /Untitled Folder 2/newpython/strings.py | f45458de85baa2979b96b808132d94e5001b35d1 | [] | no_license | Nitesh101/Nitesh_old_backup | 17d9c8e8f9694c0ef4d995de7cbb694080523b22 | a0b0263e204f2f46c51e6f20990024396eb0ccb7 | refs/heads/master | 2020-03-19T20:51:51.587343 | 2018-09-21T09:42:11 | 2018-09-21T09:42:11 | 136,919,866 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,262 | py | #!/usr/bin/python
"""
str = 'Votarytech Learning Center'
print str.replace("Center","1")
print str.find("L")
print str.update('4','8')
print str[0:8],str[10::]
print str[1:20]
"""
list = ["this","is","python"]
print "To find index of list : "
print list.index("is")
list = ["this","is","python"]
print "To remove elem... | [
"[email protected]"
] | |
2b690281a2c912dd8a40b26f3e3d47ba473e10c7 | 28691ec55ebce9ec7045d12ea9675932ce12d671 | /py2rhino-project/branches/sandbox2/py2rhino/_make/data/parser_out/utility/sleep.py | 747d42de5841701c0bad6df9d9e9bcd690ec7cdc | [] | no_license | ianclarksmith/design-automation | 1e71315193effc0c18b4a8b41300bda6f41a3f09 | e27cc028fe582395f4a62f06697137867bb0fc33 | refs/heads/master | 2020-04-22T22:28:39.385395 | 2009-10-26T02:48:37 | 2009-10-26T02:48:37 | 37,266,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,072 | py | sleep = {
"input_folder_name": "Utility_Methods",
"input_file_name": "Sleep",
"output_package_name": "utility",
"output_module_name": "sleep",
"doc_html": """
Suspends the execution of a running script for the specified interval.
""",
"syntax_html": {
0: ("lngMil... | [
"patrick.ht.janssen@d56020b2-6ac5-11de-89a9-0b20f3e2dceb"
] | patrick.ht.janssen@d56020b2-6ac5-11de-89a9-0b20f3e2dceb |
809efa968327ec2b765eba788b2c0355bfbae597 | 07c5656f004b6a444e22ff7b4c3b6802d027f759 | /week_3/class_0228/learn_import.py | fa67da2fb5f09d290d59e56d72ed750a06f0a45b | [] | no_license | EuniceHu/python15_api_test | de2a0f0bec8057edb27c8d1f82a438da3e9c105c | 1313e56ddfa67a2490e703a1a5ef4a6967565849 | refs/heads/master | 2020-05-20T13:30:41.686327 | 2019-05-14T11:00:52 | 2019-05-14T11:00:52 | 185,599,046 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 211 | py | #-*- coding:utf-8 _*-
"""
@author:小胡
@file: learn_import.py
@time: 2019/03/02
"""
# 导入module_import模块
# import week_3.class_0228.module_import
# print(week_3.class_0228.module_import.name) | [
"[email protected]"
] | |
4b0b8b40b54edefa3452bf0836965eec78601e79 | 0c9e8b42a1e0a6f010a6c38489c7c96b3b783991 | /photo/tests.py | 57ff49f4b1663ad73d11612a2994277554b8212c | [
"MIT"
] | permissive | Derrick-Nyongesa/Photo-Gallery | 4690ff3bd427415236fd5147188e2f452b87d487 | bbd8774bf7e8d1f9f32aa9e02d12af20e8cb0e70 | refs/heads/main | 2023-05-02T20:54:58.462766 | 2021-05-17T07:05:06 | 2021-05-17T07:05:06 | 366,949,013 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,422 | py | from django.test import TestCase
from .models import Image,Category,Location
# Create your tests here.
class TestImage(TestCase):
def setUp(self):
self.location = Location(name='Nairobi')
self.location.save_location()
self.category = Category(name='food')
self.category.save_categor... | [
"[email protected]"
] | |
64a6de091d8defdd83efab73dcacb5a3d0e4d9a2 | e50244b666bc6af028beb3c1a83de70e7c61edd0 | /L1/L1.py | e70b76e021489eff37ea41e71b021b4c15c88804 | [] | no_license | justaleaf/ML-2020 | 21e9b3026b1dd25d0727e9868e026eca7a3301c8 | 234c2a5e16dcc2d1f71483f57ec3c806cd6fdff0 | refs/heads/main | 2023-01-24T12:32:25.070338 | 2020-11-05T11:57:05 | 2020-11-05T11:57:05 | 305,983,518 | 0 | 0 | null | 2020-10-21T10:08:33 | 2020-10-21T10:08:32 | null | UTF-8 | Python | false | false | 5,384 | py | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
from tabulate import tabulate
from IPython.core.debugger import set_trace
from IPython.display import display
from matplotlib import pyplot as plt
from sklearn import preprocessing
# In[2]:
df = pd.read_csv('../data/heart_fail... | [
"[email protected]"
] | |
a27316b1c3a96c08649b135d42376f0518fe896a | 73e147e1d49656fafba5d4bf84df5ded2c4dca73 | /team_9/cocos/test/test_layer_rotate.py | 686cddc35f9dbf85bfe18864a85263644c578451 | [
"LGPL-2.1-only",
"CC-BY-NC-4.0",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-proprietary-license",
"CC-BY-NC-SA-2.0",
"BSD-3-Clause"
] | permissive | Donnyvdm/dojo19 | 2278747366c57bfc80eb9ee28ca617ec0a79bae3 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | refs/heads/master | 2020-07-26T12:22:15.882800 | 2019-09-15T20:34:36 | 2019-09-15T20:34:36 | 208,642,183 | 1 | 0 | BSD-3-Clause | 2019-09-15T18:57:53 | 2019-09-15T18:57:52 | null | UTF-8 | Python | false | false | 704 | py | from __future__ import division, print_function, unicode_literals
# This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
#
testinfo = "t 0.1, s, t 0.5, s, t 1.5, s, t 2.1, s, q"
tags = "Layer, RotateBy"
import co... | [
"[email protected]"
] | |
2dac7ea615bd751bd0c4315c3a059a77790feec3 | 4bc2af514877135a222826b2c5ac48632045f2fa | /jenkins/update_mysql.py | c05b16d304495222a0c459566afbcffa9cb12ba7 | [] | no_license | 18734865664/python | 1853481ac1dcd515f691cfc11557f76fbbb083de | 25bc355ddb2abefc5a3736fb99e6345138ebbefc | refs/heads/master | 2020-03-17T09:37:57.469741 | 2018-06-28T08:41:37 | 2018-06-28T08:41:37 | 133,482,315 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,007 | py | #! /usr/local/python3/bin/python3
# encodig: utf-8
import pymysql
import sys
sys.path.insert(0, '/data/nfs/python/learn_python/jenkins/')
from get_file_list import getFileList
from get_args import getJenkinsArgs
import get_args
class update_mysql():
def __init__(self):
self.mysql_host = "10.100.137.179"
... | [
"[email protected]"
] | |
98d038b91f190b29f651a48eb083b8182feee660 | c1bd12405d244c5924a4b069286cd9baf2c63895 | /azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag.py | b1eef24ccd54891a5c4e373cc43537a5efa21229 | [
"MIT"
] | permissive | lmazuel/azure-sdk-for-python | 972708ad5902778004680b142874582a284a8a7c | b40e0e36cc00a82b7f8ca2fa599b1928240c98b5 | refs/heads/master | 2022-08-16T02:32:14.070707 | 2018-03-29T17:16:15 | 2018-03-29T17:16:15 | 21,287,134 | 1 | 3 | MIT | 2019-10-25T15:56:00 | 2014-06-27T19:40:56 | Python | UTF-8 | Python | false | false | 1,527 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
"[email protected]"
] | |
b5595d5d7348a72d9b7433a750d364865b2ef7b7 | 2ae420ff508e7e6799dbd0b9e0c71be96ef2ced9 | /pyre_extensions/__init__.py | c84f0ed282dd1e45df78c74712bcd532e404169e | [
"MIT"
] | permissive | njayinthehouse/pyre-check | 5c8ab3ee2048ad395652d2079c5dcbcee288fbfc | 14872ab61ffef3fe61490c4cf0e098954157a5ac | refs/heads/master | 2020-05-31T17:23:56.392622 | 2019-06-05T05:06:58 | 2019-06-05T05:10:37 | 186,618,634 | 0 | 0 | null | 2019-05-14T12:35:46 | 2019-05-14T12:35:46 | null | UTF-8 | Python | false | false | 1,059 | py | def ParameterSpecification(name):
"""This kind of type variable captures callable parameter specifications
(known as argspecs in the runtime and inspect library) instead of types,
allowing the typing of decorators which transform the return type of the
given callable.
For example:
from typin... | [
"[email protected]"
] | |
d4c6454dd5d3cfb9f950a4eb640378ff7e298582 | 16197783050cb044729f8a4073f6a137658cf831 | /lesson23___/lesson20/iter_class.py | 68463ffc0b1a07c822ad9e774bf4970d94b2e3f0 | [] | no_license | AlexseyPivovarov/python_scripts | 04c053d531e1d36266e82b8b9dc75161a0bcdcf9 | 99d849c834c647cf669e55f5b8f32d984a288091 | refs/heads/master | 2020-04-07T02:26:31.520861 | 2018-11-17T11:21:02 | 2018-11-17T11:21:02 | 157,976,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | class Foo:
a=1
b=2
def __init__(self,a,b):
self.a = a
self.b = b
def __iter__(self):
yield self.a
yield self.b
# return (item for item in (self.a,self.b,))
def generator(self):
return iter(self)
class FooFoo(Foo):
def __init__(self,*args):
... | [
"[email protected]"
] | |
3972ca7ba5760c2af411c970167427094f32caf0 | 51e6720d5bc219df3ce9bc899fe04ca71d6e86af | /Python/POO I/Cinema.py | 0140e3000714059ddb4dc507936c847a7d7b3a57 | [] | no_license | ThiagoCComelli/POO | 7466d8272ccc742400d55603e70a9b3be16e80a1 | 2f878d2d2674e11ea584f6c23b94bd27dea26d65 | refs/heads/master | 2020-06-03T15:29:04.704709 | 2020-01-10T01:39:04 | 2020-01-10T01:39:04 | 191,628,147 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,866 | py | # -*- coding: utf-8 -*-
class Cinema():
def __init__(self,nome,endereco):
self.__nome = nome
self.__endereco = endereco
self.__funcionarios = []
self.__salas = []
self.__filmes = []
self.__sessoes = []
def getNome(self):
return self.__nome
def getEnde... | [
"[email protected]"
] | |
429ac7ba8eb6de79c8e5918dfb728409774bf846 | 25f16d9e3416e186f677e425d7c3c19fb1b6b76a | /qt5_exercises/concurrent/bad_example_1.py | fccb43f8a4882055a4ed050ebd0b638cfb424564 | [] | no_license | amisaka/pyqt5Samples | 662b33255f9fd3522a8600e23b1f5e742eef769e | 40f295232a726b4d67cc3124dcf6ac46a2efe9c8 | refs/heads/master | 2023-08-27T18:11:58.162821 | 2021-11-03T14:06:10 | 2021-11-03T14:06:10 | 419,336,692 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 971 | py | import sys
import time
from PyQt5.QtCore import QTimer
from PyQt5.QtWidgets import (
QApplication,
QLabel,
QMainWindow,
QPushButton,
QVBoxLayout,
QWidget,
)
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.counter = 0
layout = QVBoxLayou... | [
"[email protected]"
] | |
4d1b9324b39491d5d9bc18a2121746ef329ae04d | b34641367c20afd688050976339ebae3ca7220a0 | /somemart_auth/somemart_auth/bin/django-admin.py | 53e30b0ed682707f5bb3c5c3d3a6699aba4d164c | [] | no_license | DrShiz/learning4 | cee6e46f733badbe17ab410e5a89b2106e493d2e | 85fa372d3bdccf7da487d13d147c1b639ddceefd | refs/heads/master | 2023-03-06T00:20:00.048331 | 2021-02-16T16:39:35 | 2021-02-16T16:39:35 | 339,447,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | #!/Users/terekhovas/PycharmProjects/learning4/somemart_auth/somemart_auth/bin/python3
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| [
"[email protected]"
] | |
ffe7dd88fd8bc92e657aaa2d716937bfe5577bb7 | 016200d5593feb15bf7737389586bd161398a09c | /Database/venv/bin/rstpep2html.py | d3334da4c02e7abe3f073230dad54c21f6a5896b | [] | no_license | MarcPartensky/Python-2019 | d74e41710c9b48887e141ef5a8251f5e5d06026d | 1b29680292fdc48af25ae45ce0e9572b8c31427d | refs/heads/master | 2021-07-07T18:46:49.708387 | 2020-08-11T19:49:01 | 2020-08-11T19:49:01 | 166,604,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 731 | py | #!/Users/marcpartensky/Programs/Python/Repository-2019/Database/venv/bin/python
# $Id: rstpep2html.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <[email protected]>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing HTML from P... | [
"[email protected]"
] | |
c4f18d847f19ca495879aa38a6784637e2cdc09e | f34298735dbaee1a56da7dcc477f2734c6a1a305 | /src/tandlr/emails/views.py | 7e5be2847adb90189418ba321dbc33b1554a340c | [
"Apache-2.0"
] | permissive | shrmoud/schoolapp | 6f8e71b68cf42b6d2ac54acb42ed0a4664d5aaa9 | 7349ce18f56658d67daedf5e1abb352b5c15a029 | refs/heads/master | 2021-03-24T13:34:44.385285 | 2017-06-11T21:37:53 | 2017-06-11T21:37:53 | 94,031,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,020 | py | from django.http import Http404
from django.shortcuts import get_object_or_404
from django.template import TemplateDoesNotExist
from django.views.generic.base import TemplateView
from tandlr.scheduled_classes.models import Class
class StaticEmailView(TemplateView):
"""
View to render static email templates f... | [
"[email protected]"
] | |
80d8b80562719182cb64b44da2035610d8f622f3 | 86206b05a6e0a425ba5401de50b8645bddf77780 | /Oper Python/SFDC Oper/Training Scripts/Selenium/Oper1/Sandbox/XLLib.py | c3f4c611f5f1340cccab5f36f85d28d7b2f13bba | [] | no_license | QuestTestAutomation/PersistentDesktop1python | 2e626ea16ce0fd4c697b156fdc2f9b3ca85bbd7b | ece25957edb6f87b2777b261b31914d22ebd99ad | refs/heads/master | 2021-03-10T21:55:25.450872 | 2020-03-27T09:45:14 | 2020-03-27T09:45:14 | 246,488,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,491 | py | import openpyxl
import os
import time
from openpyxl.utils import get_column_letter
from openpyxl import Workbook
from openpyxl.compat import range
def Create_Workbook(file,sheetname):
sheetexists = 0
if os.path.isfile(file):
mywb = openpyxl.load_workbook(file)
print("XL file exists")
else:... | [
"[email protected]"
] | |
a34584dbef4b37a0544599bc74d308186d99c177 | b7138d31e13920ad1bf6a82ff062a6f512c48983 | /cal_test.py | a9aa6c440b822b666232f96a284da723bc4b737a | [] | no_license | aaqqxx/ZA_cal | bcb6863a1aa882ed34fb18a4070ecb316568a3f1 | 2b604d2f1d472666d03c0a63a3c18f5710650a2e | refs/heads/master | 2020-05-04T14:03:49.846304 | 2019-04-03T01:05:04 | 2019-04-03T01:05:04 | 179,183,203 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,200 | py | # coding:utf-8
__author__ = 'XingHua'
"""
光栅尺位置VS出光学位置
参考点为d1前面的那个镜子,见90nm的ZA图纸。
从Excel中的光栅尺位置计算出光学位置d1,d2,d3,d5.
从光学位置计算出光栅尺位置。
"""
import matplotlib.pyplot as plt
import numpy as np
from glob import glob
import pandas as pd
import argparse
import sys
import math
def quadratic(a, b, c):
if not isinstance(a, (i... | [
"[email protected]"
] | |
0f47c9b1f5dd09360682347e38d451c90365764d | 3bb57eb1f7c1c0aced487e7ce88f3cb84d979054 | /semeval/corpora/semeval/test_tags.py | 9ba72eace0ee9a1f33302f8a869d091beb0940c0 | [] | no_license | ghpaetzold/phd-backup | e100cd0bbef82644dacc73a8d1c6b757b2203f71 | 6f5eee43e34baa796efb16db0bc8562243a049b6 | refs/heads/master | 2020-12-24T16:41:21.490426 | 2016-04-23T14:50:07 | 2016-04-23T14:50:07 | 37,981,094 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | f1 = open('semeval_test_clean.txt')
f2 = open('tagged_sents_semeval_test.txt')
c = 0
for line1 in f1:
line2 = f2.readline()
tokens = line1.strip().split('\t')[0].strip().split(' ')
tags = line2.strip().split(' ')
if len(tokens)!=len(tags):
print('Tokens: ' + str(tokens))
print('Tags: ' + str(tags))
print('')... | [
"[email protected]"
] | |
7130805026446d24d544f10d895736cf095e094e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02937/s210990064.py | f15af763a1739d3abe1ae11028c005fee5325924 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | from bisect import bisect_left
import sys
s = input()
t = input()
d = {char:[] for char in 'abcdefghijklmnopqrstuvwxyz'}
for i in range(len(s)):
d[s[i]].append(i)
cnt = 0
index = 0
for char in t:
if not d[char]:
print(-1)
sys.exit()
i = bisect_left(d[char], index)
if i == len(d[char]):... | [
"[email protected]"
] | |
d8947f54da103676026570125e67410bffb7919f | 99d7765da35926279c4a4fd7313d55908786f4b8 | /1/7/17256/17256.py | d960171dbed858b264d23746c09f153f0475dfbb | [
"MIT"
] | permissive | chr0m3/boj-codes | b8294c5d4d10a5af25b5276427bccd74d0866ef5 | d71d0a22d0a3ae62c225f382442461275f56fe8f | refs/heads/master | 2021-08-16T15:24:57.733088 | 2021-03-22T13:13:10 | 2021-03-22T13:13:10 | 91,523,558 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | ax, ay, az = map(int, input().split())
cx, cy, cz = map(int, input().split())
bx = cx - az
by = int(cy / ay)
bz = cz - ax
print(f'{bx} {by} {bz}')
| [
"[email protected]"
] | |
bcfda7e647bf3de983700535dd5d34d12deef7d1 | a01fb7bb8e8738a3170083d84bc3fcfd40e7e44f | /python3/core/meta/define_class.py | f2363c09f30ec08eda430d475519793a0f9d812f | [] | no_license | jk983294/CommonScript | f07acf603611b4691b176aa4a02791ef7d4d9370 | 774bcbbae9c146f37312c771c9e867fb93a0c452 | refs/heads/master | 2023-08-21T17:50:19.036159 | 2023-08-16T00:22:03 | 2023-08-16T00:22:03 | 42,732,160 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | import types
# Example of making a class manually from parts
# Methods
def __init__(self, name, shares, price):
self.name = name
self.shares = shares
self.price = price
def cost(self):
return self.shares * self.price
cls_dict = {
'__init__': __init__,
'cost': cost,
}
#... | [
"[email protected]"
] | |
38fea3cb4a84ad737b0db2e9f0e3d3bd11cf0e52 | 0343de40021f8dd72fb9a6cb31b5d2f24ccd7971 | /utilities/wake_models_mean/array_efficiency_openMDAO.py | fc3e2db61bcf729ad72f210df061bd8098d2014a | [] | no_license | sebasanper/WINDOW_dev | 47ae9252e6fadb2a3b1a0aae3383681a7955f4ea | 3c6437a777f2fc3be1dfd3d53b5d2ed25281c55c | refs/heads/master | 2021-01-01T19:45:02.555727 | 2018-05-21T20:27:56 | 2018-05-21T20:27:56 | 98,670,270 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,855 | py | from numpy import array
from openmdao.api import Component, Group, Problem
from farm_energy.layout import read_layout
from power_models import power_v90 as power
from site_conditions.wind_conditions.windrose import read_windrose
from wake_models import jensen_1angle, ainslie_1angle, larsen_1angle
class JensenWindRo... | [
"[email protected]"
] | |
356538f816b7e65cf077f0dc5839f9ca201bca9f | edbb63696580638af0084ee318d2c9bc9e8c7e79 | /linkf.py | f95261c46757de6bb39993f4c951b15bf01b7640 | [] | no_license | awaddell77/Scrapers | fef34e34b8e039f4992497cae75135cdb57b2581 | 0a36fb2c99f2d7b90533834b29c0ba8f27c13a85 | refs/heads/master | 2020-05-21T13:44:06.524855 | 2020-03-16T23:00:45 | 2020-03-16T23:00:45 | 62,753,048 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 838 | py | def linkF(s,n, base = 0, attrs= 0, default = '"'):#x is the item, n = tag takes link tag (MUST BE STRING) and extracts the link
l =[]
ln = ''
x = s
if attrs != 0:
x = re.sub('<a','', x)#strips the tag from the string, helps in certain situations where the location of the link changes in between ... | [
"[email protected]"
] | |
8f9fac60b55576c80814a327c149e2c7951c05eb | 1b3addbc9473b6ffb999665601470ccc4d1153b0 | /libs/magic.py | 53a91fd47331bd4941f6ce36bfa0ea6caa24c08f | [] | no_license | weijia/approot | e1f712fa92c4c3200210eb95d251d890295769ba | 15fac5b31a4d619d1bdede3d1131f5e6e57cd43b | refs/heads/master | 2020-04-15T13:15:01.956721 | 2014-08-26T14:02:17 | 2014-08-26T14:02:17 | 11,049,975 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,745 | py | """
magic is a wrapper around the libmagic file identification library.
See README for more information.
Usage:
>>> import magic
>>> magic.from_file("testdata/test.pdf")
'PDF document, version 1.2'
>>> magic.from_file("testdata/test.pdf", mime=True)
'application/pdf'
>>> magic.from_buffer(open("testdata/test.pdf").r... | [
"[email protected]"
] | |
1d4c22ebff1083d8a40dc2c2f66e9ac41fe68e8e | 40ca9c74e41047b4f057923894f664653c2317c8 | /002_celery/django/sth/views.py | e25e6e38ffa47e47f99b2dd7b42f50441edad371 | [
"MIT"
] | permissive | MeNsaaH/Task-Queues-Django | 1207856fd382baa63f018b60e5c6b79fc0c52b31 | 73bebc9b755e2943455939817325aa63a1aa7f62 | refs/heads/master | 2022-11-21T09:44:57.856364 | 2018-10-11T11:16:50 | 2018-10-11T11:16:50 | 152,408,206 | 0 | 0 | MIT | 2022-11-10T12:56:38 | 2018-10-10T10:49:40 | Python | UTF-8 | Python | false | false | 323 | py | from django.http import HttpResponse
from sth.tasks import some_task
# Create your views here.
def some_view(request):
result = some_task.delay()
# Other Methods on Celery AsyncResult
# result.ready()
# result.get(timeout=1)
# result.traceback
return HttpResponse('some task has being started... | [
"="
] | = |
906d663716faf84d5efa71adc0baced6ba2e9174 | 5ecdbc6e79c408ed45327ffeae11eae91c4b8ce6 | /ilusiones_sales/models/contract_number.py | f898d4746618b0bb0ccf7fbf890269a839a2dc93 | [] | no_license | rosalesdc/ejemplos_addons | c6ee5cf9a10935b38165eca84c07a84d4d9c2538 | 8c3e74a3d0145b74cb8288772763e88f39979e6f | refs/heads/master | 2022-12-22T07:21:16.238052 | 2020-09-25T06:18:34 | 2020-09-25T06:18:34 | 298,184,002 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 289 | py | # -*- coding: utf-8 -*-
from odoo import models, fields, api
class ContractNumber(models.Model):
_name = 'contract.number'
_description = "Numero de conrato"
name = fields.Char(string='Numero de serie', required=True)
date = fields.Date(string="Fecha del contrato")
| [
"[email protected]"
] | |
b101bda0005c03561d755e2270489d08ff015499 | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryarraysrc.py | b38055e7ec20ace3ec74c3b976ac52a75b5fd63d | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 445 | py | import _plotly_utils.basevalidators
class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="categoryarraysrc", parent_name="layout.scene.zaxis", **kwargs
):
super(CategoryarraysrcValidator, self).__init__(
plotly_name=plotly_name... | [
"[email protected]"
] | |
1f84c1a411609c8c5b853c69c2baa18edb4f027e | 05148c0ea223cfc7ed9d16234ab3e6bb40885e9d | /Packages/matplotlib-2.2.2/lib/mpl_examples/pyplots/whats_new_98_4_fill_between.py | ed4b7f4ac7d55386bb003fc91a8e1dfea59642c1 | [
"MIT"
] | permissive | NightKirie/NCKU_NLP_2018_industry3 | 9ee226e194287fd9088429f87c58c874e050a8b3 | 23ac13644b140587e23cfeffb114c7c6f46f17a2 | refs/heads/master | 2021-06-05T05:33:09.510647 | 2018-07-05T10:19:47 | 2018-07-05T10:19:47 | 133,680,341 | 1 | 4 | MIT | 2020-05-20T16:29:54 | 2018-05-16T14:43:38 | Python | UTF-8 | Python | false | false | 456 | py | """
=============================
Whats New 0.98.4 Fill Between
=============================
"""
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0.0, 2, 0.01)
y1 = np.sin(2*np.pi*x)
y2 = 1.2*np.sin(4*np.pi*x)
fig, ax = plt.subplots()
ax.plot(x, y1, x, y2, color='black')
ax.fill_between(x, y1, y2, w... | [
"[email protected]"
] | |
19dd60844691611bae70a8df07c9fc9cd60b0efb | 23f534a67f2d58ea556885b93584590f57f47123 | /src/tutorials/fluentpython/concurrency_futures/Standardflags.py | 319a5ec9b067726a606f19bac52621071e8c93a1 | [] | no_license | manas-mukherjee/MLTools | 2cb3e735d4967f4c60c08739c86e07224977a182 | eb18e6d1c6a8900ed47332a7dfb1ceaccc789deb | refs/heads/master | 2022-12-07T22:46:13.419343 | 2020-03-10T09:46:03 | 2020-03-10T09:46:03 | 98,766,117 | 2 | 0 | null | 2022-11-22T01:27:34 | 2017-07-30T00:36:56 | Jupyter Notebook | UTF-8 | Python | false | false | 976 | py | import os
import time
import sys
import requests
POP20_CC = ('CN IN US ID BR PK NG BD RU JP '
'MX PH VN ET EG DE IR TR CD FR').split()
BASE_URL = 'http://flupy.org/data/flags'
DEST_DIR = 'downloads/'
def save_flag(img, filename):
path = os.path.join(DEST_DIR, filename)
with open(path, 'wb') as... | [
"[email protected]"
] | |
432e56502ab6f191dd680864cf5673b011f9a73b | f6f632bee57875e76e1a2aa713fdbe9f25e18d66 | /python/_1001_1500/1434_number-of-ways-to-wear-different-hats-to-each-other.py | 6e4134899e9fb8ff1f3ae283f20327e4315b3a62 | [] | no_license | Wang-Yann/LeetCodeMe | b50ee60beeeb3661869bb948bef4fbe21fc6d904 | 44765a7d89423b7ec2c159f70b1a6f6e446523c2 | refs/heads/master | 2023-08-07T05:31:23.428240 | 2021-09-30T15:33:53 | 2021-09-30T15:33:53 | 253,497,185 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,244 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : Rock Wayne
# @Created : 2020-06-19 08:00:00
# @Last Modified : 2020-06-19 08:00:00
# @Mail : [email protected]
# @Version : alpha-1.0
"""
# 总共有 n 个人和 40 种不同的帽子,帽子编号从 1 到 40 。
#
# 给你一个整数列表的列表 hats ,其中 hats[i] 是第 i 个人所有喜欢帽子的列表。 ... | [
"[email protected]"
] | |
c26155b2c52ac0f93816f82789a0620fa8778e43 | 30319ef38df7cdd57a0e31d32009dfaaa6803ce2 | /zeijemol/views/startup.py | c2f4684c1e5c34e34f66fd847260a1c3cc6652bf | [] | no_license | neurospin/zeijemol | 9a064562387604bfbd4cd619687719d99074736c | d023e6f7907b73810c4496687d63dead5836138c | refs/heads/master | 2020-04-11T03:38:09.852328 | 2017-09-12T11:44:46 | 2017-09-12T11:44:46 | 50,499,760 | 1 | 4 | null | 2017-08-31T13:21:45 | 2016-01-27T10:26:44 | JavaScript | UTF-8 | Python | false | false | 7,706 | py | ##########################################################################
# NSAp - Copyright (C) CEA, 2013
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
##########... | [
"[email protected]"
] | |
d65628556268853325cd60b2ae9d5b468ddd607c | f9acdde88dbb70a2844e058f6c53c016fc8407c1 | /lfc/utils/middleware.py | 73fd4101ae5c997956b80590d97c5c105c676f5e | [] | no_license | yzl11/django-lfc | 536daccae82351af66f3894c38c8f2702691af75 | 75c900d672b4d36705fb8fa4833c446bbb78efea | refs/heads/master | 2021-01-15T13:14:37.192773 | 2015-05-03T15:03:12 | 2015-05-03T15:03:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 574 | py | # python imports
import logging
# permissions imports
from permissions.exceptions import Unauthorized
# lfc imports
import lfc.utils
# Load logger
logger = logging.getLogger(__name__)
class LFCMiddleware:
"""LFC specific middleware.
"""
def process_exception(self, request, exception):
"""Catche... | [
"[email protected]"
] | |
171445b5eb900e95286b527051d51c2668e76e2d | 35e11785421b1831fb19fef8fb03c804fafbad44 | /tests/common_app.py | 4ec8a40249e2c75286b1b661d9dc93b0ad666831 | [
"MIT"
] | permissive | bwisgood/FRF | fff4e264ceeb7397da58564aaca6be6d66c29430 | c520cb98bd2fca5f29964bcc475d84c011d43954 | refs/heads/master | 2023-01-10T19:17:01.396435 | 2019-08-26T11:23:37 | 2019-08-26T11:23:37 | 155,576,545 | 3 | 0 | MIT | 2022-12-27T15:36:47 | 2018-10-31T15:03:07 | Python | UTF-8 | Python | false | false | 2,447 | py | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from v3.wrapper import FlaskRestFramework
from v3.views import GetView, PostView, PutView, RetrieveView, DeleteView
from v3.serializer import Serialize... | [
"[email protected]"
] | |
1c67e00090b8ef676b62937c7101be1ca71afa72 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /kxrhqiE5so3AMXWS7_5.py | 854f9fb64387e018368202a96adcf4e5dab2b54d | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 148 | py |
def get_number_of_apples(n, p):
p = int(p[:-1])/10
ans = int(n * (10-p)/10)
return ans if ans > 0 else "The children didn't get any apples"
| [
"[email protected]"
] | |
7cd01337d6972f928bcb5624b0c3eda164203938 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_55/558.py | 30c1531227e7121c4e261664bebf108bef953b37 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 982 | py | #!/usr/bin/python
def precompute(capacity, groups, people):
packing = [[0, 0],]*groups
pointer = 0
for i in range(groups):
pointer = i
total = 0
while (total + people[i]) <= capacity:
total += people[i]
i += 1
if i >= groups:
i = 0
if i == pointer:
break
packing[pointer] = [total, i]
re... | [
"[email protected]"
] | |
a529f6fb1e0b2d70e2d519ca9bf9cc233dec5c97 | 10c459a49cbc8ee2dc3bc2a8353c48b5a96f0c1d | /spider/day05/01.threading_斗图网.py | 069c486f5ef724f2c44ff447e8feb6a0e9c1c0c7 | [] | no_license | alinzel/Demo | 1a5d0e4596ab4c91d7b580da694b852495c4ddcc | cc22bbcdbd77190014e9c26e963abd7a9f4f0829 | refs/heads/master | 2020-03-10T22:26:30.247695 | 2018-04-15T15:37:28 | 2018-04-15T15:37:28 | 129,619,168 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,071 | py | # -*- coding: utf-8 -*-
# @Time : 18-3-2 下午6:15
# @Author : Zwl
# @Email : [email protected]
# @File : 01.threading_斗图网.py
# @Software: PyCharm
import threading
import requests
from bs4 import BeautifulSoup
import time
import os
# TODO 确定数据
base_url = 'https://www.doutula.com/photo/list/?page='
header = {
'... | [
"[email protected]"
] | |
875345586355a9355bce7e92772c02104b0791a4 | 3faf4b9fb76145b2326446bc6bc190a5712b3b62 | /Algorithms/0143 Reorder List.py | 4af27de2eeddeed16f4dcef88dcca1c8ce33e0ab | [] | no_license | cravo123/LeetCode | b93c18f3e4ca01ea55f4fdebceca76ccf664e55e | 4c1288c99f78823c7c3bac0ceedd532e64af1258 | refs/heads/master | 2021-07-12T11:10:26.987657 | 2020-06-02T12:24:29 | 2020-06-02T12:24:29 | 152,670,206 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,358 | py | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
# Solution 1, fast and slow pointers, reverse linked list techniques
class Solution:
def cut_half(self, node):
slow = fast = node
prev = None
while fast and ... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.